gitea源码

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. {{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings options")}}
  2. <div class="ui segments org-setting-content">
  3. <h4 class="ui top attached header">
  4. {{ctx.Locale.Tr "org.settings.options"}}
  5. </h4>
  6. <div class="ui attached segment">
  7. <form class="ui form" action="{{.Link}}" method="post">
  8. {{.CsrfTokenHtml}}
  9. <div class="field {{if .Err_FullName}}error{{end}}">
  10. <label for="full_name">{{ctx.Locale.Tr "org.org_full_name_holder"}}</label>
  11. <input id="full_name" name="full_name" value="{{.Org.FullName}}" maxlength="100">
  12. </div>
  13. <div class="field {{if .Err_Email}}error{{end}}">
  14. <label for="email">{{ctx.Locale.Tr "org.settings.email"}}</label>
  15. <input id="email" name="email" type="email" value="{{.Org.Email}}" maxlength="255">
  16. </div>
  17. <div class="field {{if .Err_Description}}error{{end}}">
  18. {{/* it is rendered as markdown, but the length is limited, so at the moment we do not use the markdown editor here */}}
  19. <label for="description">{{ctx.Locale.Tr "org.org_desc"}}</label>
  20. <textarea id="description" name="description" rows="2" maxlength="255">{{.Org.Description}}</textarea>
  21. </div>
  22. <div class="field {{if .Err_Website}}error{{end}}">
  23. <label for="website">{{ctx.Locale.Tr "org.settings.website"}}</label>
  24. <input id="website" name="website" type="url" value="{{.Org.Website}}" maxlength="255">
  25. </div>
  26. <div class="field">
  27. <label for="location">{{ctx.Locale.Tr "org.settings.location"}}</label>
  28. <input id="location" name="location" value="{{.Org.Location}}" maxlength="50">
  29. </div>
  30. <div class="field" id="permission_box">
  31. <label>{{ctx.Locale.Tr "org.settings.permission"}}</label>
  32. <div class="field">
  33. <div class="ui checkbox">
  34. <input type="checkbox" name="repo_admin_change_team_access" {{if .RepoAdminChangeTeamAccess}}checked{{end}}>
  35. <label>{{ctx.Locale.Tr "org.settings.repoadminchangeteam"}}</label>
  36. </div>
  37. </div>
  38. </div>
  39. {{if .SignedUser.IsAdmin}}
  40. <div class="divider"></div>
  41. <div class="inline field {{if .Err_MaxRepoCreation}}error{{end}}">
  42. <label for="max_repo_creation">{{ctx.Locale.Tr "admin.users.max_repo_creation"}}</label>
  43. <input id="max_repo_creation" name="max_repo_creation" type="number" min="-1" value="{{.Org.MaxRepoCreation}}">
  44. <p class="help">{{ctx.Locale.Tr "admin.users.max_repo_creation_desc"}}</p>
  45. </div>
  46. {{end}}
  47. <div class="field">
  48. <button class="ui primary button">{{ctx.Locale.Tr "org.settings.update_settings"}}</button>
  49. </div>
  50. </form>
  51. <div class="divider"></div>
  52. <form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data">
  53. {{.CsrfTokenHtml}}
  54. <div class="inline field">
  55. {{template "shared/avatar_upload_crop" dict "LabelText" (ctx.Locale.Tr "settings.choose_new_avatar")}}
  56. </div>
  57. <div class="field">
  58. <button class="ui primary button">{{ctx.Locale.Tr "settings.update_avatar"}}</button>
  59. <button class="ui red button link-action" data-url="{{.Link}}/avatar/delete">{{ctx.Locale.Tr "settings.delete_current_avatar"}}</button>
  60. </div>
  61. </form>
  62. </div>
  63. </div>
  64. {{template "org/settings/options_dangerzone" .}}
  65. {{template "org/settings/layout_footer" .}}