account.ftl 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <#import "template.ftl" as layout>
  2. <@layout.mainLayout active='account' bodyClass='user'; section>
  3. <div class="row">
  4. <div class="col-md-10">
  5. <h2>${msg("editAccountHtmlTitle")}</h2>
  6. </div>
  7. <div class="col-md-2 subtitle">
  8. <span class="subtitle"><span class="required">*</span> ${msg("requiredFields")}</span>
  9. </div>
  10. </div>
  11. <form action="${url.accountUrl}" class="form-horizontal" method="post">
  12. <input type="hidden" id="stateChecker" name="stateChecker" value="${stateChecker}">
  13. <#if !realm.registrationEmailAsUsername>
  14. <div class="form-group ${messagesPerField.printIfExists('username','has-error')}">
  15. <div class="col-sm-2 col-md-2">
  16. <label for="username" class="control-label">${msg("username")}</label> <#if realm.editUsernameAllowed><span class="required">*</span></#if>
  17. </div>
  18. <div class="col-sm-10 col-md-10">
  19. <input type="text" class="form-control" id="username" name="username" <#if !realm.editUsernameAllowed>disabled="disabled"</#if> value="${(account.username!'')}"/>
  20. </div>
  21. </div>
  22. </#if>
  23. <div class="form-group ${messagesPerField.printIfExists('email','has-error')}">
  24. <div class="col-sm-2 col-md-2">
  25. <label for="email" class="control-label">${msg("email")}</label> <span class="required">*</span>
  26. </div>
  27. <div class="col-sm-10 col-md-10">
  28. <input type="text" class="form-control" id="email" name="email" autofocus value="${(account.email!'')}"/>
  29. </div>
  30. </div>
  31. <div class="form-group ${messagesPerField.printIfExists('firstName','has-error')}">
  32. <div class="col-sm-2 col-md-2">
  33. <label for="firstName" class="control-label">${msg("firstName")}</label> <span class="required">*</span>
  34. </div>
  35. <div class="col-sm-10 col-md-10">
  36. <input type="text" class="form-control" id="firstName" name="firstName" value="${(account.firstName!'')}"/>
  37. </div>
  38. </div>
  39. <div class="form-group ${messagesPerField.printIfExists('lastName','has-error')}">
  40. <div class="col-sm-2 col-md-2">
  41. <label for="lastName" class="control-label">${msg("lastName")}</label> <span class="required">*</span>
  42. </div>
  43. <div class="col-sm-10 col-md-10">
  44. <input type="text" class="form-control" id="lastName" name="lastName" value="${(account.lastName!'')}"/>
  45. </div>
  46. </div>
  47. <div class="form-group ${messagesPerField.printIfExists('nickName','has-error')}">
  48. <div class="col-sm-2 col-md-2">
  49. <label for="user.attributes.nickname" class="control-label">${msg("nickName")}</label> <span class="required">*</span>
  50. </div>
  51. <div class="col-sm-10 col-md-10">
  52. <input type="text" class="form-control" id="user.attributes.nickname" name="user.attributes.nickname" value="${(account.attributes.nickname!'')}"/>
  53. </div>
  54. </div>
  55. <div class="form-group ${messagesPerField.printIfExists('mobile','has-error')}">
  56. <div class="col-sm-2 col-md-2">
  57. <label for="user.attributes.mobile" class="control-label">${msg("mobile")}</label> <span class="required">*</span>
  58. </div>
  59. <div class="col-sm-10 col-md-10">
  60. <input type="text" class="form-control" id="user.attributes.mobile" name="user.attributes.mobile" value="${(account.attributes.mobile!'')}"/>
  61. </div>
  62. </div>
  63. <div class="form-group">
  64. <div id="kc-form-buttons" class="col-md-offset-2 col-md-10 submit">
  65. <div class="">
  66. <#if url.referrerURI??><a href="${url.referrerURI}">${kcSanitize(msg("backToApplication")?no_esc)}</a></#if>
  67. <button type="submit" class="${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!} ${properties.kcButtonLargeClass!}" name="submitAction" value="Save">${msg("doSave")}</button>
  68. <button type="submit" class="${properties.kcButtonClass!} ${properties.kcButtonDefaultClass!} ${properties.kcButtonLargeClass!}" name="submitAction" value="Cancel">${msg("doCancel")}</button>
  69. </div>
  70. </div>
  71. </div>
  72. </form>
  73. </@layout.mainLayout>