2010-10-29 19:12:40 +00:00
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Login widget -->
2010-11-03 02:26:48 +00:00
<#macro assets>
2011-02-07 18:23:42 +00:00
<#-- RY This test should be replaced by login widget controller logic which displays different assets macros depending
on login status, but currently there's no widget-specific doAssets() method. See NIHVIVO-1357. The test doesn't work
because we don't have the user in the template data model when we generate the assets. This can also be fixed by
NIHVIVO-1357.
2010-11-23 01:28:39 +00:00
<#if ! user.loggedIn> -->
2011-03-08 15:44:05 +00:00
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/login.css" />')}
2011-01-14 22:00:30 +00:00
<#-- ${scripts.add("")} -->
2011-03-08 15:44:05 +00:00
${headScripts.add('<script type="text/javascript" src="${urls.base}/js/login/loginUtils.js"></script>')}
2010-11-15 22:17:20 +00:00
<#-- </#if> -->
2010-10-29 19:12:40 +00:00
</#macro>
2010-11-15 22:17:20 +00:00
<#macro loginForm>
2011-02-08 13:23:59 +00:00
<#-- Don't display the JavaScript required to edit message on the home page even if JavaScript is unavailable -->
2011-02-08 22:33:01 +00:00
<#if currentServlet != 'home'>
2011-02-08 13:23:59 +00:00
<noscript>
<section id="error-alert">
<img src="${urls.images}/iconAlertBig.png" alt="Alert Icon"/>
2011-11-30 21:25:07 +00:00
<p>In order to edit content, you'll need to enable JavaScript. Here are the <a href="http://www.enable-javascript.com" title="java script instructions">instructions for enabling JavaScript in your web browser</a>.</p>
2011-02-08 13:23:59 +00:00
</section>
</noscript>
</#if>
2010-11-05 19:29:27 +00:00
2011-01-16 19:26:15 +00:00
<section id="login" class="hidden">
2010-11-15 22:17:20 +00:00
<h2>Log in</h2>
<#if infoMessage??>
<h3>${infoMessage}</h3>
</#if>
<#if errorMessage??>
2010-12-21 15:11:50 +00:00
<section id="error-alert" role="alert"><img src="${urls.images}/iconAlert.png" alert="Error alert icon" />
2011-02-01 17:34:49 +00:00
<p class="login-alert">${errorMessage}</p>
2010-12-21 15:11:50 +00:00
</section>
2010-11-15 22:17:20 +00:00
</#if>
2011-05-12 16:18:26 +00:00
<form role="form" id="login-form" action="${formAction}" method="post" name="login-form" />
2010-12-21 15:11:50 +00:00
<#if externalAuthUrl??>
2011-11-30 21:25:07 +00:00
<p class="external-auth"><a class="blue button" href="${externalAuthUrl}" title="external authentication name">${externalAuthName}</a></p>
2010-12-21 19:22:25 +00:00
<p class="or-auth">or</p>
2011-01-04 18:23:11 +00:00
<h3 class="internal-auth" >Log in using your ${siteName} account</h3>
2010-12-21 15:11:50 +00:00
</#if>
2010-12-21 19:22:25 +00:00
2011-05-12 16:18:26 +00:00
<label for="loginName">Email</label>
2011-07-18 12:05:23 +00:00
<input id="loginName" name="loginName" class="text-field focus" type="text" value="${loginName!}" autocapitalize="off" required autofocus />
2010-11-19 14:52:41 +00:00
2011-05-12 16:18:26 +00:00
<label for="loginPassword">Password</label>
<input id="loginPassword" name="loginPassword" class="text-field" type="password" required />
2010-11-19 14:52:41 +00:00
2011-05-12 16:18:26 +00:00
<p class="submit"><input name="loginForm" class="green button" type="submit" value="Log in"/></p>
2011-01-16 19:26:15 +00:00
<#-- NC: remember me won't be ready for r1.2
2010-11-19 14:52:41 +00:00
<input class="checkbox-remember-me" name="remember-me" type="checkbox" value="" />
2010-12-17 23:19:19 +00:00
<label class="label-remember-me" for="remember-me">Remember me</label> -->
2010-11-30 20:21:52 +00:00
<#-- mb863: forgot password and request an account won't be part of VIVO r1.2
2011-11-30 21:25:07 +00:00
<p class="forgot-password"><a href="#" title="forgot password">Forgot your password?</a></p>
<p class="request-account"><a class="blue button" href="#" title="request an account">Request an account</a> </p> -->
2010-11-19 14:52:41 +00:00
</form>
2010-11-15 22:17:20 +00:00
</section><!-- #log-in -->
</#macro>
<#macro forcePasswordChange>
2010-11-24 18:21:23 +00:00
<section id="login">
2011-01-18 20:57:02 +00:00
<h2>Change Password to Log in</h2>
2010-11-15 22:17:20 +00:00
<#if errorMessage??>
2010-12-14 18:39:19 +00:00
<div id="error-alert" role="alert"><img src="${urls.images}/iconAlert.png" width="24" height="24" alert="Error alert icon"/>
2010-11-15 22:17:20 +00:00
<p>${errorMessage}</p>
</div>
</#if>
2011-05-12 16:18:26 +00:00
<form role="form" id="login-form" action="${formAction}" method="post" name="login-form" />
<label for="newPassword">New Password</label>
<input id="newPassword" name="newPassword" class="text-field focus" type="password" required autofocus/>
2010-11-19 14:52:41 +00:00
2010-11-29 18:26:16 +00:00
<p class="password-note">Minimum of 6 characters in length.</p>
2010-11-19 14:52:41 +00:00
2011-05-12 16:18:26 +00:00
<label for="confirmPassword">Confirm Password</label>
<input id="confirmPassword" name="confirmPassword" class="text-field" type="password" required />
2010-11-19 14:52:41 +00:00
2011-11-30 21:25:07 +00:00
<p class="submit-password"><input name="passwordChangeForm" class="green button" type="submit" value="Log in"/> <span class="or">or <a class="cancel" href="${cancelUrl}" title="cancel">Cancel</a></span></p>
2010-11-15 22:17:20 +00:00
</form>
</section>
</#macro>
2010-11-16 16:53:50 +00:00
<#macro alreadyLoggedIn>
<h2>Log in</h2>
2010-11-30 19:29:23 +00:00
<p>You are already logged in.</p>
2010-11-16 16:53:50 +00:00
</#macro>
2010-11-15 22:17:20 +00:00
<#macro error>
<p>There was an error in the system.</p>
</#macro>