login-reset-password.ftl 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <#import "template.ftl" as layout>
  2. <@layout.registrationLayout displayInfo=true displayMessage=!messagesPerField.existsError('username'); section>
  3. <#if section = "header">
  4. ${msg("emailForgotTitle")}
  5. <#elseif section = "form">
  6. <form id="kc-reset-password-form" class="${properties.kcFormClass!}" action="${url.loginAction}" method="post">
  7. <div class="${properties.kcFormGroupClass!}">
  8. <div class="${properties.kcLabelWrapperClass!}">
  9. <label for="username" class="${properties.kcLabelClass!}"><#if !realm.loginWithEmailAllowed>${msg("username")}<#elseif !realm.registrationEmailAsUsername>${msg("usernameOrEmail")}<#else>${msg("email")}</#if></label>
  10. </div>
  11. <div class="${properties.kcInputWrapperClass!}">
  12. <input type="text" id="username" name="username" class="${properties.kcInputClass!}" autofocus value="${(auth.attemptedUsername!'')}" aria-invalid="<#if messagesPerField.existsError('username')>true</#if>"/>
  13. <#if messagesPerField.existsError('username')>
  14. <span id="input-error-username" class="${properties.kcInputErrorMessageClass!}" aria-live="polite">
  15. ${kcSanitize(messagesPerField.get('username'))?no_esc}
  16. </span>
  17. </#if>
  18. </div>
  19. </div>
  20. <div class="${properties.kcFormGroupClass!} ${properties.kcFormSettingClass!}">
  21. <div id="kc-form-options" class="${properties.kcFormOptionsClass!}">
  22. <div class="${properties.kcFormOptionsWrapperClass!}">
  23. <span><a href="${url.loginUrl}">${kcSanitize(msg("backToLogin"))?no_esc}</a></span>
  24. </div>
  25. </div>
  26. <div id="kc-form-buttons" class="${properties.kcFormButtonsClass!}">
  27. <input class="${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!} ${properties.kcButtonBlockClass!} ${properties.kcButtonLargeClass!}" type="submit" value="${msg("doSubmit")}"/>
  28. </div>
  29. </div>
  30. </form>
  31. <#elseif section = "info" >
  32. <#if realm.duplicateEmailsAllowed>
  33. ${msg("emailInstructionUsername")}
  34. <#else>
  35. ${msg("emailInstruction")}
  36. </#if>
  37. </#if>
  38. </@layout.registrationLayout>