new.tmpl 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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="desc">{{.i18n.Tr "org.team_desc"}}</label>
  23. <input id="desc" name="desc" value="{{.desc}}">
  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. {{end}}
  54. <div class="field">
  55. {{if .PageIsOrgTeamsNew}}
  56. <button class="ui green button">{{.i18n.Tr "org.create_new_team"}}</button>
  57. <a class="ui button" href="{{.OrgLink}}/teams">{{.i18n.Tr "cancel"}}</a>
  58. {{else}}
  59. <button class="ui green button">{{.i18n.Tr "org.teams.update_settings"}}</button>
  60. {{if not (eq .Team.LowerName "owners")}}
  61. <button class="ui red button delete-button" data-url="{{.OrgLink}}/teams/{{.team_name}}/delete">{{.i18n.Tr "org.teams.delete_team"}}</button>
  62. {{end}}
  63. {{end}}
  64. </div>
  65. </div>
  66. </form>
  67. </div>
  68. </div>
  69. </div>
  70. <div class="ui small basic delete modal">
  71. <div class="ui icon header">
  72. <i class="trash icon"></i>
  73. {{.i18n.Tr "org.teams.delete_team_title"}}
  74. </div>
  75. <div class="content">
  76. <p>{{.i18n.Tr "org.teams.delete_team_desc"}}</p>
  77. </div>
  78. {{template "base/delete_modal_actions" .}}
  79. </div>
  80. {{template "base/footer" .}}