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.

51 lines
2.3 KiB

  1. {{template "base/head" .}}
  2. <div class="user settings profile">
  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.public_profile"}}
  8. </h4>
  9. <div class="ui attached segment">
  10. <p>{{.i18n.Tr "settings.profile_desc"}}</p>
  11. <form class="ui form" action="{{.Link}}" method="post">
  12. {{.CsrfTokenHtml}}
  13. <div class="required field {{if .Err_Name}}error{{end}}">
  14. <label for="username">{{.i18n.Tr "username"}}<span class="text red hide" id="name-change-prompt"> {{.i18n.Tr "settings.change_username_prompt"}}</span></label>
  15. <input id="username" name="name" value="{{.SignedUser.Name}}" data-name="{{.SignedUser.Name}}" autofocus required {{if not .SignedUser.IsLocal}}disabled{{end}}>
  16. {{if not .SignedUser.IsLocal}}
  17. <p class="help text blue">{{$.i18n.Tr "settings.password_username_disabled"}}</p>
  18. {{end}}
  19. </div>
  20. <div class="field {{if .Err_FullName}}error{{end}}">
  21. <label for="full_name">{{.i18n.Tr "settings.full_name"}}</label>
  22. <input id="full_name" name="full_name" value="{{.SignedUser.FullName}}">
  23. </div>
  24. <div class="required field {{if .Err_Email}}error{{end}}">
  25. <label for="email">{{.i18n.Tr "email"}}</label>
  26. <input id="email" name="email" value="{{.SignedUser.Email}}">
  27. </div>
  28. <div class="inline field">
  29. <div class="ui checkbox" id="keep-email-private">
  30. <label class="poping up" data-content="{{.i18n.Tr "settings.keep_email_private_popup"}}"><strong>{{.i18n.Tr "settings.keep_email_private"}}</strong></label>
  31. <input name="keep_email_private" type="checkbox" {{if .SignedUser.KeepEmailPrivate}}checked{{end}}>
  32. </div>
  33. </div>
  34. <div class="field {{if .Err_Website}}error{{end}}">
  35. <label for="website">{{.i18n.Tr "settings.website"}}</label>
  36. <input id="website" name="website" type="url" value="{{.SignedUser.Website}}">
  37. </div>
  38. <div class="field">
  39. <label for="location">{{.i18n.Tr "settings.location"}}</label>
  40. <input id="location" name="location" value="{{.SignedUser.Location}}">
  41. </div>
  42. <div class="field">
  43. <button class="ui green button">{{$.i18n.Tr "settings.update_profile"}}</button>
  44. </div>
  45. </form>
  46. </div>
  47. </div>
  48. </div>
  49. {{template "base/footer" .}}