Fork to maintain patches against the official gitea for https://code.ceondo.com https://github.com/go-gitea/gitea

new.tmpl 4.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. {{template "base/head" .}}
  2. <div class="organization new team">
  3. {{template "org/header" .}}
  4. <div class="ui middle very relaxed page grid">
  5. <div class="column">
  6. <form class="ui form" action="{{if .PageIsOrgTeamsNew}}{{.OrgLink}}/teams/new{{else}}{{.OrgLink}}/teams/{{.Team.LowerName}}/edit{{end}}" data-delete-url="{{.OrgLink}}/teams/{{.Team.LowerName}}/delete" method="post">
  7. {{.CsrfTokenHtml}}
  8. <h3 class="ui top attached header">
  9. {{if .PageIsOrgTeamsNew}}{{.i18n.Tr "org.create_new_team"}}{{else}}{{.i18n.Tr "org.teams.settings"}}{{end}}
  10. </h3>
  11. <div class="ui attached segment">
  12. {{template "base/alert" .}}
  13. <div class="required field {{if .Err_TeamName}}error{{end}}">
  14. <label for="team_name">{{.i18n.Tr "org.team_name"}}</label>
  15. {{if eq .Team.LowerName "owners"}}
  16. <input type="hidden" name="team_name" value="{{.Team.Name}}">
  17. {{end}}
  18. <input id="team_name" name="team_name" value="{{.Team.Name}}" required {{if eq .Team.LowerName "owners"}}disabled{{end}} autofocus>
  19. <span class="help">{{.i18n.Tr "org.team_name_helper"}}</span>
  20. </div>
  21. <div class="field {{if .Err_Description}}error{{end}}">
  22. <label for="description">{{.i18n.Tr "org.team_desc"}}</label>
  23. <input id="description" name="description" value="{{.Team.Description}}">
  24. <span class="help">{{.i18n.Tr "org.team_desc_helper"}}</span>
  25. </div>
  26. {{if not (eq .Team.LowerName "owners")}}
  27. <div class="grouped field">
  28. <label>{{.i18n.Tr "org.team_permission_desc"}}</label>
  29. <br>
  30. <div class="field">
  31. <div class="ui radio checkbox">
  32. <input type="radio" name="permission" value="read" {{if or .PageIsOrgTeamsNew (eq .Team.Authorize 1)}}checked{{end}}>
  33. <label>{{.i18n.Tr "org.teams.read_access"}}</label>
  34. <span class="help">{{.i18n.Tr "org.teams.read_access_helper"}}</span>
  35. </div>
  36. </div>
  37. <div class="field">
  38. <div class="ui radio checkbox">
  39. <input type="radio" name="permission" value="write" {{if eq .Team.Authorize 2}}checked{{end}}>
  40. <label>{{.i18n.Tr "org.teams.write_access"}}</label>
  41. <span class="help">{{.i18n.Tr "org.teams.write_access_helper"}}</span>
  42. </div>
  43. </div>
  44. <div class="field">
  45. <div class="ui radio checkbox">
  46. <input type="radio" name="permission" value="admin" {{if eq .Team.Authorize 3}}checked{{end}}>
  47. <label>{{.i18n.Tr "org.teams.admin_access"}}</label>
  48. <span class="help">{{.i18n.Tr "org.teams.admin_access_helper"}}</span>
  49. </div>
  50. </div>
  51. </div>
  52. <div class="ui divider"></div>
  53. <div class="team-units required grouped field"{{if eq .Team.Authorize 3}} style="display: none"{{end}}>
  54. <label>{{.i18n.Tr "org.team_unit_desc"}}</label>
  55. <br>
  56. {{range $t, $unit := $.Units}}
  57. <div class="field">
  58. <div class="ui toggle checkbox">
  59. <input type="checkbox" class="hidden" name="units" value="{{$unit.Type}}"{{if $.Team.EnableUnit $unit.Type}} checked{{end}}>
  60. <label>{{$.i18n.Tr $unit.NameKey}}</label>
  61. <span class="help">{{$.i18n.Tr $unit.DescKey}}</span>
  62. </div>
  63. </div>
  64. {{end}}
  65. </div>
  66. <div class="ui divider"></div>
  67. {{end}}
  68. <div class="field">
  69. {{if .PageIsOrgTeamsNew}}
  70. <button class="ui green button">{{.i18n.Tr "org.create_new_team"}}</button>
  71. <a class="ui button" href="{{.OrgLink}}/teams">{{.i18n.Tr "cancel"}}</a>
  72. {{else}}
  73. <button class="ui green button">{{.i18n.Tr "org.teams.update_settings"}}</button>
  74. {{if not (eq .Team.LowerName "owners")}}
  75. <button class="ui red button delete-button" data-url="{{.OrgLink}}/teams/{{.team_name}}/delete">{{.i18n.Tr "org.teams.delete_team"}}</button>
  76. {{end}}
  77. {{end}}
  78. </div>
  79. </div>
  80. </form>
  81. </div>
  82. </div>
  83. </div>
  84. <div class="ui small basic delete modal">
  85. <div class="ui icon header">
  86. <i class="trash icon"></i>
  87. {{.i18n.Tr "org.teams.delete_team_title"}}
  88. </div>
  89. <div class="content">
  90. <p>{{.i18n.Tr "org.teams.delete_team_desc"}}</p>
  91. </div>
  92. {{template "base/delete_modal_actions" .}}
  93. </div>
  94. {{template "base/footer" .}}