Proof of concept - User accounts
This commit is contained in:
parent
bf2ed5c339
commit
8f1f084c5b
45 changed files with 826 additions and 610 deletions
|
@ -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>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue