profile.tmpl 5.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. {{template "ng/base/head" .}}
  2. {{template "ng/base/header" .}}
  3. <div id="setting-wrapper" class="main-wrapper">
  4. <div id="user-profile-setting" class="container clear">
  5. {{template "user/settings/nav" .}}
  6. <div class="grid-4-5 left">
  7. <div class="setting-content">
  8. {{template "ng/base/alert" .}}
  9. <div id="setting-content">
  10. <div id="user-profile-setting-content" class="panel panel-radius">
  11. <div class="panel-header">
  12. <strong>{{.i18n.Tr "settings.public_profile"}}</strong>
  13. </div>
  14. <div class="panel-body">
  15. <form class="form form-align" id="user-profile-form" action="{{AppSubUrl}}/user/settings" method="post">
  16. {{.CsrfTokenHtml}}
  17. <div class="text-center panel-desc">{{.i18n.Tr "settings.profile_desc"}}</div>
  18. <div class="field">
  19. <label>{{.i18n.Tr "settings.uid"}}</label>
  20. <label class="text-left">{{.SignedUser.Id}}</label>
  21. </div>
  22. <div class="field">
  23. <label class="req" for="username">{{.i18n.Tr "username"}}</label>
  24. <input class="ipt ipt-large ipt-radius {{if .Err_UserName}}ipt-error{{end}}" id="username" name="uname" type="text" value="{{.SignedUser.Name}}" data-uname="{{.SignedUser.Name}}" required />
  25. </div>
  26. <div class="white-popup-block mfp-hide" id="change-username-modal">
  27. <h1 class="text-red">{{.i18n.Tr "settings.change_username"}}</h1>
  28. <p>{{.i18n.Tr "settings.change_username_desc"}}</p>
  29. <br>
  30. <button class="btn btn-red btn-large btn-radius" id="change-username-submit">{{.i18n.Tr "settings.continue"}}</button>
  31. <button class="btn btn-large btn-radius popup-modal-dismiss">{{.i18n.Tr "settings.cancel"}}</button>
  32. </div>
  33. <div class="field">
  34. <label for="full-name">{{.i18n.Tr "settings.full_name"}}</label>
  35. <input class="ipt ipt-large ipt-radius {{if .Err_FullName}}ipt-error{{end}}" id="full-name" name="fullname" type="text" value="{{.SignedUser.FullName}}" />
  36. </div>
  37. <div class="field">
  38. <label class="req" for="email">{{.i18n.Tr "email"}}</label>
  39. <input class="ipt ipt-large ipt-radius {{if .Err_Email}}ipt-error{{end}}" id="email" name="email" type="email" value="{{.SignedUser.Email}}" required />
  40. </div>
  41. <div class="field">
  42. <label for="website">{{.i18n.Tr "settings.website"}}</label>
  43. <input class="ipt ipt-large ipt-radius {{if .Err_Website}}ipt-error{{end}}" id="website" name="website" type="url" value="{{.SignedUser.Website}}" />
  44. </div>
  45. <div class="field">
  46. <label for="location">{{.i18n.Tr "settings.location"}}</label>
  47. <input class="ipt ipt-large ipt-radius {{if .Err_Location}}ipt-error{{end}}" id="location" name="location" type="text" value="{{.SignedUser.Location}}" />
  48. </div>
  49. <div class="field {{if DisableGravatar}}hide{{end}}">
  50. <label class="req" for="gravatar-email">Gravatar {{.i18n.Tr "email"}}</label>
  51. <input class="ipt ipt-large ipt-radius {{if .Err_Avatar}}ipt-error{{end}}" id="gravatar-email" name="avatar" type="text" value="{{.SignedUser.AvatarEmail}}" />
  52. </div>
  53. <div class="field">
  54. <label></label>
  55. <button class="btn btn-green btn-large btn-radius" id="change-username-btn" href="#change-username-modal">{{.i18n.Tr "settings.update_profile"}}</button>
  56. </div>
  57. </form>
  58. <hr>
  59. <form class="form form-align" id="user-profile-form" action="{{AppSubUrl}}/user/settings/avatar" method="post" enctype="multipart/form-data">
  60. {{.CsrfTokenHtml}}
  61. <div class="field">
  62. <label for="enable">{{.i18n.Tr "settings.enable_custom_avatar"}}</label>
  63. <input class="ipt-chk" id="enable" name="enable" type="checkbox" {{if .SignedUser.UseCustomAvatar}}checked{{end}} />
  64. <span>{{.i18n.Tr "settings.enable_custom_avatar_helper"}}</span>
  65. </div>
  66. <div class="field">
  67. <label>{{.i18n.Tr "settings.choose_new_avatar"}}</label>
  68. <input name="avatar" type="file" />
  69. </div>
  70. <div class="field">
  71. <label></label>
  72. <button class="btn btn-green btn-large btn-radius">{{.i18n.Tr "settings.update_avatar"}}</button>
  73. </div>
  74. </form>
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. {{template "ng/base/footer" .}}