avatar.tmpl 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. {{template "base/head" .}}
  2. <div class="user settings avatar">
  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.avatar"}}
  10. </h4>
  11. <div class="ui attached segment">
  12. <form class="ui form" action="{{.Link}}" method="post" enctype="multipart/form-data">
  13. {{.CsrfTokenHtml}}
  14. {{if not DisableGravatar}}
  15. <div class="inline field">
  16. <div class="ui radio checkbox">
  17. <input name="source" value="lookup" type="radio" {{if not .SignedUser.UseCustomAvatar}}checked{{end}}>
  18. <label>{{.i18n.Tr "settings.lookup_avatar_by_mail"}}</label>
  19. </div>
  20. </div>
  21. <div class="field {{if .Err_Gravatar}}error{{end}}">
  22. <label for="gravatar">Avatar {{.i18n.Tr "email"}}</label>
  23. <input id="gravatar" name="gravatar" value="{{.SignedUser.AvatarEmail}}" />
  24. </div>
  25. {{end}}
  26. <div class="inline field">
  27. <div class="ui radio checkbox">
  28. <input name="source" value="local" type="radio" {{if .SignedUser.UseCustomAvatar}}checked{{end}}>
  29. <label>{{.i18n.Tr "settings.enable_custom_avatar"}}</label>
  30. </div>
  31. </div>
  32. <div class="inline field">
  33. <label for="avatar">{{.i18n.Tr "settings.choose_new_avatar"}}</label>
  34. <input name="avatar" type="file" >
  35. </div>
  36. <div class="field">
  37. <button class="ui green button">{{$.i18n.Tr "settings.update_avatar"}}</button>
  38. <a class="ui red button delete-post" data-request-url="{{.Link}}/delete" data-done-url="{{.Link}}">{{$.i18n.Tr "settings.delete_current_avatar"}}</a>
  39. </div>
  40. </form>
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. {{template "base/footer" .}}