createproject.html.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. /**
  3. * The createproject 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. $publicTip = "<span id='publicTip' class='text-danger'>" . $lang->gitlab->project->publicTip . '</span>';
  12. jsVar('publicTip', $publicTip);
  13. $urlOptions = array();
  14. if(count($namespaces) < 2)
  15. {
  16. $urlOptions[] = input(set::name('url'), set::value($gitlab->url . '/' . $user->username . '/'));
  17. }
  18. else
  19. {
  20. $urlOptions[] = $gitlab->url;
  21. $urlOptions[] = picker
  22. (
  23. set::name('namespace_id'),
  24. set::value(!empty($defaultSpace) ? $defaultSpace : ''),
  25. set::items($namespaces),
  26. set::required(true)
  27. );
  28. }
  29. formPanel
  30. (
  31. set::title($lang->gitlab->project->create),
  32. formGroup
  33. (
  34. set::name('name'),
  35. set::label($lang->gitlab->project->name),
  36. set::placeholder($lang->gitlab->project->name),
  37. set::required(true),
  38. set::width('2/3'),
  39. on::input('onNameChange')
  40. ),
  41. formGroup
  42. (
  43. set::label($lang->gitlab->project->url),
  44. set::width('2/3'),
  45. inputGroup
  46. (
  47. $urlOptions
  48. )
  49. ),
  50. formGroup
  51. (
  52. set::label($lang->gitlab->project->path),
  53. set::name('path'),
  54. set::placeholder($lang->gitlab->placeholder->projectPath),
  55. set::required(true),
  56. set::width('2/3')
  57. ),
  58. formGroup
  59. (
  60. set::label($lang->gitlab->project->description),
  61. set::name('description'),
  62. set::control('textarea'),
  63. set::width('2/3')
  64. ),
  65. formGroup
  66. (
  67. set::label($lang->gitlab->project->visibility),
  68. set::control('radioList'),
  69. set::items($lang->gitlab->project->visibilityList),
  70. set::value('private'),
  71. set::name('visibility'),
  72. on::change('onAclChange')
  73. )
  74. );
  75. render();