login-update-password.ftl 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <#import "template.ftl" as layout>
  2. <@layout.registrationLayout displayMessage=!messagesPerField.existsError('password','password-confirm'); section>
  3. <#if section = "header">
  4. ${msg("updatePasswordTitle")}
  5. <#elseif section = "form">
  6. <form id="kc-passwd-update-form" class="${properties.kcFormClass!}" action="${url.loginAction}" method="post">
  7. <input type="text" id="username" name="username" value="${username}" autocomplete="username"
  8. readonly="readonly" style="display:none;"/>
  9. <input type="password" id="password" name="password" autocomplete="current-password" style="display:none;"/>
  10. <div class="${properties.kcFormGroupClass!}">
  11. <div class="${properties.kcLabelWrapperClass!}">
  12. <label for="password-new" class="${properties.kcLabelClass!}">${msg("passwordNew")}</label>
  13. </div>
  14. <div class="${properties.kcInputWrapperClass!}">
  15. <input type="password" id="password-new" name="password-new" class="${properties.kcInputClass!}"
  16. autofocus autocomplete="new-password"
  17. aria-invalid="<#if messagesPerField.existsError('password','password-confirm')>true</#if>"
  18. />
  19. <#if messagesPerField.existsError('password')>
  20. <span id="input-error-password" class="${properties.kcInputErrorMessageClass!}" aria-live="polite">
  21. ${kcSanitize(messagesPerField.get('password'))?no_esc}
  22. </span>
  23. </#if>
  24. </div>
  25. </div>
  26. <div class="${properties.kcFormGroupClass!}">
  27. <div class="${properties.kcLabelWrapperClass!}">
  28. <label for="password-confirm" class="${properties.kcLabelClass!}">${msg("passwordConfirm")}</label>
  29. </div>
  30. <div class="${properties.kcInputWrapperClass!}">
  31. <input type="password" id="password-confirm" name="password-confirm"
  32. class="${properties.kcInputClass!}"
  33. autocomplete="new-password"
  34. aria-invalid="<#if messagesPerField.existsError('password-confirm')>true</#if>"
  35. />
  36. <#if messagesPerField.existsError('password-confirm')>
  37. <span id="input-error-password-confirm" class="${properties.kcInputErrorMessageClass!}" aria-live="polite">
  38. ${kcSanitize(messagesPerField.get('password-confirm'))?no_esc}
  39. </span>
  40. </#if>
  41. </div>
  42. </div>
  43. <div class="${properties.kcFormGroupClass!}">
  44. <div id="kc-form-options" class="${properties.kcFormOptionsClass!}">
  45. <div class="${properties.kcFormOptionsWrapperClass!}">
  46. <#if isAppInitiatedAction??>
  47. <div class="checkbox">
  48. <label><input type="checkbox" id="logout-sessions" name="logout-sessions" value="on" checked> ${msg("logoutOtherSessions")}</label>
  49. </div>
  50. </#if>
  51. </div>
  52. </div>
  53. <div id="kc-form-buttons" class="${properties.kcFormButtonsClass!}">
  54. <#if isAppInitiatedAction??>
  55. <input class="${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!} ${properties.kcButtonLargeClass!}" type="submit" value="${msg("doSubmit")}" />
  56. <button class="${properties.kcButtonClass!} ${properties.kcButtonDefaultClass!} ${properties.kcButtonLargeClass!}" type="submit" name="cancel-aia" value="true" />${msg("doCancel")}</button>
  57. <#else>
  58. <input class="${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!} ${properties.kcButtonBlockClass!} ${properties.kcButtonLargeClass!}" type="submit" value="${msg("doSubmit")}" />
  59. </#if>
  60. </div>
  61. </div>
  62. </form>
  63. </#if>
  64. </@layout.registrationLayout>