Proof of concept - User accounts

This commit is contained in:
j2blake 2013-04-26 23:58:50 -04:00
parent bf2ed5c339
commit 8f1f084c5b
45 changed files with 826 additions and 610 deletions

View file

@ -25,6 +25,8 @@ import edu.cornell.mannlib.vitro.webapp.dao.VClassDao;
import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory;
import edu.cornell.mannlib.vitro.webapp.dao.jena.ModelContext;
import edu.cornell.mannlib.vitro.webapp.dao.jena.OntModelSelector;
import edu.cornell.mannlib.vitro.webapp.i18n.I18n;
import edu.cornell.mannlib.vitro.webapp.i18n.I18nBundle;
/**
* A base class with some utility routines for page handler (created by
@ -39,6 +41,7 @@ public abstract class AbstractPageHandler {
private static final Log log = LogFactory.getLog(AbstractPageHandler.class);
protected final VitroRequest vreq;
protected final I18nBundle i18n;
protected final ServletContext ctx;
protected final OntModel userAccountsModel;
protected final OntModel unionModel;
@ -50,6 +53,7 @@ public abstract class AbstractPageHandler {
protected AbstractPageHandler(VitroRequest vreq) {
this.vreq = vreq;
this.i18n = I18n.bundle(vreq);
this.ctx = vreq.getSession().getServletContext();
OntModelSelector oms = ModelContext.getUnionOntModelSelector(ctx);
@ -154,7 +158,8 @@ public abstract class AbstractPageHandler {
private static final String ATTRIBUTE = Message.class.getName();
public static void setMessage(HttpServletRequest req, Message message) {
log.debug("Added message to session: " + message.getMessageInfoMap());
log.debug("Added message to session: "
+ message.getMessageInfoMap());
req.getSession().setAttribute(ATTRIBUTE, message);
}

View file

@ -103,7 +103,7 @@ public abstract class UserAccountsAddPageStrategy extends UserAccountsPage {
FreemarkerEmailMessage email = FreemarkerEmailFactory
.createNewMessage(vreq);
email.addRecipient(TO, page.getAddedAccount().getEmailAddress());
email.setSubject("Your VIVO account has been created.");
email.setSubject(i18n.text("account_created_subject", getSiteName()));
if (page.isExternalAuthOnly()) {
email.setTemplate(EMAIL_TEMPLATE_NO_PASSWORD);
} else {

View file

@ -2,6 +2,8 @@
package edu.cornell.mannlib.vitro.webapp.controller.accounts.admin;
import static edu.cornell.mannlib.vitro.webapp.controller.accounts.user.UserAccountsUserController.getBogusStandardMessage;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@ -15,7 +17,6 @@ import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.usepages.ManageRoot
import edu.cornell.mannlib.vitro.webapp.beans.UserAccount;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.controller.accounts.UserAccountsPage;
import edu.cornell.mannlib.vitro.webapp.controller.accounts.user.UserAccountsUserController;
import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory;
/**
@ -51,7 +52,7 @@ public class UserAccountsDeleter extends UserAccountsPage {
UserAccount loggedInAccount = LoginStatusBean.getCurrentUser(vreq);
if (loggedInAccount == null) {
log.warn("Trying to delete accounts while not logged in!");
bogusMessage = UserAccountsUserController.BOGUS_STANDARD_MESSAGE;
bogusMessage = getBogusStandardMessage(vreq);
return;
}
@ -61,14 +62,14 @@ public class UserAccountsDeleter extends UserAccountsPage {
if (u == null) {
log.warn("Delete account for '" + uri
+ "' is bogus: no such user");
bogusMessage = UserAccountsUserController.BOGUS_STANDARD_MESSAGE;
bogusMessage = getBogusStandardMessage(vreq);
return;
}
if (u.getUri().equals(loggedInAccount.getUri())) {
log.warn("'" + u.getUri()
+ "' is trying to delete his own account.");
bogusMessage = UserAccountsUserController.BOGUS_STANDARD_MESSAGE;
bogusMessage = getBogusStandardMessage(vreq);
return;
}
@ -78,7 +79,7 @@ public class UserAccountsDeleter extends UserAccountsPage {
log.warn("Attempting to delete the root account, "
+ "but not authorized. Logged in as "
+ LoginStatusBean.getCurrentUser(vreq));
bogusMessage = UserAccountsUserController.BOGUS_STANDARD_MESSAGE;
bogusMessage = getBogusStandardMessage(vreq);
return;
}
}

View file

@ -2,6 +2,8 @@
package edu.cornell.mannlib.vitro.webapp.controller.accounts.admin;
import static edu.cornell.mannlib.vitro.webapp.controller.accounts.user.UserAccountsUserController.getBogusStandardMessage;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@ -20,7 +22,6 @@ import edu.cornell.mannlib.vitro.webapp.beans.SelfEditingConfiguration;
import edu.cornell.mannlib.vitro.webapp.beans.UserAccount;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.controller.accounts.UserAccountsPage;
import edu.cornell.mannlib.vitro.webapp.controller.accounts.user.UserAccountsUserController;
import edu.cornell.mannlib.vitro.webapp.controller.authenticate.Authenticator;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
@ -116,7 +117,7 @@ public class UserAccountsEditPage extends UserAccountsPage {
if (userAccount == null) {
log.warn("Edit account for '" + userUri
+ "' is bogus: no such user");
bogusMessage = UserAccountsUserController.BOGUS_STANDARD_MESSAGE;
bogusMessage = getBogusStandardMessage(vreq);
return;
}
if (userAccount.isRootUser()) {
@ -125,7 +126,7 @@ public class UserAccountsEditPage extends UserAccountsPage {
log.warn("User is attempting to edit the root account, "
+ "but is not authorized to do so. Logged in as: "
+ LoginStatusBean.getCurrentUser(vreq));
bogusMessage = UserAccountsUserController.BOGUS_STANDARD_MESSAGE;
bogusMessage = getBogusStandardMessage(vreq);
return;
}
}

View file

@ -46,14 +46,12 @@ public class UserAccountsCreatePasswordPage extends
@Override
protected String alreadyLoggedInMessage(String currentUserEmail) {
return "You may not activate the account for " + userEmail
+ " while you are logged in as " + currentUserEmail
+ ". Please log out and try again.";
return i18n.text("cant_activate_while_logged_in", userEmail, currentUserEmail);
}
@Override
protected String passwordChangeNotPendingMessage() {
return "The account for " + userEmail + " has already been activated.";
return i18n.text("account_already_activated", userEmail);
}
@Override
@ -69,7 +67,7 @@ public class UserAccountsCreatePasswordPage extends
FreemarkerEmailMessage email = FreemarkerEmailFactory
.createNewMessage(vreq);
email.addRecipient(TO, userAccount.getEmailAddress());
email.setSubject("Password successfully created.");
email.setSubject(i18n.text("password_created_subject", getSiteName()));
email.setTemplate(EMAIL_TEMPLATE);
email.setBodyMap(body);
email.processTemplate();

View file

@ -115,18 +115,17 @@ public class UserAccountsFirstTimeExternalPage extends UserAccountsPage {
private void validateExternalAuthId() {
if (externalAuthId.isEmpty()) {
bogusMessage = "Login failed - External ID is not found.";
bogusMessage = i18n.text("external_id_not_provided");
return;
}
if (null != userAccountsDao
.getUserAccountByExternalAuthId(externalAuthId)) {
bogusMessage = "User account already exists for '" + externalAuthId
+ "'";
bogusMessage = i18n.text("external_id_already_in_use",
externalAuthId);
return;
}
if (!Authenticator.getInstance(vreq).isUserPermittedToLogin(null)) {
bogusMessage = "User logins are temporarily disabled "
+ "while the system is being maintained.";
bogusMessage = i18n.text("logins_disabled_for_maintenance");
return;
}
}

View file

@ -73,7 +73,7 @@ public abstract class UserAccountsFirstTimeExternalPageStrategy extends
FreemarkerEmailMessage email = FreemarkerEmailFactory
.createNewMessage(vreq);
email.addRecipient(TO, ua.getEmailAddress());
email.setSubject("Your VIVO account has been created.");
email.setSubject(i18n.text("account_created_subject", getSiteName()));
email.setTemplate(EMAIL_TEMPLATE);
email.setBodyMap(body);
email.processTemplate();

View file

@ -178,7 +178,7 @@ public abstract class UserAccountsMyAccountPageStrategy extends
FreemarkerEmailMessage email = FreemarkerEmailFactory
.createNewMessage(vreq);
email.addRecipient(TO, page.getUserAccount().getEmailAddress());
email.setSubject("Your VIVO email account has been changed.");
email.setSubject(i18n.text("email_changed_subject"));
email.setTemplate(EMAIL_TEMPLATE);
email.setBodyMap(body);
email.processTemplate();

View file

@ -23,8 +23,6 @@ public abstract class UserAccountsPasswordBasePage extends UserAccountsPage {
private static final Log log = LogFactory
.getLog(UserAccountsPasswordBasePage.class);
public static final String BOGUS_MESSAGE_NO_SUCH_ACCOUNT = "The account you are trying to set a password on is no longer available. Please contact your system administrator if you think this is an error.";
private static final String PARAMETER_SUBMIT = "submit";
private static final String PARAMETER_USER = "user";
private static final String PARAMETER_KEY = "key";
@ -79,7 +77,7 @@ public abstract class UserAccountsPasswordBasePage extends UserAccountsPage {
if (userAccount == null) {
log.warn("Password request for '" + userEmail
+ "' is bogus: no such user");
bogusMessage = BOGUS_MESSAGE_NO_SUCH_ACCOUNT;
bogusMessage = i18n.text("account_no_longer_exists");
return;
}
@ -170,9 +168,9 @@ public abstract class UserAccountsPasswordBasePage extends UserAccountsPage {
public String getSuccessMessage() {
if (loggedIn) {
return "Your password has been saved.";
return i18n.text("password_saved");
} else {
return "Your password has been saved. Please log in.";
return i18n.text("password_saved_please_login");
}
}

View file

@ -46,14 +46,13 @@ public class UserAccountsResetPasswordPage extends UserAccountsPasswordBasePage
@Override
protected String alreadyLoggedInMessage(String currentUserEmail) {
return "You may not reset the password for " + userEmail
+ " while you are logged in as " + currentUserEmail
+ ". Please log out and try again.";
return i18n.text("cant_change_password_while_logged_in", userEmail,
currentUserEmail);
}
@Override
protected String passwordChangeNotPendingMessage() {
return "The password for " + userEmail + " has already been reset.";
return i18n.text("password_change_not_pending", userEmail);
}
@Override
@ -69,7 +68,7 @@ public class UserAccountsResetPasswordPage extends UserAccountsPasswordBasePage
FreemarkerEmailMessage email = FreemarkerEmailFactory
.createNewMessage(vreq);
email.addRecipient(TO, userAccount.getEmailAddress());
email.setSubject("Password changed.");
email.setSubject(i18n.text("password_changed_subject"));
email.setTemplate(EMAIL_TEMPLATE);
email.setBodyMap(body);
email.processTemplate();

View file

@ -4,6 +4,8 @@ package edu.cornell.mannlib.vitro.webapp.controller.accounts.user;
import static edu.cornell.mannlib.vedit.beans.LoginStatusBean.AuthenticationSource.EXTERNAL;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@ -18,6 +20,7 @@ import edu.cornell.mannlib.vitro.webapp.controller.authenticate.LoginRedirector;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.RedirectResponseValues;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
import edu.cornell.mannlib.vitro.webapp.i18n.I18n;
/**
* Parcel out the different actions required of the UserAccounts GUI.
@ -26,8 +29,6 @@ public class UserAccountsUserController extends FreemarkerHttpServlet {
private static final Log log = LogFactory
.getLog(UserAccountsUserController.class);
public static final String BOGUS_STANDARD_MESSAGE = "Request failed. Please contact your system administrator.";
private static final String ACTION_CREATE_PASSWORD = "/createPassword";
private static final String ACTION_RESET_PASSWORD = "/resetPassword";
private static final String ACTION_MY_ACCOUNT = "/myAccount";
@ -116,7 +117,7 @@ public class UserAccountsUserController extends FreemarkerHttpServlet {
return showLoginRedirection(vreq, page.getAfterLoginUrl());
} catch (LoginNotPermitted e) {
// This should have been anticipated by the page.
return showHomePage(vreq, BOGUS_STANDARD_MESSAGE);
return showHomePage(vreq, getBogusStandardMessage(vreq));
}
} else {
return page.showPage();
@ -124,7 +125,7 @@ public class UserAccountsUserController extends FreemarkerHttpServlet {
}
private ResponseValues handleInvalidRequest(VitroRequest vreq) {
return showHomePage(vreq, BOGUS_STANDARD_MESSAGE);
return showHomePage(vreq, getBogusStandardMessage(vreq));
}
private ResponseValues showHomePage(VitroRequest vreq, String message) {
@ -159,4 +160,8 @@ public class UserAccountsUserController extends FreemarkerHttpServlet {
}
return uri;
}
public static String getBogusStandardMessage(HttpServletRequest req) {
return I18n.bundle(req).text("request_failed");
}
}

View file

@ -71,3 +71,148 @@ imageUpload.errorNoPhotoSelected = Please browse and select a photo.
imageUpload.errorBadMultipartRequest = Failed to parse the multi-part request for uploading an image.
imageUpload.errorFormFieldMissing = The form did not contain a ''{0}'' field."
#
# User Accounts pages
#
account_management = Account Management
user_accounts_link = User accounts
user_accounts_title = user accounts
login_count = Login count
last_login = Last Login
add_new_account = Add new account
edit_account = Edit account
external_auth_only = Externally Authenticated Only
reset_password = Reset password
reset_password_note = Note: Instructions for resetting the password will \
be emailed to the address entered above. The password will not \
be reset until the user follows the link provided in this email.
new_password = New password
confirm_password = Confirm new password
minimum_password_length = Minimum of {0} characters in length.
leave_password_unchanged = Leaving this blank means that the password will not be changed.
confirm_initial_password = Confirm initial password
new_account_1 = A new account for
new_account_2 = was successfully created.
new_account_title = new account
new_account_notification = A notification email has been sent to {0} \
with instructions for activating the account and creating a password.
updated_account_1 = The account for
updated_account_2 = has been updated.
updated_account_title = updated account
updated_account_notification = A confirmation email has been sent to {0} \
with instructions for resetting a password. \
The password will not be reset until the user follows the link provided in this email.
deleted_accounts = Deleted {0} {0, choice, 0#accounts |1#account |1<accounts}.
enter_new_password = Please enter your new password for {0}
search_accounts_button = Search accounts
accounts_search_results = Search results for
select_account_to_delete = select this account to delete it
click_to_view_account = click to view account details
filter_by_roles = Filter by roles
view_all_accounts = View all accounts
view_all_accounts_title = view all accounts
new_account_note = Note: An email will be sent to the address entered above \
notifying that an account has been created. \
It will include instructions for activating the account and creating a password.
initial_password = Initial password
submit_add_new_account = Add new account
account_created = Your {0} account has been created.
account_created_subject Your {0} account has been created.
account_created_email_html = @@file files/accountCreatedEmail.html
account_created_email_text = @@file files/accountCreatedEmail.txt
account_created_external_email_html = @@file files/accountCreatedExternalOnlyEmail.html
account_created_external_email_text = @@file files/accountCreatedExternalOnlyEmail.txt
confirm_delete_account_singular = Are you sure you want to delete this account?
confirm_delete_account_plural = Are you sure you want to delete these accounts?
verify_this_match = verify this match
verify_this_match_title = verify this match
change_profile = change profile
change_profile_title = change profile
auth_matching_id_label = External Auth. ID / Matching ID
auth_id_label = External Authentication ID
auth_id_in_use = This Identifier is already in use.
auth_id_explanation = Can be used to associate the account with the user's profile via the matching property.
associated_profile_label = Associated profile:
select_associated_profile = Select the associated profile
create_associated_profile = Create the associated profile
email_changed_subject = Your {0} email account has been changed.
email_changed_html = @@file files/accountEmailChanged.html
email_changed_text = @@file files/accountEmailChanged.txt
create_your_password = Create your Password
password_created_subject = Your {0} password has successfully been created.
password_created_email_html = @@file files/passwordCreatedEmail.html
password_created_email_text = @@file files/passwordCreatedEmail.txt
password_reset_pending_subject = {0} reset password request
password_reset_pending_email_html = @@file files/passwordResetPending.html
password_reset_pending_email_text = @@file files/passwordResetPending.txt
password_reset_complete_subject = Your {0} password changed.
password_reset_complete_email_html = @@file files/passwordResetComplete.html
password_reset_complete_email_text = @@file files/passwordResetComplete.txt
reset_your_password = Reset your Password
first_time_login = First time log in
create_account = Create account
cant_activate_while_logged_in = You may not activate the account for {0} while you are logged in as {1}.
Please log out and try again.
account_already_activated = The account for {0} has already been activated.
cant_change_password_while_logged_in = You may not reset the password for {0} while you are logged in as {1}. \
Please log out and try again.
password_change_not_pending = The password for {0} has already been reset.
password_changed_subject = Password changed.
account_no_longer_exists = The account you are trying to set a password on is no longer available. \
Please contact your system administrator if you think this is an error.
password_saved = Your password has been saved.
password_saved_please_login = Your password has been saved. Please log in.
please_provide_contact_information = Please provide your contact information to finish creating your account.
first_time_login_note = Note: An email will be sent to the address entered above notifying \
that an account has been created.
first_time_external_email_html = @@file files/accountFirstTimeExternal.html
first_time_external_email_text = @@file files/accountFirstTimeExternal.txt
myAccount_heading = My account
myAccount_confirm_changes = Your changes have been saved.
myAccount_confirm_changes_plus_note = Your changes have been saved. A confirmation email has been sent to {0}.
email_change_will_be_confirmed = Note: if email changes, a confirmation email will be sent to the new email address entered above.
email_changed_subject = "Your VIVO email account has been changed.");
who_can_edit_profile = Who can edit my profile
add_profile_editor = Add profile editor
select_existing_last_name = Select an existing last name
selected_editors = Selected editors
remove_selection = Remove selection
remove_selection_title = remove selection
external_id_not_provided = Login failed - External ID is not found.
external_id_already_in_use = User account already exists for ''{0}''
logins_disabled_for_maintenance = User logins are temporarily disabled while the system is being maintained.
error_no_email = You must supply an email address.
error_email_already_exists = An account with that email address already exists.
error_invalid_email = ''{0}'' is not a valid email address.
error_external_auth_already_exists = An account with that external authorization ID already exists.
error_no_first_name = You must supply a first name.
error_no_last_name = You must supply a last name.
error_no_role = You must select a role.
error_no_password = No password supplied.
error_password_length = Password must be between {0} and {1} characters.
error_password_mismatch = Passwords do not match.

View file

@ -0,0 +1,39 @@
<html>
<head>
<title>{1}</title>
</head>
<body>
<p>
{2} {3}
</p>
<p>
<strong>Congratulations!</strong>
</p>
<p>
We have created your new account on {0}, associated with {4}.
</p>
<p>
If you did not request this new account you can safely ignore this email.
This request will expire if not acted upon for 30 days.
</p>
<p>
Click the link below to create your password for your new account using our secure server.
</p>
<p>
<a href="{5}" title="password">{5}</a>
</p>
<p>
If the link above doesn't work, you can copy and paste the link directly into your browser's address bar.
</p>
<p>
Thanks!
</p>
</body>
</html>

View file

@ -0,0 +1,17 @@
{2} {3}
Congratulations!
We have created your new account on {0},
associated with {4}.
If you did not request this new account you can safely ignore this email.
This request will expire if not acted upon for 30 days.
Paste the link below into your browser's address bar to create your password
for your new account using our secure server.
{5}
Thanks!

View file

@ -0,0 +1,22 @@
<html>
<head>
<title>${1}</title>
</head>
<body>
<p>
${2} ${3}
</p>
<p>
<strong>Congratulations!</strong>
</p>
<p>
We have created your new VIVO account associated with ${4}.
</p>
<p>
Thanks!
</p>
</body>
</html>

View file

@ -0,0 +1,9 @@
${2} ${3}
Congratulations!
We have created your new VIVO account associated with
${4}.
Thanks!

View file

@ -0,0 +1,19 @@
<html>
<head>
<title>{1}</title>
</head>
<body>
<p>
Hi, {2} ${3}
</p>
<p>
You recently changed the email address associated with
${2} ${3}
</p>
<p>
Thank you.
</p>
</body>
</html>

View file

@ -0,0 +1,6 @@
Hi, {2} {3}
You recently changed the email address associated with
{2} {3}
Thank you.

View file

@ -0,0 +1,22 @@
<html>
<head>
<title>{1}</title>
</head>
<body>
<p>
{2} {3}
</p>
<p>
<strong>Congratulations!</strong>
</p>
<p>
We have created your new {0} account associated with {4}.
</p>
<p>
Thanks!
</p>
</body>
</html>

View file

@ -0,0 +1,8 @@
{2} {3}
Congratulations!
We have created your new {0} account associated with
{4}
Thanks!

View file

@ -0,0 +1,22 @@
<html>
<head>
<title>{1}</title>
</head>
<body>
<p>
{2} {3}
</p>
<p>
<strong>Password successfully created.</strong>
</p>
<p>
Your new password associated with {4} has been created.
</p>
<p>
Thank you.
</p>
</body>
</html>

View file

@ -0,0 +1,8 @@
{2} {3}
Password successfully created.
Your new password associated with {4}
has been created.
Thank you.

View file

@ -0,0 +1,34 @@
<html>
<head>
<title>{1}</title>
</head>
<body>
<p>
Dear {2} {3}:
</p>
<p>
We have received a request to reset the password for your {0} account ({4}).
</p>
<p>
Please follow the instructions below to proceed with your password reset.
</p>
<p>
If you did not request this new account you can safely ignore this email.
This request will expire if not acted upon within 30 days.
</p>
<p>
Click on the link below or paste it into your browser's address bar to reset your password
using our secure server.
</p>
<p>
<a href="{5}" title="password">{5}</a>
</p>
<p>Thank you!</p>
</body>
</html>

View file

@ -0,0 +1,16 @@
Dear {2} {3}:
We have received a request to reset the password for your {0} account
({4}).
Please follow the instructions below to proceed with your password reset.
If you did not request this new account you can safely ignore this email.
This request will expire if not acted upon within 30 days.
Paste the link below into your browser's address bar to reset your password
using our secure server.
{5}
Thank you!

View file

@ -0,0 +1,22 @@
<html>
<head>
<title>{1}</title>
</head>
<body>
<p>
{2} {3}
</p>
<p>
<strong>Password successfully changed.</strong>
</p>
<p>
Your new password associated with {4} has been changed.
</p>
<p>
Thank you.
</p>
</body>
</html>

View file

@ -0,0 +1,8 @@
{2} {3}
Password successfully changed.
Your new password associated with {4}
has been changed.
Thank you.

View file

@ -0,0 +1,34 @@
<html>
<head>
<title>{1}</title>
</head>
<body>
<p>
Dear {2} {3}:
</p>
<p>
We have received a request to reset the password for your {0} account ({4}).
</p>
<p>
Please follow the instructions below to proceed with your password reset.
</p>
<p>
If you did not request this new account you can safely ignore this email.
This request will expire if not acted upon within 30 days.
</p>
<p>
Click on the link below or paste it into your browser's address bar to reset your password
using our secure server.
</p>
<p>
<a href="{5}" title="password">{5}</a>
</p>
<p>Thank you!</p>
</body>
</html>

View file

@ -0,0 +1,16 @@
Dear {2} {3}:
We have received a request to reset the password for your {0} account
({4}).
Please follow the instructions below to proceed with your password reset.
If you did not request this new account you can safely ignore this email.
This request will expire if not acted upon within 30 days.
Paste the link below into your browser's address bar to reset your password
using our secure server.
{5}
Thank you!

View file

@ -45,7 +45,7 @@ $(document).ready(function(){
if (countAccount == 0){
return false;
}else{
var answer = confirm( 'Are you sure you want to delete ' + ((countAccount > 1) ? 'these accounts' : 'this account') +'?');
var answer = confirm( ((countAccount > 1) ? confirm_delete_account_plural : confirm_delete_account_singular) +'?');
return answer;
}
});

View file

@ -2,67 +2,22 @@
<#-- Confirmation that an account has been created. -->
<#assign subject = "Your ${siteName} account has been created." />
<#assign strings = i18n() />
<#assign html>
<html>
<head>
<title>${subject}</title>
</head>
<body>
<p>
${userAccount.firstName} ${userAccount.lastName}
</p>
<#assign subject = strings.account_created(siteName) />
<p>
<strong>Congratulations!</strong>
</p>
<#assign html = strings.account_created_email_html(siteName,
subject,
userAccount.firstName,
userAccount.lastName,
userAccount.emailAddress,
passwordLink) />
<p>
We have created your new account on ${siteName}, associated with ${userAccount.emailAddress}.
</p>
<p>
If you did not request this new account you can safely ignore this email.
This request will expire if not acted upon for 30 days.
</p>
<p>
Click the link below to create your password for your new account using our secure server.
</p>
<p>
<a href="${passwordLink}" title="password">${passwordLink}</a>
</p>
<p>
If the link above doesn't work, you can copy and paste the link directly into your browser's address bar.
</p>
<p>
Thanks!
</p>
</body>
</html>
</#assign>
<#assign text>
${userAccount.firstName} ${userAccount.lastName}
Congratulations!
We have created your new account on ${siteName},
associated with ${userAccount.emailAddress}.
If you did not request this new account you can safely ignore this email.
This request will expire if not acted upon for 30 days.
Paste the link below into your browser's address bar to create your password
for your new account using our secure server.
${passwordLink}
Thanks!
</#assign>
<#assign text = strings.account_created_email_text(siteName,
subject,
userAccount.firstName,
userAccount.lastName,
userAccount.emailAddress,
passwordLink) />
<@email subject=subject html=html text=text />

View file

@ -2,42 +2,18 @@
<#-- Confirmation that an account has been created. -->
<#assign subject = "Your ${siteName} account has been created." />
<#assign subject = strings.account_created(siteName) />
<#assign html>
<html>
<head>
<title>${subject}</title>
</head>
<body>
<p>
${userAccount.firstName} ${userAccount.lastName}
</p>
<#assign html = strings.account_created_external_email_html(siteName,
subject,
userAccount.firstName,
userAccount.lastName,
userAccount.emailAddress) />
<p>
<strong>Congratulations!</strong>
</p>
<p>
We have created your new VIVO account associated with ${userAccount.emailAddress}.
</p>
<p>
Thanks!
</p>
</body>
</html>
</#assign>
<#assign text>
${userAccount.firstName} ${userAccount.lastName}
Congratulations!
We have created your new VIVO account associated with
${userAccount.emailAddress}.
Thanks!
</#assign>
<#assign text = string.account_created_external_email_text(siteName,
subject,
userAccount.firstName,
userAccount.lastName,
userAccount.emailAddress) />
<@email subject=subject html=html text=text />

View file

@ -2,71 +2,54 @@
<#-- Template for adding a user account -->
<h3><a class="account-menu" href="accountsAdmin" title="add new account">User accounts</a> > Add new account</h3>
<#assign strings = i18n() />
<h3><a class="account-menu" href="accountsAdmin" title="${strings.user_accounts_title}">${strings.user_accounts_link}</a> > ${strings.add_new_account}</h3>
<#if errorEmailIsEmpty??>
<#assign errorMessage = "You must supply an email address." />
</#if>
<#if errorEmailInUse??>
<#assign errorMessage = "An account with that email address already exists." />
</#if>
<#if errorEmailInvalidFormat??>
<#assign errorMessage = "'${emailAddress}' is not a valid email address." />
</#if>
<#if errorExternalAuthIdInUse??>
<#assign errorMessage = "An account with that external authorization ID already exists." />
</#if>
<#if errorFirstNameIsEmpty??>
<#assign errorMessage = "You must supply a first name." />
</#if>
<#if errorLastNameIsEmpty??>
<#assign errorMessage = "You must supply a last name." />
</#if>
<#if errorNoRoleSelected??>
<#assign errorMessage = "You must select a role." />
</#if>
<#if errorPasswordIsEmpty??>
<#assign errorMessage = "No password supplied." />
</#if>
<#if errorPasswordIsWrongLength??>
<#assign errorMessage = "Password must be between ${minimumLength} and ${maximumLength} characters." />
</#if>
<#if errorPasswordsDontMatch??>
<#assign errorMessage = "Passwords do not match." />
<#assign errorMessage = strings.error_no_email />
<#elseif errorEmailInUse??>
<#assign errorMessage = strings.error_email_already_exists />
<#elseif errorEmailInvalidFormat??>
<#assign errorMessage = strings.error_invalid_email(emailAddress) />
<#elseif errorExternalAuthIdInUse??>
<#assign errorMessage = strings.error_external_auth_already_exists />
<#elseif errorFirstNameIsEmpty??>
<#assign errorMessage = strings.error_no_first_name />
<#elseif errorLastNameIsEmpty??>
<#assign errorMessage = strings.error_no_last_name />
<#elseif errorNoRoleSelected??>
<#assign errorMessage = strings.error_no_role />
<#elseif errorPasswordIsEmpty??>
<#assign errorMessage = strings.error_no_password />
<#elseif errorPasswordIsWrongLength??>
<#assign errorMessage = strings.error_password_length(minimumLength, maximumLength) />
<#elseif errorPasswordsDontMatch??>
<#assign errorMessage = strings.error_password_mismatch />
</#if>
<#if errorMessage?has_content>
<section id="error-alert" role="alert">
<img src="${urls.images}/iconAlert.png" width="24" height="24" alert="Error alert icon" />
<img src="${urls.images}/iconAlert.png" width="24" height="24" alert="${strings.alt_error_alert}" />
<p>${errorMessage}</p>
</section>
</#if>
<section id="add-account" role="region">
<form method="POST" action="${formUrls.add}" class="customForm" role="add new account">
<label for="email-address">Email address<span class="requiredHint"> *</span></label>
<label for="email-address">${strings.email_address}<span class="requiredHint"> *</span></label>
<input type="text" name="emailAddress" value="${emailAddress}" id="email-address" role="input" />
<label for="first-name">First name<span class="requiredHint"> *</span></label>
<label for="first-name">${strings.first_name}<span class="requiredHint"> *</span></label>
<input type="text" name="firstName" value="${firstName}" id="first-name" role="input" />
<label for="last-name">Last name<span class="requiredHint"> *</span></label>
<label for="last-name">${strings.last_name}<span class="requiredHint"> *</span></label>
<input type="text" name="lastName" value="${lastName}" id="last-name" role="input" />
<#include "userAccounts-associateProfilePanel.ftl">
<p><input id="externalAuthChkBox" type="checkbox" name="externalAuthOnly" <#if externalAuthOnly?? >checked</#if> />Externally Authenticated Only</p>
<p>Roles<span class="requiredHint"> *</span></p>
<p><input id="externalAuthChkBox" type="checkbox" name="externalAuthOnly" <#if externalAuthOnly?? >checked</#if> />${strings.external_auth_only}</p>
<p>${strings.roles}<span class="requiredHint"> *</span></p>
<#list roles as role>
<input type="radio" name="role" value="${role.uri}" role="radio" ${selectedRoles?seq_contains(role.uri)?string("checked", "")} />
<label class="inline" for="${role.label}"> ${role.label}</label>
@ -74,25 +57,21 @@
</#list>
<#if emailIsEnabled??>
<p class="note">
Note: An email will be sent to the address entered above
notifying that an account has been created.
It will include instructions for activating the account and creating a password.
</p>
<p class="note">${strings.new_account_note}</p>
<#else>
<section id="passwordContainer" role="region">
<label for="initial-password">Initial password<span class="requiredHint"> *</span></label>
<label for="initial-password">${strings.initial_password}<span class="requiredHint"> *</span></label>
<input type="password" name="initialPassword" value="${initialPassword}" id="initial-password" role="input" />
<p class="note">Minimum of ${minimumLength} characters in length.</p>
<p class="note">${strings.minimum_password_length}</p>
<label for="confirm-password">Confirm initial password<span class="requiredHint"> *</span></label>
<label for="confirm-password">${strings.confirm_initial_password}<span class="requiredHint"> *</span></label>
<input type="password" name="confirmPassword" value="${confirmPassword}" id="confirm-password" role="input" />
</section>
</#if>
<p><input type="submit" name="submitAdd" value="Add new account" class="submit" /> or <a class="cancel" href="${formUrls.list}" title="cancel">Cancel</a></p>
<p><input type="submit" name="submitAdd" value="${strings.submit_add_new_account}" class="submit" /> ${strings.or} <a class="cancel" href="${formUrls.list}" title="${strings.cancel_title}">${strings.cancel_link}</a></p>
<p class="requiredHint">* required fields</p>
<p class="requiredHint">* ${strings.required_fields}</p>
</form>
</section>

View file

@ -2,20 +2,22 @@
<#-- Template for setting the account reference field, which can also associate a profile with the user account -->
<#assign strings = i18n() />
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/edit/forms/css/autocomplete.css" />',
'<link rel="stylesheet" href="${urls.base}/js/jquery-ui/css/smoothness/jquery-ui-1.8.9.custom.css" />')}
<section id="externalAuthMatchId">
<div id="associateProfileBackgroundOne">
<div id="alignExternalAuthId">
<#if showAssociation??>
<label for="externalAuthId">External Auth. ID / Matching ID</label>
<label for="externalAuthId">${strings.auth_matching_id_label}</label>
<input type="text" name="externalAuthId" value="${externalAuthId}" id="externalAuthId" role="input "/>
<span id="externalAuthIdInUse" >This Identifier is already in use.</span>
<p class="explanatoryText">Can be used to associate the account with the user's profile via the matching property.</p>
<span id="externalAuthIdInUse" >${strings.auth_id_in_use}</span>
<p class="explanatoryText">${strings.auth_id_explanation}</p>
<#else>
<label for="externalAuthId">External Authentication ID</label>
<label for="externalAuthId">${strings.auth_id_label}</label>
<input type="text" name="externalAuthId" value="${externalAuthId}" id="externalAuthId" role="input "/>
<span id="externalAuthIdInUse" >This Identifier is already in use.</span>
<span id="externalAuthIdInUse" >${strings.auth_id_in_use}</span>
</#if>
</div>
</div>
@ -24,10 +26,10 @@ ${stylesheets.add('<link rel="stylesheet" href="${urls.base}/edit/forms/css/auto
<section id="associated">
<div id="associateProfileBackgroundTwo">
<p>
<label for="associatedProfileName">Associated profile:</label>
<label for="associatedProfileName">${strings.associated_profile_label}</label>
<span class="acSelectionInfo" id="associatedProfileName"></span>
<a href="" id="verifyProfileLink" title="verify this match">(verify this match)</a>
<a href="" id="changeProfileLink" title="change profile">(change profile)</a>
<a href="" id="verifyProfileLink" title="${strings.verify_this_match_title}">(${strings.verify_this_match})</a>
<a href="" id="changeProfileLink" title="${strings.change_profile_title}">(${strings.change_profile})</a>
</p>
<input type="hidden" id="associatedProfileUri" name="associatedProfileUri" value="" />
</div>
@ -37,16 +39,16 @@ ${stylesheets.add('<link rel="stylesheet" href="${urls.base}/edit/forms/css/auto
<section id="associationOptions">
<div id="associateProfileBackgroundThree">
<p>
<label for="associateProfileName">Select the associated profile</label>
<label for="associateProfileName">${strings.select_associated_profile}</label>
<input type="text" id="associateProfileName" name="associateProfileName" class="acSelector" size="35">
</p>
</div>
<div id="associateProfileBackgroundFour">
<p> - or - </p>
<p> - ${strings.or} - </p>
<p>
<label for="">Create the associated profile</label>
<label for="">${strings.create_associated_profile}</label>
<select name="newProfileClassUri" id="newProfileClassUri" >
<option value="" selected="selected">Select one</option>
<option value="" selected="selected">${strings.select_one}</option>
<#list profileTypes?keys as key>
<option value="${key}" <#if newProfileClassUri = key> selected </#if> >${profileTypes[key]}</option>
</#list>

View file

@ -2,37 +2,20 @@
<#-- Confirmation that the user has changed his email account. -->
<#assign subject = "Your ${siteName} email account has been changed." />
<#assign strings = i18n() />
<#assign html>
<html>
<head>
<title>${subject}</title>
</head>
<body>
<p>
Hi, ${userAccount.firstName} ${userAccount.lastName}
</p>
<#assign subject = strings.email_changed_subject(siteName) />
<p>
You recently changed the email address associated with
${userAccount.firstName} ${userAccount.lastName}
</p>
<#assign html = strings.email_changed_html(siteName,
subject,
userAccount.firstName,
userAccount.lastName,
userAccount.emailAddress) />
<p>
Thank you.
</p>
</body>
</html>
</#assign>
<#assign text>
Hi, ${userAccount.firstName} ${userAccount.lastName}
You recently changed the email address associated with
${userAccount.firstName} ${userAccount.lastName}
Thank you.
</#assign>
<#assign text = strings.email_changed_text(siteName,
subject,
userAccount.firstName,
userAccount.lastName,
userAccount.emailAddress) />
<@email subject=subject html=html text=text />

View file

@ -2,44 +2,43 @@
<#-- Template for adding a user account -->
<h3>Create your Password</h3>
<#if errorPasswordIsEmpty??>
<#assign errorMessage = "No password supplied." />
</#if>
<#assign strings = i18n() />
<#if errorPasswordIsWrongLength??>
<#assign errorMessage = "Password must be between ${minimumLength} and ${maximumLength} characters." />
</#if>
<h3>${strings.create_your_password}</h3>
<#if errorPasswordsDontMatch??>
<#assign errorMessage = "Passwords do not match." />
</#if>
<#if errorPasswordIsEmpty??>
<#assign errorMessage = strings.error_no_password />
<#elseif errorPasswordIsWrongLength??>
<#assign errorMessage = strings.error_password_length(minimumLength, maximumLength) />
<#elseif errorPasswordsDontMatch??>
<#assign errorMessage = strings.error_password_mismatch />
</#if>
<#if errorMessage?has_content>
<section id="error-alert" role="alert">
<img src="${urls.images}/iconAlert.png" width="24" height="24" alert="Error alert icon"/>
<p>${errorMessage}</p>
</section>
</#if>
<#if errorMessage?has_content>
<section id="error-alert" role="alert">
<img src="${urls.images}/iconAlert.png" width="24" height="24" alert="${strings.alt_error_alert}"/>
<p>${errorMessage}</p>
</section>
</#if>
<section id="create-password" role="region">
<p>Please enter your new password for ${userAccount.emailAddress}</p>
<p>${strings.enter_new_password(userAccount.emailAddress)}</p>
<form method="POST" action="${formUrls.createPassword}" class="customForm" role="create password">
<input type="hidden" name="user" value="${userAccount.emailAddress}" role="input" />
<input type="hidden" name="key" value="${userAccount.passwordLinkExpiresHash}" role="input" />
<label for="new-password">Password<span class="requiredHint"> *</span></label>
<label for="new-password">${strings.new_password}<span class="requiredHint"> *</span></label>
<input type="password" name="newPassword" value="${newPassword}" id="new-password" role="input" />
<p class="note">Minimum of ${minimumLength} characters in length.</p>
<p class="note">${strings.minimum_password_length(minimumLength)}</p>
<label for="confirm-password">Confirm Password<span class="requiredHint"> *</span></label>
<label for="confirm-password">${strings.confirm_password}<span class="requiredHint"> *</span></label>
<input type="password" name="confirmPassword" value="${confirmPassword}" id="confirm-password" role="input" />
<p><input type="submit" name="submit" value="Save changes" class="submit"/></p>
<p><input type="submit" name="submit" value="${strings.save_changes}" class="submit"/></p>
<p class="requiredHint">* required fields</p>
<p class="requiredHint">* ${strings.required_fields}</p>
</form>
</section>

View file

@ -2,75 +2,58 @@
<#-- Template for editing a user account -->
<h3><a class="account-menu" href="accountsAdmin" title="edit account">User accounts</a> > Edit account</h3>
<#assign strings = i18n() />
<h3><a class="account-menu" href="accountsAdmin" title="${strings.user_accounts_title}">${strings.user_accounts_link}</a> > ${strings.edit_account}</h3>
<#if errorEmailIsEmpty??>
<#assign errorMessage = "You must supply an email address." />
</#if>
<#if errorEmailInUse??>
<#assign errorMessage = "An account with that email address already exists." />
</#if>
<#if errorEmailInvalidFormat??>
<#assign errorMessage = "'${emailAddress}' is not a valid email address." />
</#if>
<#if errorExternalAuthIdInUse??>
<#assign errorMessage = "An account with that external authorization ID already exists." />
</#if>
<#if errorFirstNameIsEmpty??>
<#assign errorMessage = "You must supply a first name." />
</#if>
<#if errorLastNameIsEmpty??>
<#assign errorMessage = "You must supply a last name." />
</#if>
<#if errorNoRoleSelected??>
<#assign errorMessage = "You must select a role." />
</#if>
<#if errorPasswordIsEmpty??>
<#assign errorMessage = "No password supplied." />
</#if>
<#if errorPasswordIsWrongLength??>
<#assign errorMessage = "Password must be between ${minimumLength} and ${maximumLength} characters." />
</#if>
<#if errorPasswordsDontMatch??>
<#assign errorMessage = "Passwords do not match." />
<#assign errorMessage = strings.error_no_email />
<#elseif errorEmailInUse??>
<#assign errorMessage = strings.error_email_already_exists />
<#elseif errorEmailInvalidFormat??>
<#assign errorMessage = strings.error_invalid_email(emailAddress) />
<#elseif errorExternalAuthIdInUse??>
<#assign errorMessage = strings.error_external_auth_already_exists />
<#elseif errorFirstNameIsEmpty??>
<#assign errorMessage = strings.error_no_first_name />
<#elseif errorLastNameIsEmpty??>
<#assign errorMessage = strings.error_no_last_name />
<#elseif errorNoRoleSelected??>
<#assign errorMessage = strings.error_no_role />
<#elseif errorPasswordIsEmpty??>
<#assign errorMessage = strings.error_no_password />
<#elseif errorPasswordIsWrongLength??>
<#assign errorMessage = strings.error_password_length(minimumLength, maximumLength) />
<#elseif errorPasswordsDontMatch??>
<#assign errorMessage = strings.error_password_mismatch />
</#if>
<#if errorMessage?has_content>
<section id="error-alert" role="alert">
<img src="${urls.images}/iconAlert.png" width="24" height="24" alert="Error alert icon" />
<img src="${urls.images}/iconAlert.png" width="24" height="24" alert="${strings.alt_error_alert}" />
<p>${errorMessage}</p>
</section>
</#if>
<section id="edit-account" role="region">
<form method="POST" action="${formUrls.edit}" id="userAccountForm" class="customForm" role="edit account">
<label for="email-address">Email address<span class="requiredHint"> *</span></label>
<label for="email-address">${strings.email_address}<span class="requiredHint"> *</span></label>
<input type="text" name="emailAddress" value="${emailAddress}" id="email-address" role="input" />
<label for="first-name">First name<span class="requiredHint"> *</span></label>
<label for="first-name">${strings.first_name}<span class="requiredHint"> *</span></label>
<input type="text" name="firstName" value="${firstName}" id="first-name" role="input" />
<label for="last-name">Last name<span class="requiredHint"> *</span></label>
<label for="last-name">${strings.last_name}<span class="requiredHint"> *</span></label>
<input type="text" name="lastName" value="${lastName}" id="last-name" role="input" />
<#if externalAuthPermitted??>
<#include "userAccounts-associateProfilePanel.ftl">
<p><input id="externalAuthChkBox" type="checkbox" name="externalAuthOnly" <#if externalAuthOnly?? >checked</#if> />Externally Authenticated Only</p>
<p><input id="externalAuthChkBox" type="checkbox" name="externalAuthOnly" <#if externalAuthOnly?? >checked</#if> />${strings.external_auth_only}</p>
</#if>
<#if roles?has_content>
<p>Roles<span class="requiredHint"> *</span></p>
<p>${strings.roles}<span class="requiredHint"> *</span></p>
<#list roles as role>
<input type="radio" name="role" value="${role.uri}" role="radio" ${selectedRoles?seq_contains(role.uri)?string("checked", "")} />
<label class="inline" for="${role.label}"> ${role.label}</label>
@ -81,29 +64,25 @@
<#if emailIsEnabled??>
<section id="pwdResetContainer" <#if externalAuthOnly?? >class="hidden"</#if> role="region">
<input type="checkbox" name="resetPassword" value="" id="reset-password" role="checkbox" <#if resetPassword??>checked</#if> />
<label class="inline" for="reset-password"> Reset password</label>
<label class="inline" for="reset-password">${strings.reset_password}</label>
<p class="note">
Note: Instructions for resetting the password will
be emailed to the address entered above. The password will not
be reset until the user follows the link provided in this email.
</p>
<p class="note">${strings.reset_password_note}</p>
</section>
<#else>
<section id="passwordContainer" <#if externalAuthOnly?? >class="hidden"</#if> role="region">
<label for="new-password">New password</label>
<label for="new-password">${strings.new_password}</label>
<input type="password" name="newPassword" value="${newPassword}" id="new-password" role="input" />
<p class="note">Minimum of ${minimumLength} characters in length.<br />
Leaving this blank means that the password will not be changed.</p>
<p class="note">${strings.minimum_password_length(minimumLength)}<br />
${strings.leave_password_unchanged}</p>
<label for="confirm-password">Confirm new password</label>
<label for="confirm-password">${strings.confirm_password}</label>
<input type="password" name="confirmPassword" value="${confirmPassword}" id="confirm-password" role="input" />
</section>
</#if>
<p><input type="submit" id="submitMyAccount" name="submitEdit" value="Save changes" class="submit" disabled /> or <a class="cancel" href="${formUrls.list}" title="cancel">Cancel</a></p>
<p><input type="submit" id="submitMyAccount" name="submitEdit" value="${strings.save_changes}" class="submit" disabled /> ${strings.or} <a class="cancel" href="${formUrls.list}" title="${strings.cancel_title}">${strings.cancel_link}</a></p>
<p class="requiredHint">* required fields</p>
<p class="requiredHint">* ${strings.required_fields}</p>
</form>
</section>

View file

@ -2,59 +2,55 @@
<#-- Template for creating an account for the first time an external user logs in. -->
<h3>First time log in</h3>
<#assign strings = i18n() />
<h3>${strings.first_time_login}</h3>
<#if errorEmailIsEmpty??>
<#assign errorMessage = "You must supply an email address." />
</#if>
<#if errorEmailInUse??>
<#assign errorMessage = "An account with that email address already exists." />
</#if>
<#if errorEmailInvalidFormat??>
<#assign errorMessage = "'${emailAddress}' is not a valid email address." />
</#if>
<#if errorFirstNameIsEmpty??>
<#assign errorMessage = "You must supply a first name." />
</#if>
<#if errorLastNameIsEmpty??>
<#assign errorMessage = "You must supply a last name." />
<#assign errorMessage = strings.error_no_email />
<#elseif errorEmailInUse??>
<#assign errorMessage = strings.error_email_already_exists />
<#elseif errorEmailInvalidFormat??>
<#assign errorMessage = strings.error_invalid_email(emailAddress) />
<#elseif errorFirstNameIsEmpty??>
<#assign errorMessage = strings.error_no_first_name />
<#elseif errorLastNameIsEmpty??>
<#assign errorMessage = strings.error_no_last_name />
</#if>
<#if errorMessage?has_content>
<section id="error-alert" role="alert">
<img src="${urls.images}/iconAlert.png" width="24" height="24" alert="Error alert icon"/>
<img src="${urls.images}/iconAlert.png" width="24" height="24" alert="${strings.alt_error_alert}" />
<p>${errorMessage}</p>
</section>
</#if>
<section id="first-time-login" role="region">
<p>Please provide your contact information to finish creating your account.</p>
<p>${strings.please_provide_contact_information}</p>
<form method="POST" action="${formUrls.firstTimeExternal}" class="customForm" role="my account">
<input type="hidden" name="externalAuthId" value="${externalAuthId}" role="input" />
<input type="hidden" name="afterLoginUrl" value="${afterLoginUrl}" role="input" />
<label for="first-name">First name<span class="requiredHint"> *</span></label>
<label for="first-name">${strings.first_name}<span class="requiredHint"> *</span></label>
<input type="text" name="firstName" value="${firstName}" id="first-name" role="input" />
<label for="last-name">Last name<span class="requiredHint"> *</span></label>
<label for="last-name">${strings.last_name}<span class="requiredHint"> *</span></label>
<input type="text" name="lastName" value="${lastName}" id="last-name" role="input" />
<label for="email-address">Email address<span class="requiredHint"> *</span></label>
<label for="email-address">${strings.email_address}<span class="requiredHint"> *</span></label>
<input type="text" name="emailAddress" value="${emailAddress}" id="email-address" role="input" />
<#if emailIsEnabled??>
<p class="note">
Note: An email will be sent to the address entered above notifying
that an account has been created.
</p>
<p class="note">${strings.first_time_login_note}</p>
</#if>
<p><input type="submit" name="submit" value="Create account" class="submit"/> or <a class="cancel" href="${urls.home}" title="cancel">Cancel</a></p>
<p><input type="submit" name="submit" value="${strings.create_account}" class="submit"/>
${strings.or}
<a class="cancel" href="${urls.home}" title="${string.cancel_title}">${strings.cancel_link}</a>
</p>
<p class="requiredHint">* ${strings.required_fields}</p>
</form>
</section>

View file

@ -2,42 +2,20 @@
<#-- Confirmation that an account has been created for an externally-authenticated user. -->
<#assign subject = "Your ${siteName} account has been created." />
<#assign strings = i18n() />
<#assign html>
<html>
<head>
<title>${subject}</title>
</head>
<body>
<p>
${userAccount.firstName} ${userAccount.lastName}
</p>
<#assign subject = strings.account_created(siteName) />
<p>
<strong>Congratulations!</strong>
</p>
<#assign html = strings.first_time_external_email_html(siteName,
subject,
userAccount.firstName,
userAccount.lastName,
userAccount.emailAddress) />
<p>
We have created your new VIVO account associated with ${userAccount.emailAddress}.
</p>
<p>
Thanks!
</p>
</body>
</html>
</#assign>
<#assign text>
${userAccount.firstName} ${userAccount.lastName}
Congratulations!
We have created your new VIVO account associated with
${userAccount.emailAddress}.
Thanks!
</#assign>
<#assign text = strings.first_time_external_email_text(siteName,
subject,
userAccount.firstName,
userAccount.lastName,
userAccount.emailAddress) />
<@email subject=subject html=html text=text />

View file

@ -4,20 +4,19 @@
<#import "userAccounts-accountsNav.ftl" as p>
<#assign strings = i18n() />
<form method="POST" action="${formUrls.add}" id="add-account" class="customForm" role="Add account">
<h3><span>User accounts | </span><input type="submit" class="submit add-account" value="Add new account" /></h3>
<h3><span>${strings.user_accounts_link} | </span><input type="submit" class="submit add-account" value="${strings.add_new_account}" /></h3>
</form>
<#if newUserAccount?? >
<section class="account-feedback">
<p>
A new account for
<a href="${newUserAccount.editUrl}" title="new account">${newUserAccount.firstName} ${newUserAccount.lastName}</a>
was successfully created.
<#if emailWasSent?? >
A notification email has been sent to ${newUserAccount.emailAddress}
with instructions for activating the account and creating a password.
</#if>
${strings.new_account_1}
<a href="${newUserAccount.editUrl}" title="${strings.new_account_title}">${newUserAccount.firstName} ${newUserAccount.lastName}</a>
${strings.new_account_2}
<#if emailWasSent?? >${strings.new_account_notification(newUserAccount.emailAddress)}</#if>
</p>
</section>
</#if>
@ -25,14 +24,10 @@
<#if updatedUserAccount?? >
<section class="account-feedback">
<p>
The account for
<a href="${updatedUserAccount.editUrl}" title="updated account">${updatedUserAccount.firstName} ${updatedUserAccount.lastName}</a>
has been updated.
<#if emailWasSent?? >
A confirmation email has been sent to ${updatedUserAccount.emailAddress}
with instructions for resetting a password.
The password will not be reset until the user follows the link provided in this email.
</#if>
${strings.updated_account_1}
<a href="${updatedUserAccount.editUrl}" title="${strings.updated_account_title}}">${updatedUserAccount.firstName} ${updatedUserAccount.lastName}</a>
${strings.updated_account_2}
<#if emailWasSent?? >${strings.updated_account_notification(updatedUserAccount.emailAddress)}</#if>
</p>
</section>
</#if>
@ -40,7 +35,7 @@
<#if deletedAccountCount?? >
<section class="account-feedback">
<p>
Deleted ${deletedAccountCount} accounts.
${strings.deleted_accounts(deletedAccountCount)}
</p>
</section>
</#if>
@ -48,7 +43,7 @@
<section id="filter-roles">
<form method="POST" action="${formUrls.list}" class="customForm" role="filter by roles">
<select name="roleFilterUri" id="roleFilterUri">
<option value="" <#if roleFilterUri = "">selected</#if> >Filter by roles</option>
<option value="" <#if roleFilterUri = "">selected</#if> >${strings.filter_by_roles}</option>
<#list roles as role>
<option value="${formUrls.list}?roleFilterUri=${role.uri?url}" <#if roleFilterUri = role.uri>selected</#if> >${role.label}</option>
</#list>
@ -60,7 +55,7 @@
</select>
<#if roleFilterUri?has_content>
<span><a href="${formUrls.list}" title="view all acounts"> View all accounts</a></span>
<span><a href="${formUrls.list}" title="${strings.view_all_accounts_title}">${strings.view_all_accounts}</a></span>
</#if>
</form>
</section>
@ -68,7 +63,7 @@
<section id="search-accounts">
<form method="POST" action="${formUrls.list}" class="customForm" role="search accounts">
<input type="text" name="searchTerm" />
<input class="submit" type="submit" value="Search accounts"/>
<input class="submit" type="submit" value="${strings.search_accounts_button}"/>
<!--
When searchTerm changes,
set pageIndex to 1
@ -80,64 +75,64 @@
</section>
<#if searchTerm?has_content>
<section id="search-feedback">
<p>Search results for "<strong>${searchTerm}</strong>" | <span><a href="${formUrls.list}" title="view all accounts"> View all accounts</a></span></p>
<p>${strings.accounts_search_results} "<strong>${searchTerm}</strong>" | <span><a href="${formUrls.list}" title="${strings.view_all_accounts_title}">${strings.view_all_accounts}</a></span></p>
</section>
</#if>
<form method="POST" action="${formUrls.list}" id="account-display" class="customForm" role="accounts display">
<@p.accountsNav />
<table id="account">
<caption>Account Management</caption>
<caption>${strings.account_management}</caption>
<thead>
<tr>
<th scope="col"> <input class="delete-all hidden" type="checkbox" name="delete-all">
Email Address
${strings.email_address}
<nav class="account-alpha-browse">
<a class="sort-asc" href="?accountsPerPage=${accountsPerPage}&orderField=email&orderDirection=ASC" title="ascending order"></a>
<a class="sort-desc" href="?accountsPerPage=${accountsPerPage}&orderField=email&orderDirection=DESC" title="descending order"></a>
<a class="sort-asc" href="?accountsPerPage=${accountsPerPage}&orderField=email&orderDirection=ASC" title="${strings.ascending_order}"></a>
<a class="sort-desc" href="?accountsPerPage=${accountsPerPage}&orderField=email&orderDirection=DESC" title="${strings.descending_order}"></a>
</nav>
</th>
<th scope="col">
First name
${strings.first_name}
<nav class="account-alpha-browse">
<a class="sort-asc" href="?accountsPerPage=${accountsPerPage}&orderField=firstName&orderDirection=ASC" title="ascending order"></a>
<a class="sort-desc" href="?accountsPerPage=${accountsPerPage}&orderField=firstName&orderDirection=DESC" title="descending order"></a>
<a class="sort-asc" href="?accountsPerPage=${accountsPerPage}&orderField=firstName&orderDirection=ASC" title="${strings.ascending_order}"></a>
<a class="sort-desc" href="?accountsPerPage=${accountsPerPage}&orderField=firstName&orderDirection=DESC" title="${strings.descending_order}"></a>
</nav>
</th>
<th scope="col">
Last name
${strings.last_name}
<nav class="account-alpha-browse">
<a class="sort-asc" href="?accountsPerPage=${accountsPerPage}&orderField=lastName&orderDirection=ASC" title="ascending order"></a>
<a class="sort-desc" href="?accountsPerPage=${accountsPerPage}&orderField=lastName&orderDirection=DESC" title="descending order"></a>
<a class="sort-asc" href="?accountsPerPage=${accountsPerPage}&orderField=lastName&orderDirection=ASC" title="${strings.ascending_order}"></a>
<a class="sort-desc" href="?accountsPerPage=${accountsPerPage}&orderField=lastName&orderDirection=DESC" title="${strings.descending_order}"></a>
</nav>
</th>
<th scope="col">
Status
${strings.status}
<nav class="account-alpha-browse">
<a class="sort-asc" href="?accountsPerPage=${accountsPerPage}&orderField=status&orderDirection=ASC" title="ascending order"></a>
<a class="sort-desc" href="?accountsPerPage=${accountsPerPage}&orderField=status&orderDirection=DESC" title="descending order"></a>
<a class="sort-asc" href="?accountsPerPage=${accountsPerPage}&orderField=status&orderDirection=ASC" title="${strings.ascending_order}"></a>
<a class="sort-desc" href="?accountsPerPage=${accountsPerPage}&orderField=status&orderDirection=DESC" title="${strings.descending_order}"></a>
</nav>
</th>
<th scope="col">Roles</th>
<th scope="col">${strings.roles}</th>
<th scope="col">
Login&nbsp;count
${strings.login_count}
<nav class="account-alpha-browse">
<a class="sort-asc" href="?accountsPerPage=${accountsPerPage}&orderField=count&orderDirection=ASC" title="ascending order"></a>
<a class="sort-desc" href="?accountsPerPage=${accountsPerPage}&orderField=count&orderDirection=DESC" title="descending order"></a>
<a class="sort-asc" href="?accountsPerPage=${accountsPerPage}&orderField=count&orderDirection=ASC" title="${strings.ascending_order}"></a>
<a class="sort-desc" href="?accountsPerPage=${accountsPerPage}&orderField=count&orderDirection=DESC" title="${strings.descending_order}"></a>
</nav>
</th>
<th scope="col">
Last&nbsp;Login
${strings.last_login}
<nav class="account-alpha-browse">
<a class="sort-asc" href="?accountsPerPage=${accountsPerPage}&orderField=lastLogin&orderDirection=ASC" title="ascending order"></a>
<a class="sort-desc" href="?accountsPerPage=${accountsPerPage}&orderField=lastLogin&orderDirection=DESC" title="descending order"></a>
<a class="sort-asc" href="?accountsPerPage=${accountsPerPage}&orderField=lastLogin&orderDirection=ASC" title="${strings.ascending_order}"></a>
<a class="sort-desc" href="?accountsPerPage=${accountsPerPage}&orderField=lastLogin&orderDirection=DESC" title="${strings.descending_order}"></a>
</nav>
</th>
</tr>
@ -148,7 +143,7 @@
<tr>
<td>
<#if account.deletable>
<input type="checkbox" name="deleteAccount" value="${account.uri}" title="select this account to delete it"/>
<input type="checkbox" name="deleteAccount" value="${account.uri}" title="${strings.select_account_to_delete}"/>
<#assign disableDeleteAccount = '' />
<!-- ignored unless submit action is formUrls.delete -->
<#else>
@ -156,7 +151,7 @@
</#if>
<#if account.editUrl != "">
<a ${disableDeleteAccount} href="${account.editUrl}" title="click to view account details">${account.emailAddress}</a>
<a ${disableDeleteAccount} href="${account.editUrl}" title="${strings.click_to_view_account}">${account.emailAddress}</a>
<!-- when this link is clicked, editAccount is noticed and all other fields are ignored. -->
<#else>
${account.emailAddress}
@ -185,5 +180,10 @@
<@p.accountsNav />
</form>
<script type="text/javascript">
confirm_delete_account_singular = "${strings.confirm_delete_account_singular}"
confirm_delete_account_plural = "${strings.confirm_delete_account_plural}"
</script>
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/account/account.css" />')}
${scripts.add('<script type="text/javascript" src="${urls.base}/js/account/accountUtils.js"></script>')}

View file

@ -2,58 +2,48 @@
<#-- Template for editing a user account -->
<h3>My account</h3>
<#assign strings = i18n() />
<h3>${strings.myAccount_heading}</h3>
<#if errorEmailIsEmpty??>
<#assign errorMessage = "You must supply an email address." />
</#if>
<#if errorEmailInUse??>
<#assign errorMessage = "An account with that email address already exists." />
</#if>
<#if errorEmailInvalidFormat??>
<#assign errorMessage = "'${emailAddress}' is not a valid email address." />
</#if>
<#if errorFirstNameIsEmpty??>
<#assign errorMessage = "You must supply a first name." />
</#if>
<#if errorLastNameIsEmpty??>
<#assign errorMessage = "You must supply a last name." />
</#if>
<#if errorPasswordIsEmpty??>
<#assign errorMessage = "No password supplied." />
</#if>
<#if errorPasswordIsWrongLength??>
<#assign errorMessage = "Password must be between ${minimumLength} and ${maximumLength} characters." />
</#if>
<#if errorPasswordsDontMatch??>
<#assign errorMessage = "Passwords do not match." />
<#assign errorMessage = strings.error_no_email />
<#elseif errorEmailInUse??>
<#assign errorMessage = strings.error_email_already_exists />
<#elseif errorEmailInvalidFormat??>
<#assign errorMessage = strings.error_invalid_email(emailAddress) />
<#elseif errorFirstNameIsEmpty??>
<#assign errorMessage = strings.error_no_first_name />
<#elseif errorLastNameIsEmpty??>
<#assign errorMessage = strings.error_no_last_name />
<#elseif errorNoRoleSelected??>
<#assign errorMessage = strings.error_no_role />
<#elseif errorPasswordIsEmpty??>
<#assign errorMessage = strings.error_no_password />
<#elseif errorPasswordIsWrongLength??>
<#assign errorMessage = strings.error_password_length(minimumLength, maximumLength) />
<#elseif errorPasswordsDontMatch??>
<#assign errorMessage = strings.error_password_mismatch />
</#if>
<#if errorMessage?has_content>
<section id="error-alert" role="alert">
<img src="${urls.images}/iconAlert.png" width="24" height="24" alert="Error alert icon"/>
<img src="${urls.images}/iconAlert.png" width="24" height="24" alert="${strings.alt_error_alert}" />
<p>${errorMessage}</p>
</section>
</#if>
<#if confirmChange??>
<#assign confirmMessage = "Your changes have been saved." />
<#assign confirmMessage = strings.myAccount_confirm_changes />
</#if>
<#if confirmEmailSent??>
<#assign confirmMessage = "Your changes have been saved. A confirmation email has been sent to ${emailAddress}." />
<#assign confirmMessage = strings.myAccount_confirm_changes_plus_note(emailAddress) />
</#if>
<#if confirmMessage?has_content>
<section class="account-feedback" role="alert">
<p><img class="middle" src="${urls.images}/iconConfirmation.png" alert="Confirmation icon"/> ${confirmMessage}</p>
<p><img class="middle" src="${urls.images}/iconConfirmation.png" alt="${strings.alt_confirmation}"/> ${confirmMessage}</p>
</section>
</#if>
@ -63,30 +53,34 @@
<#include "userAccounts-myProxiesPanel.ftl">
</#if>
<label for="email-address">Email address<span class="requiredHint"> *</span></label>
<label for="email-address">${strings.email_address}<span class="requiredHint"> *</span></label>
<input type="text" name="emailAddress" value="${emailAddress}" id="email-address" role="input" />
<p class="note">Note: if email changes, a confirmation email will<br />be sent to the new email address entered above.</p>
<p class="note">${strings.email_change_will_be_confirmed}</p>
<label for="first-name">First name<span class="requiredHint"> *</span></label>
<label for="first-name">${strings.first_name}<span class="requiredHint"> *</span></label>
<input type="text" name="firstName" value="${firstName}" id="first-name" role="input" />
<label for="last-name">Last name<span class="requiredHint"> *</span></label>
<label for="last-name">${strings.last_name}<span class="requiredHint"> *</span></label>
<input type="text" name="lastName" value="${lastName}" id="last-name" role="input" />
<#if !externalAuth??>
<label for="new-password">New password</label>
<label for="new-password">${strings.new_password}</label>
<input type="password" name="newPassword" value="${newPassword}" id="new-password" role="input" />
<p class="note">Minimum of ${minimumLength} characters in length.<br />If left blank, the password will not be changed.</p>
<p class="note">${strings.minimum_password_length(minimumLength)}<br />${strings.leave_password_unchanged}</p>
<label for="confirm-password">Confirm new password</label>
<label for="confirm-password">${strings.confirm_password}</label>
<input type="password" name="confirmPassword" value="${confirmPassword}" id="confirm-password" role="input" />
</#if>
<p><input type="submit" id="submitMyAccount" name="submitMyAccount" value="Save changes" class="submit" disabled /> or <a class="cancel" href="${urls.referringPage}" title="cancel">Cancel</a></p>
<p>
<input type="submit" id="submitMyAccount" name="submitMyAccount" value="${strings.save_changes}" class="submit" disabled />
${strings.or}
<a class="cancel" href="${urls.referringPage}" title="${strings.cancel_title}">${strings.cancel_link}</a>
</p>
<p class="requiredHint">* required fields</p>
<p class="requiredHint">* ${strings.required_fields}</p>
</form>
</section>

View file

@ -2,15 +2,21 @@
<#-- Template for setting the account reference field, which can also associate a profile with the user account -->
<#assign strings = i18n() />
<section id="edit-myProxy" name="proxyProxiesPanel" role="region">
<h4>Who can edit my profile</h4>
<h4>${strings.who_can_edit_profile}</h4>
<label for="addProfileEditor">Add profile editor</label>
<input id="addProfileEditor" type="text" name="proxySelectorAC" class="acSelector" size="35" value="Select an existing last name" role="input" /><span><img class="loading-profileMyAccoount hidden" src="${urls.images}/indicatorWhite.gif" /></span>
<label for="addProfileEditor">${strings.add_profile_editor}</label>
<input id="addProfileEditor" type="text" name="proxySelectorAC" class="acSelector" size="35"
value="${strings.select_existing_last_name}" role="input" />
<span><img class="loading-profileMyAccoount hidden" src="${urls.images}/indicatorWhite.gif" /></span>
<p class="search-status"><span name='proxySelectorSearchStatus' moreCharsText='type more characters' noMatchText='no match'>&nbsp;</span></p>
<p class="search-status">
<span name='proxySelectorSearchStatus' moreCharsText='${strings.type_more_characters}' noMatchText='${strings.no_match}'>&nbsp;</span>
</p>
<p name="excludeUri" style="display: none">${myAccountUri}<p>
<p class="selected-editors">Selected editors:</p>
<p class="selected-editors">${strings.selected_editors}:</p>
<#-- Magic ul that holds all of the proxy data and the template that shows how to display it. -->
<ul name="proxyData" role="navigation">
@ -35,7 +41,7 @@
<p class="proxy-info">%label% | <span class="class-label">%classLabel%</span>
<br />
<a class='remove-proxy' href="." templatePart="remove" title="remove selection">Remove selection</a>
<a class='remove-proxy' href="." templatePart="remove" title="${strings.remove_selection_title}">${strings.remove_selection}</a>
<input type="hidden" name="proxyUri" value="%uri%" role="input" />
</p>

View file

@ -2,42 +2,20 @@
<#-- Confirmation that an password has been created. -->
<#assign subject = "Your ${siteName} password has successfully been created." />
<#assign strings = i18n() />
<#assign html>
<html>
<head>
<title>${subject}</title>
</head>
<body>
<p>
${userAccount.firstName} ${userAccount.lastName}
</p>
<#assign subject = strings.password_created_subject(siteName) />
<p>
<strong>Password successfully created.</strong>
</p>
<#assign html = strings.password_created_email_html(siteName,
subject,
userAccount.firstName,
userAccount.lastName,
userAccount.emailAddress) />
<p>
Your new password associated with ${userAccount.emailAddress} has been created.
</p>
<p>
Thank you.
</p>
</body>
</html>
</#assign>
<#assign text>
${userAccount.firstName} ${userAccount.lastName}
Password successfully created.
Your new password associated with ${userAccount.emailAddress}
has been created.
Thank you.
</#assign>
<#assign text = strings.password_created_email_text(siteName,
subject,
userAccount.firstName,
userAccount.lastName,
userAccount.emailAddress) />
<@email subject=subject html=html text=text />

View file

@ -2,42 +2,20 @@
<#-- Confirmation that a password has been reset. -->
<#assign subject = "Your ${siteName} password changed." />
<#assign strings = i18n() />
<#assign html>
<html>
<head>
<title>${subject}</title>
</head>
<body>
<p>
${userAccount.firstName} ${userAccount.lastName}
</p>
<#assign subject = strings.password_reset_complete_subject(siteName) />
<p>
<strong>Password successfully changed.</strong>
</p>
<#assign html = strings.password_reset_complete_email_html(siteName,
subject,
userAccount.firstName,
userAccount.lastName,
userAccount.emailAddress) />
<p>
Your new password associated with ${userAccount.emailAddress} has been changed.
</p>
<p>
Thank you.
</p>
</body>
</html>
</#assign>
<#assign text>
${userAccount.firstName} ${userAccount.lastName}
Password successfully changed.
Your new password associated with ${userAccount.emailAddress}
has been changed.
Thank you.
</#assign>
<#assign text = strings.password_reset_complete_email_text(siteName,
subject,
userAccount.firstName,
userAccount.lastName,
userAccount.emailAddress) />
<@email subject=subject html=html text=text />

View file

@ -2,60 +2,22 @@
<#-- Confirmation email for user account password reset -->
<#assign subject = "${siteName} reset password request" />
<#assign strings = i18n() />
<#assign html>
<html>
<head>
<title>${subject}</title>
</head>
<body>
<p>
Dear ${userAccount.firstName} ${userAccount.lastName}:
</p>
<#assign subject = strings.password_reset_pending_subject(siteName) />
<p>
We have received a request to reset the password for your ${siteName} account (${userAccount.emailAddress}).
</p>
<#assign html = strings.password_reset_pending_email_html(siteName,
subject,
userAccount.firstName,
userAccount.lastName,
userAccount.emailAddress,
passwordLink) />
<p>
Please follow the instructions below to proceed with your password reset.
</p>
<p>
If you did not request this new account you can safely ignore this email.
This request will expire if not acted upon within 30 days.
</p>
<p>
Click on the link below or paste it into your browser's address bar to reset your password
using our secure server.
</p>
<p>${passwordLink}</p>
<p>Thank you!</p>
</body>
</html>
</#assign>
<#assign text>
Dear ${userAccount.firstName} ${userAccount.lastName}:
We have received a request to reset the password for your ${siteName} account
(${userAccount.emailAddress}).
Please follow the instructions below to proceed with your password reset.
If you did not request this new account you can safely ignore this email.
This request will expire if not acted upon within 30 days.
Paste the link below into your browser's address bar to reset your password
using our secure server.
${passwordLink}
Thank you!
</#assign>
<#assign text = strings.password_reset_pending_email_text(siteName,
subject,
userAccount.firstName,
userAccount.lastName,
userAccount.emailAddress,
passwordLink) />
<@email subject=subject html=html text=text />

View file

@ -2,45 +2,43 @@
<#-- Template for adding a user account -->
<h3>Reset your Password</h3>
<#assign strings = i18n() />
<p>Please enter your new password for ${userAccount.emailAddress}</p>
<h3>${strings.reset_your_password}</h3>
<#if errorPasswordIsEmpty??>
<#assign errorMessage = "No password supplied." />
</#if>
<p>${strings.enter_new_password(userAccount.emailAddress)}</p>
<#if errorPasswordIsWrongLength??>
<#assign errorMessage = "Password must be between ${minimumLength} and ${maximumLength} characters." />
</#if>
<#if errorPasswordIsEmpty??>
<#assign errorMessage = strings.error_no_password />
<#elseif errorPasswordIsWrongLength??>
<#assign errorMessage = strings.error_password_length(minimumLength, maximumLength) />
<#elseif errorPasswordsDontMatch??>
<#assign errorMessage = strings.error_password_mismatch />
</#if>
<#if errorPasswordsDontMatch??>
<#assign errorMessage = "Passwords do not match." />
</#if>
<#if errorMessage?has_content>
<section id="error-alert" role="alert">
<img src="${urls.images}/iconAlert.png" width="24" height="24" alert="Error alert icon"/>
<p>${errorMessage}</p>
</section>
</#if>
<#if errorMessage?has_content>
<section id="error-alert" role="alert">
<img src="${urls.images}/iconAlert.png" width="24" height="24" alert="${strings.alt_error_alert}"/>
<p>${errorMessage}</p>
</section>
</#if>
<section id="reset-password" role="region">
<form method="POST" action="${formUrls.resetPassword}" class="customForm" role="create password">
<input type="hidden" name="user" value="${userAccount.emailAddress}" />
<input type="hidden" name="key" value="${userAccount.passwordLinkExpiresHash}" />
<label for="new-password">Password<span class="requiredHint"> *</span></label>
<label for="new-password">${strings.new_password}<span class="requiredHint"> *</span></label>
<input type="password" name="newPassword" value="${newPassword}" id="new-password" role="input" />
<p class="note">Minimum of ${minimumLength} characters in length.</p>
<p class="note">${strings.minimum_password_length(minimumLength)}</p>
<label for="confirm-password">Confirm Password<span class="requiredHint"> *</span></label>
<label for="confirm-password">${strings.confirm_password}<span class="requiredHint"> *</span></label>
<input type="password" name="confirmPassword" value="${confirmPassword}" id="confirm-password" role="input" />
<p><input type="submit" name="submit" value="Save changes" class="submit" /></p>
<p><input type="submit" name="submit" value="${strings.save_changes}" class="submit"/></p>
<p class="requiredHint">* required fields</p>
<p class="requiredHint">* ${strings.required_fields}</p>
</form>
</section>