-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENG-5451: added default password update UI
- Loading branch information
1 parent
bda5b22
commit dbe4f4c
Showing
1 changed file
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<#import "template.ftl" as layout> | ||
<#import "password-commons.ftl" as passwordCommons> | ||
<@layout.registrationLayout displayMessage=!messagesPerField.existsError('password','password-confirm'); section> | ||
<#if section = "header"> | ||
${msg("updatePasswordTitle")} | ||
<#elseif section = "form"> | ||
<form id="kc-passwd-update-form" class="${properties.kcFormClass!}" action="${url.loginAction}" method="post"> | ||
<div class="${properties.kcFormGroupClass!}"> | ||
<div class="${properties.kcLabelWrapperClass!}"> | ||
<label for="password-new" class="${properties.kcLabelClass!}">${msg("passwordNew")}</label> | ||
</div> | ||
<div class="${properties.kcInputWrapperClass!}"> | ||
<div class="${properties.kcInputGroup!}"> | ||
<input type="password" id="password-new" name="password-new" class="${properties.kcInputClass!}" | ||
autofocus autocomplete="new-password" | ||
aria-invalid="<#if messagesPerField.existsError('password','password-confirm')>true</#if>" | ||
/> | ||
<#-- | ||
<button class="${properties.kcFormPasswordVisibilityButtonClass!}" type="button" aria-label="${msg('showPassword')}" | ||
aria-controls="password-new" data-password-toggle | ||
data-icon-show="${properties.kcFormPasswordVisibilityIconShow!}" data-icon-hide="${properties.kcFormPasswordVisibilityIconHide!}" | ||
data-label-show="${msg('showPassword')}" data-label-hide="${msg('hidePassword')}"> | ||
<i class="${properties.kcFormPasswordVisibilityIconShow!}" aria-hidden="true"></i> | ||
</button> | ||
--> | ||
</div> | ||
|
||
<#if messagesPerField.existsError('password')> | ||
<span id="input-error-password" class="${properties.kcInputErrorMessageClass!}" aria-live="polite"> | ||
${kcSanitize(messagesPerField.get('password'))?no_esc} | ||
</span> | ||
</#if> | ||
</div> | ||
</div> | ||
|
||
<div class="${properties.kcFormGroupClass!}"> | ||
<div class="${properties.kcLabelWrapperClass!}"> | ||
<label for="password-confirm" class="${properties.kcLabelClass!}">${msg("passwordConfirm")}</label> | ||
</div> | ||
<div class="${properties.kcInputWrapperClass!}"> | ||
<div class="${properties.kcInputGroup!}"> | ||
<input type="password" id="password-confirm" name="password-confirm" | ||
class="${properties.kcInputClass!}" | ||
autocomplete="new-password" | ||
aria-invalid="<#if messagesPerField.existsError('password-confirm')>true</#if>" | ||
/> | ||
<#-- | ||
<button class="${properties.kcFormPasswordVisibilityButtonClass!}" type="button" aria-label="${msg('showPassword')}" | ||
aria-controls="password-confirm" data-password-toggle | ||
data-icon-show="${properties.kcFormPasswordVisibilityIconShow!}" data-icon-hide="${properties.kcFormPasswordVisibilityIconHide!}" | ||
data-label-show="${msg('showPassword')}" data-label-hide="${msg('hidePassword')}"> | ||
<i class="${properties.kcFormPasswordVisibilityIconShow!}" aria-hidden="true"></i> | ||
</button> | ||
--> | ||
</div> | ||
|
||
<#if messagesPerField.existsError('password-confirm')> | ||
<span id="input-error-password-confirm" class="${properties.kcInputErrorMessageClass!}" aria-live="polite"> | ||
${kcSanitize(messagesPerField.get('password-confirm'))?no_esc} | ||
</span> | ||
</#if> | ||
|
||
</div> | ||
</div> | ||
|
||
<div class="${properties.kcFormGroupClass!}"> | ||
<#-- <@passwordCommons.logoutOtherSessions/> --> | ||
<div id="kc-form-buttons" class="${properties.kcFormButtonsClass!}"> | ||
<#if isAppInitiatedAction??> | ||
<input class="${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!} ${properties.kcButtonLargeClass!}" type="submit" value="${msg("doSubmit")}" /> | ||
<button class="${properties.kcButtonClass!} ${properties.kcButtonDefaultClass!} ${properties.kcButtonLargeClass!}" type="submit" name="cancel-aia" value="true" />${msg("doCancel")}</button> | ||
<#else> | ||
<input class="${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!} ${properties.kcButtonBlockClass!} ${properties.kcButtonLargeClass!}" type="submit" value="${msg("doSubmit")}" /> | ||
</#if> | ||
</div> | ||
</div> | ||
</form> | ||
<script type="module" src="${url.resourcesPath}/js/passwordVisibility.js"></script> | ||
</#if> | ||
</@layout.registrationLayout> |