options.tmpl 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. {{template "base/head" .}}
  2. <div class="organization settings options">
  3. {{template "org/header" .}}
  4. <div class="ui container">
  5. <div class="ui grid">
  6. {{template "org/settings/navbar" .}}
  7. <div class="twelve wide column content">
  8. {{template "base/alert" .}}
  9. <h4 class="ui top attached header">
  10. {{.i18n.Tr "org.settings.options"}}
  11. </h4>
  12. <div class="ui attached segment">
  13. <form class="ui form" action="{{.Link}}" method="post">
  14. {{.CsrfTokenHtml}}
  15. <div class="required field {{if .Err_Name}}error{{end}}">
  16. <label for="org_name">{{.i18n.Tr "org.org_name_holder"}}<span class="text red hide" id="org-name-change-prompt"> {{.i18n.Tr "org.settings.change_orgname_prompt"}}</span></label>
  17. <input id="org_name" name="name" value="{{.Org.Name}}" data-org-name="{{.Org.Name}}" autofocus required>
  18. </div>
  19. <div class="field {{if .Err_FullName}}error{{end}}">
  20. <label for="full_name">{{.i18n.Tr "org.org_full_name_holder"}}</label>
  21. <input id="full_name" name="full_name" value="{{.Org.FullName}}">
  22. </div>
  23. <div class="field {{if .Err_Description}}error{{end}}">
  24. <label for="description">{{$.i18n.Tr "org.org_desc"}}</label>
  25. <textarea id="description" name="description" rows="2">{{.Org.Description}}</textarea>
  26. </div>
  27. <div class="field {{if .Err_Website}}error{{end}}">
  28. <label for="website">{{.i18n.Tr "org.settings.website"}}</label>
  29. <input id="website" name="website" type="url" value="{{.Org.Website}}">
  30. </div>
  31. <div class="field">
  32. <label for="location">{{.i18n.Tr "org.settings.location"}}</label>
  33. <input id="location" name="location" value="{{.Org.Location}}">
  34. </div>
  35. {{if .SignedUser.IsAdmin}}
  36. <div class="ui divider"></div>
  37. <div class="inline field {{if .Err_MaxRepoCreation}}error{{end}}">
  38. <label for="max_repo_creation">{{.i18n.Tr "admin.users.max_repo_creation"}}</label>
  39. <input id="max_repo_creation" name="max_repo_creation" type="number" value="{{.Org.MaxRepoCreation}}">
  40. <p class="help">{{.i18n.Tr "admin.users.max_repo_creation_desc"}}</p>
  41. </div>
  42. {{end}}
  43. <div class="field">
  44. <button class="ui green button">{{$.i18n.Tr "org.settings.update_settings"}}</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 for="avatar">{{.i18n.Tr "settings.choose_new_avatar"}}</label>
  52. <input name="avatar" type="file" >
  53. </div>
  54. <div class="field">
  55. <button class="ui green button">{{$.i18n.Tr "settings.update_avatar"}}</button>
  56. <a class="ui red button delete-post" data-request-url="{{.Link}}/avatar/delete" data-done-url="{{.Link}}">{{$.i18n.Tr "settings.delete_current_avatar"}}</a>
  57. </div>
  58. </form>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. {{template "base/footer" .}}