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>
|
2013-04-11 15:09:23 -04:00
|
|
|
<#assign infoClassHide = ''/>
|
|
|
|
<#assign infoClassShow = ''/>
|
|
|
|
|
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">
|
2013-05-20 15:36:37 -04:00
|
|
|
<img src="${urls.images}/iconAlertBig.png" alt="${i18n().alert_icon}"/>
|
|
|
|
<p>${i18n().javascript_require_to_edit} <a href="http://www.enable-javascript.com" title="${i18n().javascript_instructions}">${i18n().to_enable_javascript}</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">
|
2013-05-20 15:36:37 -04:00
|
|
|
<h2>${i18n().login_button}</h2>
|
2010-11-15 22:17:20 +00:00
|
|
|
|
|
|
|
<#if infoMessage??>
|
|
|
|
<h3>${infoMessage}</h3>
|
|
|
|
</#if>
|
|
|
|
|
|
|
|
<#if errorMessage??>
|
2013-04-11 15:09:23 -04:00
|
|
|
<#assign infoClassShow = ' id="vivoAccountError"'/>
|
|
|
|
|
2013-05-20 15:36:37 -04:00
|
|
|
<section id="error-alert" role="alert"><img src="${urls.images}/iconAlert.png" alt="${i18n().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??>
|
2013-04-11 15:09:23 -04:00
|
|
|
<#assign infoClassHide = 'class="vivoAccount"'/>
|
|
|
|
|
2013-10-09 16:38:14 -04:00
|
|
|
<p class="external-auth"><a class="blue button" href="${externalAuthUrl}" title="${i18n().external_auth_name}">${i18n().external_login_text}</a></p>
|
2013-04-11 15:09:23 -04:00
|
|
|
<!--<p class="or-auth">or</p>-->
|
2013-05-20 15:36:37 -04:00
|
|
|
<h3 class="internal-auth"><!--Log in using your--> <b>${i18n().or}</b> ${siteName} ${i18n().account}</h3>
|
2013-04-11 15:09:23 -04:00
|
|
|
|
2010-12-21 15:11:50 +00:00
|
|
|
</#if>
|
2013-04-11 15:09:23 -04:00
|
|
|
|
|
|
|
<div ${infoClassHide} ${infoClassShow}>
|
|
|
|
|
2013-05-20 15:36:37 -04:00
|
|
|
<label for="loginName">${i18n().email_capitalized}</label>
|
2013-04-11 15:09:23 -04:00
|
|
|
<input id="loginName" name="loginName" class="text-field focus" type="text" value="${loginName!}" autocapitalize="off" required autofocus />
|
2010-12-21 19:22:25 +00:00
|
|
|
|
2013-05-20 15:36:37 -04:00
|
|
|
<label for="loginPassword">${i18n().password_capitalized}</label>
|
2013-04-11 15:09:23 -04:00
|
|
|
<input id="loginPassword" name="loginPassword" class="text-field" type="password" required />
|
|
|
|
|
2013-05-20 15:36:37 -04:00
|
|
|
<p class="submit"><input name="loginForm" class="green button" type="submit" value="${i18n().login_button}"/></p>
|
2013-04-11 15:09:23 -04:00
|
|
|
|
|
|
|
<#-- NC: remember me won't be ready for r1.2
|
|
|
|
<input class="checkbox-remember-me" name="remember-me" type="checkbox" value="" />
|
|
|
|
<label class="label-remember-me" for="remember-me">Remember me</label> -->
|
|
|
|
<#-- mb863: forgot password and request an account won't be part of VIVO r1.2
|
|
|
|
<p class="forgot-password"><a href="#" title="forgot password">Forgot your password?</a></p>
|
2013-05-20 15:36:37 -04:00
|
|
|
<p class="request-account"><a class="blue button" href="#" title="request an account">Request an account</a> </p>
|
|
|
|
-->
|
2013-04-11 15:09:23 -04:00
|
|
|
</div>
|
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">
|
2013-05-20 15:36:37 -04:00
|
|
|
<h2>${i18n().change_password_to_login}</h2>
|
2010-11-15 22:17:20 +00:00
|
|
|
|
|
|
|
<#if errorMessage??>
|
2013-05-20 15:36:37 -04:00
|
|
|
<div id="error-alert" role="alert"><img src="${urls.images}/iconAlert.png" width="24" height="24" alt="${i18n().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" />
|
2013-05-20 15:36:37 -04:00
|
|
|
<label for="newPassword">${i18n().new_password_capitalized}</label>
|
2011-05-12 16:18:26 +00:00
|
|
|
<input id="newPassword" name="newPassword" class="text-field focus" type="password" required autofocus/>
|
2010-11-19 14:52:41 +00:00
|
|
|
|
2015-03-25 15:10:30 -04:00
|
|
|
<p class="password-note">${i18n().minimum_password_length(minimumLength, maximumLength)}</p>
|
2010-11-19 14:52:41 +00:00
|
|
|
|
2013-05-20 15:36:37 -04:00
|
|
|
<label for="confirmPassword">${i18n().confirm_password_capitalized}</label>
|
2011-05-12 16:18:26 +00:00
|
|
|
<input id="confirmPassword" name="confirmPassword" class="text-field" type="password" required />
|
2010-11-19 14:52:41 +00:00
|
|
|
|
2013-05-20 15:36:37 -04:00
|
|
|
<p class="submit-password"><input name="passwordChangeForm" class="green button" type="submit" value="${i18n().login_button}"/> <span class="or">or <a class="cancel" href="${cancelUrl}" title="${i18n().cancel_title}">${i18n().cancel_link}</a></span></p>
|
2010-11-15 22:17:20 +00:00
|
|
|
</form>
|
|
|
|
</section>
|
|
|
|
</#macro>
|
|
|
|
|
2010-11-16 16:53:50 +00:00
|
|
|
<#macro alreadyLoggedIn>
|
2013-05-20 15:36:37 -04:00
|
|
|
<h2>${i18n().login_button}</h2>
|
|
|
|
<p>${i18n().already_logged_in}</p>
|
2010-11-16 16:53:50 +00:00
|
|
|
</#macro>
|
|
|
|
|
2010-11-15 22:17:20 +00:00
|
|
|
<#macro error>
|
2013-05-20 15:36:37 -04:00
|
|
|
<p>${i18n().we_have_an_error}</p>
|
2010-11-15 22:17:20 +00:00
|
|
|
</#macro>
|