editgroup.html.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <?php
  2. /**
  3. * The editgroup view file of gitlab module of ZenTaoPMS.
  4. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
  5. * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  6. * @author Zeng Gang<zenggang@easycorp.ltd>
  7. * @package gitlab
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. if(!empty($permissionError))
  12. {
  13. jsCall('alertJump', array($permissionError, $errorJump));
  14. return;
  15. }
  16. $publicTip = "<span id='publicTip' class='text-danger'>" . $lang->gitlab->group->publicTip . '</span>';
  17. jsVar('publicTip', $publicTip);
  18. jsVar('visibility', $group->visibility);
  19. formPanel
  20. (
  21. set::title($lang->gitlab->group->edit),
  22. set::labelWidth($app->clientLang == 'zh-cn' ? '8em' : '13em'),
  23. set::back('gitlab-browsegroup'),
  24. input
  25. (
  26. set::type('hidden'),
  27. set::name('id'),
  28. set::value($group->id)
  29. ),
  30. formGroup
  31. (
  32. set::name('name'),
  33. set::label($lang->gitlab->group->name),
  34. set::placeholder($lang->gitlab->group->name),
  35. set::value($group->name),
  36. set::required(true),
  37. set::width('1/2')
  38. ),
  39. formGroup
  40. (
  41. set::label($lang->gitlab->group->path),
  42. set::width('1/2'),
  43. set::required(true),
  44. inputGroup
  45. (
  46. $gitlab->url . '/',
  47. input
  48. (
  49. set::name('path'),
  50. set::placeholder($lang->gitlab->group->path),
  51. set::value($group->path),
  52. set::readonly(true)
  53. )
  54. )
  55. ),
  56. formGroup
  57. (
  58. set::label($lang->gitlab->group->description),
  59. set::name('description'),
  60. set::placeholder($lang->gitlab->group->description),
  61. set::value($group->description),
  62. set::width('1/2')
  63. ),
  64. formGroup
  65. (
  66. set::label($lang->gitlab->group->visibility),
  67. set::name('visibility'),
  68. set::control('radioList'),
  69. set::items($lang->gitlab->group->visibilityList),
  70. set::value($group->visibility),
  71. on::change('onAclChange')
  72. ),
  73. formGroup
  74. (
  75. set::label($lang->gitlab->group->permission),
  76. set::name('request_access_enabled'),
  77. set::control(array('control' => 'checkbox', 'value' => '1', 'text' => $lang->gitlab->group->requestAccessEnabledTip, 'checked' => $group->request_access_enabled ? true : false))
  78. ),
  79. formGroup
  80. (
  81. set::label($lang->gitlab->group->lfsEnabled),
  82. set::name('lfs_enabled'),
  83. set::control(array('control' => 'checkbox', 'value' => '1' , 'text' => $lang->gitlab->group->lfsEnabledTip, 'checked' => $group->lfs_enabled ? true : false))
  84. ),
  85. formGroup(set::label($lang->gitlab->group->projectCreationLevel), set::width('1/2'), picker
  86. (
  87. set::name('project_creation_level'),
  88. set::items($lang->gitlab->group->projectCreationLevelList),
  89. set::value($group->project_creation_level),
  90. set::required(true)
  91. )),
  92. formGroup
  93. (
  94. set::label($lang->gitlab->group->subgroupCreationLevel),
  95. set::width('1/2'),
  96. picker
  97. (
  98. set::name('subgroup_creation_level'),
  99. set::items($lang->gitlab->group->subgroupCreationLevelList),
  100. set::value($group->subgroup_creation_level),
  101. set::required(true)
  102. )
  103. )
  104. );
  105. render();