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.

41 lines
1.6 KiB

  1. {{template "base/head" .}}
  2. <div class="user settings password">
  3. {{template "user/settings/navbar" .}}
  4. <div class="ui container">
  5. {{template "base/alert" .}}
  6. <h4 class="ui top attached header">
  7. {{.i18n.Tr "settings.change_password"}}
  8. </h4>
  9. <div class="ui attached segment">
  10. {{if or (.SignedUser.IsLocal) (.SignedUser.IsOAuth2)}}
  11. <form class="ui form" action="{{.Link}}" method="post">
  12. {{.CsrfTokenHtml}}
  13. {{if .SignedUser.IsPasswordSet}}
  14. <div class="required field {{if .Err_OldPassword}}error{{end}}">
  15. <label for="old_password">{{.i18n.Tr "settings.old_password"}}</label>
  16. <input id="old_password" name="old_password" type="password" autocomplete="off" autofocus required>
  17. </div>
  18. {{end}}
  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" autocomplete="off" 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" autocomplete="off" required>
  26. </div>
  27. <div class="field">
  28. <button class="ui green button">{{$.i18n.Tr "settings.change_password"}}</button>
  29. <a href="{{AppSubUrl}}/user/forgot_password?email={{.Email}}">{{.i18n.Tr "auth.forgot_password"}}</a>
  30. </div>
  31. </form>
  32. {{else}}
  33. <div class="ui info message">
  34. <p class="text left">{{$.i18n.Tr "settings.password_change_disabled"}}</p>
  35. </div>
  36. {{end}}
  37. </div>
  38. </div>
  39. </div>
  40. {{template "base/footer" .}}