You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.5 KiB

  1. {{template "base/head" .}}
  2. <div class="user settings password">
  3. <div class="ui container">
  4. <div class="ui grid">
  5. {{template "user/settings/navbar" .}}
  6. <div class="twelve wide column content">
  7. {{template "base/alert" .}}
  8. <h4 class="ui top attached header">
  9. {{.i18n.Tr "settings.change_password"}}
  10. </h4>
  11. <div class="ui attached segment">
  12. {{if .SignedUser.IsLocal}}
  13. <form class="ui form" action="{{.Link}}" method="post">
  14. {{.CsrfTokenHtml}}
  15. <div class="required field {{if .Err_OldPassword}}error{{end}}">
  16. <label for="old_password">{{.i18n.Tr "settings.old_password"}}</label>
  17. <input id="old_password" name="old_password" type="password" autofocus required>
  18. </div>
  19. <div class="required field {{if .Err_Password}}error{{end}}">
  20. <label for="password">{{.i18n.Tr "settings.new_password"}}</label>
  21. <input id="password" name="password" type="password" required>
  22. </div>
  23. <div class="required field {{if .Err_Password}}error{{end}}">
  24. <label for="retype">{{.i18n.Tr "settings.retype_new_password"}}</label>
  25. <input id="retype" name="retype" type="password" required>
  26. </div>
  27. <div class="field">
  28. <button class="ui green button">{{$.i18n.Tr "settings.change_password"}}</button>
  29. </div>
  30. </form>
  31. {{else}}
  32. <div class="ui info message">
  33. <p class="text left">{{$.i18n.Tr "settings.password_change_disabled"}}</p>
  34. </div>
  35. {{end}}
  36. </div>
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. {{template "base/footer" .}}