NIHVIVO-1296 Integrate login functionality into login widget.
This commit is contained in:
parent
73b881a805
commit
2973ceebf2
14 changed files with 237 additions and 148 deletions
|
@ -3,25 +3,47 @@
|
|||
<#-- Login widget -->
|
||||
|
||||
<#macro assets>
|
||||
<#if ! loginName??>
|
||||
<#-- RY This test should be replaced by controller logic which doesn't display any assets if the user is logged in.
|
||||
See NIHVIVO-1357. This test does nothing, since loginName has not been put into the data model.
|
||||
<#if ! loginName?has_content> -->
|
||||
${stylesheets.add("/css/login.css")}
|
||||
<#-- define any js files needed for the login widget
|
||||
${scripts.add("")}
|
||||
${headScripts.add("")} -->
|
||||
</#if>
|
||||
${scripts.add("/js/jquery.js", "/js/login/loginUtils.js")}
|
||||
<#-- ${headScripts.add("")} -->
|
||||
<#-- </#if> -->
|
||||
</#macro>
|
||||
|
||||
<#macro markup>
|
||||
<#if ! loginName??>
|
||||
<section id="log-in">
|
||||
<h2>Log in</h2>
|
||||
<#macro loginForm>
|
||||
|
||||
<form id="log-in-form" action="${urls.home}/authenticate?login=block" method="post" name="log-in-form" />
|
||||
<section id="log-in">
|
||||
<h2>Log in</h2>
|
||||
|
||||
<noscript>
|
||||
<section id="javascriptDisableWrapper">
|
||||
<section id="javascriptDisableContent">
|
||||
<img src="${urls.siteIcons}/iconAlertBig.png" alt="Alert Icon"/>
|
||||
<p>In order to edit VIVO content, you'll need to enable JavaScript.</p>
|
||||
</section>
|
||||
</section>
|
||||
</noscript>
|
||||
|
||||
<#if infoMessage??>
|
||||
<h3>${infoMessage}</h3>
|
||||
</#if>
|
||||
|
||||
<#if errorMessage??>
|
||||
<section id="errorAlert"><img src="${urls.siteIcons}/iconAlert.png" alert="Error alert icon"/>
|
||||
<p>${errorMessage}</p>
|
||||
</section>
|
||||
</#if>
|
||||
|
||||
<section id="loginFormAndLinks">
|
||||
|
||||
<form id="log-in-form" action="${formAction}" method="post" name="log-in-form" />
|
||||
<label for="email">Email</label>
|
||||
<input class="text-field" name="loginName" id="loginName" type="text" required />
|
||||
|
||||
|
||||
<label for="password">Password</label>
|
||||
<input class="text-field" name="loginPassword" id="password" type="loginPassword" required />
|
||||
<input class="text-field" name="loginPassword" id="password" type="password" required />
|
||||
|
||||
<p class="submit"><input name="loginForm" type="submit" class="green button" value="Log in"/></p>
|
||||
|
||||
|
@ -31,6 +53,31 @@
|
|||
|
||||
<p class="forgot-password"><a href="#">Forgot your password?</a></p>
|
||||
<p class="request-account"><a class=" blue button" href="#">Request an account</a> </p>
|
||||
</section><!-- #log-in -->
|
||||
</#if>
|
||||
</#macro> -->
|
||||
</section>
|
||||
</section><!-- #log-in -->
|
||||
</#macro>
|
||||
|
||||
<#macro forcePasswordChange>
|
||||
<section id="log-in">
|
||||
<h2>Log in</h2>
|
||||
|
||||
<#if errorMessage??>
|
||||
<div id="errorAlert"><img src="${urls.siteIcons}/iconAlert.png" width="24" height="24" alert="Error alert icon"/>
|
||||
<p>${errorMessage}</p>
|
||||
</div>
|
||||
</#if>
|
||||
|
||||
<form id="log-in-form" action="${formAction}" method="post" name="log-in-form" />
|
||||
<label for="newPassword">New Password</label>
|
||||
<input id="newPassword" class="focus" type="password" name="newPassword" />
|
||||
<p class="passwordNote">Minimum of 6 characters in length.</p>
|
||||
<label for="confirmPassword">Confirm Password</label>
|
||||
<input id="confirmPassword" type="password" name="confirmPassword" />
|
||||
<input name="passwordChangeForm" type="submit" class="submit" value="Save Changes"/> <span class="or">or <a class="cancel" href="${cancelUrl}">Cancel</a></span>
|
||||
</form>
|
||||
</section>
|
||||
</#macro>
|
||||
|
||||
<#macro error>
|
||||
<p>There was an error in the system.</p>
|
||||
</#macro>
|
Loading…
Add table
Add a link
Reference in a new issue