profile.tmpl 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. {{template "base/head" .}}
  2. <div class="user settings profile">
  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.public_profile"}}
  10. </h4>
  11. <div class="ui attached segment">
  12. <p>{{.i18n.Tr "settings.profile_desc"}}</p>
  13. <form class="ui form" action="{{.Link}}" method="post">
  14. {{.CsrfTokenHtml}}
  15. <div class="required field {{if .Err_Name}}error{{end}}">
  16. <label for="username">{{.i18n.Tr "username"}}<span class="text red hide" id="name-change-prompt"> {{.i18n.Tr "settings.change_username_prompt"}}</span></label>
  17. <input id="username" name="name" value="{{.SignedUser.Name}}" data-name="{{.SignedUser.Name}}" autofocus required>
  18. </div>
  19. <div class="field {{if .Err_FullName}}error{{end}}">
  20. <label for="full_name">{{.i18n.Tr "settings.full_name"}}</label>
  21. <input id="full_name" name="full_name" value="{{.SignedUser.FullName}}">
  22. </div>
  23. <div class="required field {{if .Err_Email}}error{{end}}">
  24. <label for="email">{{.i18n.Tr "email"}}</label>
  25. <input id="email" name="email" value="{{.SignedUser.Email}}">
  26. </div>
  27. <div class="field {{if .Err_Website}}error{{end}}">
  28. <label for="website">{{.i18n.Tr "settings.website"}}</label>
  29. <input id="website" name="website" type="url" value="{{.SignedUser.Website}}">
  30. </div>
  31. <div class="field">
  32. <label for="location">{{.i18n.Tr "settings.location"}}</label>
  33. <input id="location" name="location" value="{{.SignedUser.Location}}">
  34. </div>
  35. <div class="required field {{if or DisableGravatar .SignedUser.UseCustomAvatar}}hide{{end}} {{if .Err_Gravatar}}error{{end}}">
  36. <label for="gravatar">Gravatar {{.i18n.Tr "email"}}</label>
  37. <input id="gravatar" name="gravatar" value="{{.SignedUser.AvatarEmail}}" />
  38. </div>
  39. <div class="field">
  40. <button class="ui green button">{{$.i18n.Tr "settings.update_profile"}}</button>
  41. </div>
  42. </form>
  43. <div class="ui divider"></div>
  44. <form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data">
  45. {{.CsrfTokenHtml}}
  46. <div class="inline field">
  47. <label>{{.i18n.Tr "settings.enable_custom_avatar"}}</label>
  48. <div class="ui checkbox">
  49. <input name="enable" type="checkbox" {{if .SignedUser.UseCustomAvatar}}checked{{end}}>
  50. <label>{{.i18n.Tr "settings.enable_custom_avatar_helper"}}</label>
  51. </div>
  52. </div>
  53. <div class="inline field">
  54. <label for="avatar">{{.i18n.Tr "settings.choose_new_avatar"}}</label>
  55. <input name="avatar" type="file" >
  56. </div>
  57. <div class="field">
  58. <button class="ui green button">{{$.i18n.Tr "settings.update_avatar"}}</button>
  59. </div>
  60. </form>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. {{template "base/footer" .}}