login-update-profile.ftl 5.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <#import "template.ftl" as layout>
  2. <@layout.registrationLayout displayMessage=!messagesPerField.existsError('username','email','firstName','lastName'); section>
  3. <#if section = "header">
  4. ${msg("loginProfileTitle")}
  5. <#elseif section = "form">
  6. <form id="kc-update-profile-form" class="${properties.kcFormClass!}" action="${url.loginAction}" method="post">
  7. <#if user.editUsernameAllowed>
  8. <div class="${properties.kcFormGroupClass!}">
  9. <div class="${properties.kcLabelWrapperClass!}">
  10. <label for="username" class="${properties.kcLabelClass!}">${msg("username")}</label>
  11. </div>
  12. <div class="${properties.kcInputWrapperClass!}">
  13. <input type="text" id="username" name="username" value="${(user.username!'')}"
  14. class="${properties.kcInputClass!}"
  15. aria-invalid="<#if messagesPerField.existsError('username')>true</#if>"
  16. />
  17. <#if messagesPerField.existsError('username')>
  18. <span id="input-error-username" class="${properties.kcInputErrorMessageClass!}" aria-live="polite">
  19. ${kcSanitize(messagesPerField.get('username'))?no_esc}
  20. </span>
  21. </#if>
  22. </div>
  23. </div>
  24. </#if>
  25. <div class="${properties.kcFormGroupClass!}">
  26. <div class="${properties.kcLabelWrapperClass!}">
  27. <label for="email" class="${properties.kcLabelClass!}">${msg("email")}</label>
  28. </div>
  29. <div class="${properties.kcInputWrapperClass!}">
  30. <input type="text" id="email" name="email" value="${(user.email!'')}"
  31. class="${properties.kcInputClass!}"
  32. aria-invalid="<#if messagesPerField.existsError('email')>true</#if>"
  33. />
  34. <#if messagesPerField.existsError('email')>
  35. <span id="input-error-email" class="${properties.kcInputErrorMessageClass!}" aria-live="polite">
  36. ${kcSanitize(messagesPerField.get('email'))?no_esc}
  37. </span>
  38. </#if>
  39. </div>
  40. </div>
  41. <div class="${properties.kcFormGroupClass!}">
  42. <div class="${properties.kcLabelWrapperClass!}">
  43. <label for="firstName" class="${properties.kcLabelClass!}">${msg("firstName")}</label>
  44. </div>
  45. <div class="${properties.kcInputWrapperClass!}">
  46. <input type="text" id="firstName" name="firstName" value="${(user.firstName!'')}"
  47. class="${properties.kcInputClass!}"
  48. aria-invalid="<#if messagesPerField.existsError('firstName')>true</#if>"
  49. />
  50. <#if messagesPerField.existsError('firstName')>
  51. <span id="input-error-firstname" class="${properties.kcInputErrorMessageClass!}" aria-live="polite">
  52. ${kcSanitize(messagesPerField.get('firstName'))?no_esc}
  53. </span>
  54. </#if>
  55. </div>
  56. </div>
  57. <div class="${properties.kcFormGroupClass!}">
  58. <div class="${properties.kcLabelWrapperClass!}">
  59. <label for="lastName" class="${properties.kcLabelClass!}">${msg("lastName")}</label>
  60. </div>
  61. <div class="${properties.kcInputWrapperClass!}">
  62. <input type="text" id="lastName" name="lastName" value="${(user.lastName!'')}"
  63. class="${properties.kcInputClass!}"
  64. aria-invalid="<#if messagesPerField.existsError('lastName')>true</#if>"
  65. />
  66. <#if messagesPerField.existsError('lastName')>
  67. <span id="input-error-lastname" class="${properties.kcInputErrorMessageClass!}" aria-live="polite">
  68. ${kcSanitize(messagesPerField.get('lastName'))?no_esc}
  69. </span>
  70. </#if>
  71. </div>
  72. </div>
  73. <div class="${properties.kcFormGroupClass!}">
  74. <div id="kc-form-options" class="${properties.kcFormOptionsClass!}">
  75. <div class="${properties.kcFormOptionsWrapperClass!}">
  76. </div>
  77. </div>
  78. <div id="kc-form-buttons" class="${properties.kcFormButtonsClass!}">
  79. <#if isAppInitiatedAction??>
  80. <input class="${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!} ${properties.kcButtonLargeClass!}" type="submit" value="${msg("doSubmit")}" />
  81. <button class="${properties.kcButtonClass!} ${properties.kcButtonDefaultClass!} ${properties.kcButtonLargeClass!}" type="submit" name="cancel-aia" value="true" />${msg("doCancel")}</button>
  82. <#else>
  83. <input class="${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!} ${properties.kcButtonBlockClass!} ${properties.kcButtonLargeClass!}" type="submit" value="${msg("doSubmit")}" />
  84. </#if>
  85. </div>
  86. </div>
  87. </form>
  88. </#if>
  89. </@layout.registrationLayout>