2011-05-18 21:47:44 +00:00
|
|
|
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
|
|
|
|
|
|
|
<#-- Template for editing a user account -->
|
|
|
|
|
2011-06-13 18:48:39 +00:00
|
|
|
<h3><a class="account-menu" href="accountsAdmin">User accounts</a> > Edit account</h3>
|
2011-05-18 21:47:44 +00:00
|
|
|
|
2011-05-26 16:29:33 +00:00
|
|
|
<#if errorEmailIsEmpty??>
|
|
|
|
<#assign errorMessage = "You must supply an email address." />
|
|
|
|
</#if>
|
|
|
|
|
|
|
|
<#if errorEmailInUse??>
|
|
|
|
<#assign errorMessage = "An account with that email address already exists." />
|
|
|
|
</#if>
|
|
|
|
|
2011-06-10 15:25:41 +00:00
|
|
|
<#if errorEmailInvalidFormat??>
|
|
|
|
<#assign errorMessage = "'${emailAddress}' is not a valid email address." />
|
|
|
|
</#if>
|
|
|
|
|
2011-06-15 19:51:46 +00:00
|
|
|
<#if errorExternalAuthIdInUse??>
|
|
|
|
<#assign errorMessage = "An account with that external authorization ID already exists." />
|
|
|
|
</#if>
|
|
|
|
|
2011-05-26 16:29:33 +00:00
|
|
|
<#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." />
|
|
|
|
</#if>
|
|
|
|
|
|
|
|
<#if errorMessage?has_content>
|
|
|
|
<section id="error-alert" role="alert">
|
2011-07-11 20:39:23 +00:00
|
|
|
<img src="${urls.images}/iconAlert.png" width="24" height="24" alert="Error alert icon" />
|
2011-05-26 16:29:33 +00:00
|
|
|
<p>${errorMessage}</p>
|
|
|
|
</section>
|
|
|
|
</#if>
|
|
|
|
|
|
|
|
<section id="edit-account" role="region">
|
2011-07-06 18:55:01 +00:00
|
|
|
<form method="POST" action="${formUrls.edit}" id="userAccountForm" class="customForm" role="edit account">
|
|
|
|
<label for="email-address">Email address<span class="requiredHint"> *</span></label>
|
|
|
|
<input type="text" name="emailAddress" value="${emailAddress}" id="email-address" role="input" />
|
2011-05-26 16:29:33 +00:00
|
|
|
|
2011-07-06 18:55:01 +00:00
|
|
|
<label for="first-name">First name<span class="requiredHint"> *</span></label>
|
|
|
|
<input type="text" name="firstName" value="${firstName}" id="first-name" role="input" />
|
2011-05-26 16:29:33 +00:00
|
|
|
|
2011-07-06 18:55:01 +00:00
|
|
|
<label for="last-name">Last name<span class="requiredHint"> *</span></label>
|
|
|
|
<input type="text" name="lastName" value="${lastName}" id="last-name" role="input" />
|
2011-05-26 16:29:33 +00:00
|
|
|
|
2011-07-06 18:55:01 +00:00
|
|
|
<#include "userAccounts-associateProfilePanel.ftl">
|
2011-05-26 16:29:33 +00:00
|
|
|
|
2011-07-20 19:21:48 +00:00
|
|
|
<p><input id="externalAuthChkBox" type="checkbox" name="externalAuthOnly" <#if externalAuthOnly?? >checked</#if> />Externally Authenticated Only</p>
|
2011-07-06 18:55:01 +00:00
|
|
|
<#if roles?has_content>
|
2011-07-11 20:39:23 +00:00
|
|
|
<p>Roles<span class="requiredHint"> *</span></p>
|
2011-07-06 18:55:01 +00:00
|
|
|
<#list roles as role>
|
|
|
|
<input type="radio" name="role" value="${role.uri}" role="radio" <#if selectedRole = role.uri>checked</#if> />
|
|
|
|
<label class="inline" for="${role.label}"> ${role.label}</label>
|
|
|
|
<br />
|
|
|
|
</#list>
|
|
|
|
</#if>
|
2011-06-15 19:51:46 +00:00
|
|
|
|
2011-07-06 18:55:01 +00:00
|
|
|
<#if emailIsEnabled??>
|
2011-07-21 20:42:03 +00:00
|
|
|
<section id="pwdResetContainer" <#if externalAuthOnly?? >class="hidden"</#if> role="region">
|
2011-07-12 19:45:09 +00:00
|
|
|
<input type="checkbox" name="resetPassword" value="" id="reset-password" role="checkbox" <#if resetPassword??>checked</#if> />
|
|
|
|
<label class="inline" for="reset-password"> Reset password</label>
|
2011-05-26 16:29:33 +00:00
|
|
|
|
2011-07-12 19:45:09 +00:00
|
|
|
<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>
|
2011-07-21 20:42:03 +00:00
|
|
|
</section>
|
2011-07-06 18:55:01 +00:00
|
|
|
<#else>
|
2011-07-21 20:42:03 +00:00
|
|
|
<section id="passwordContainer" <#if externalAuthOnly?? >class="hidden"</#if> role="region">
|
2011-07-14 20:58:07 +00:00
|
|
|
<label for="new-password">New password</label>
|
|
|
|
<input type="password" name="newPassword" value="${newPassword}" id="new-password" role="input" />
|
2011-07-21 20:42:03 +00:00
|
|
|
<p class="note">Minimum of ${minimumLength} characters in length.<br />
|
2011-07-20 19:19:58 +00:00
|
|
|
Leaving this blank means that the password will not be changed.</p>
|
2011-07-21 20:42:03 +00:00
|
|
|
|
2011-07-14 20:58:07 +00:00
|
|
|
<label for="confirm-password">Confirm new password</label>
|
|
|
|
<input type="password" name="confirmPassword" value="${confirmPassword}" id="confirm-password" role="input" />
|
2011-07-21 20:42:03 +00:00
|
|
|
</section>
|
2011-07-06 18:55:01 +00:00
|
|
|
</#if>
|
2011-07-18 17:02:47 +00:00
|
|
|
|
2011-09-16 15:21:24 +00:00
|
|
|
<p><input type="submit" id="submitMyAccount" name="submitEdit" value="Save changes" class="submit" disabled /> or <a class="cancel" href="${formUrls.list}">Cancel</a></p>
|
2011-05-26 16:29:33 +00:00
|
|
|
|
2011-07-06 18:55:01 +00:00
|
|
|
<p class="requiredHint">* required fields</p>
|
|
|
|
</form>
|
2011-05-26 16:29:33 +00:00
|
|
|
</section>
|
|
|
|
|
2011-06-28 12:15:51 +00:00
|
|
|
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/account/account.css" />')}
|
2011-06-29 15:36:14 +00:00
|
|
|
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/edit/forms/css/customForm.css" />')}
|
2011-07-12 19:45:09 +00:00
|
|
|
|
2011-09-16 15:21:24 +00:00
|
|
|
${scripts.add('<script type="text/javascript" src="${urls.base}/js/jquery.js"></script>',
|
|
|
|
'<script type="text/javascript" src="${urls.base}/js/jquery-ui/js/jquery-ui-1.8.9.custom.min.js"></script>',
|
|
|
|
'<script type="text/javascript" src="${urls.base}/js/account/accountExternalAuthFlag.js"></script>',
|
|
|
|
'<script type="text/javascript" src="${urls.base}/js/account/accountListenerSetup.js"></script>')}
|