profile.tmpl 3.4 KB

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