createstruct.html.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <?php
  2. /**
  3. * The create struct view file of api 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 Gang Liu <liugang@easycorp.ltd>
  7. * @package api
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. formPanel
  12. (
  13. to::heading
  14. (
  15. div
  16. (
  17. setClass('panel-title text-lg'),
  18. $lang->api->createStruct
  19. )
  20. ),
  21. formGroup
  22. (
  23. set::width('1/2'),
  24. set::label($lang->api->structName),
  25. set::name('name'),
  26. set::required(true)
  27. ),
  28. formGroup
  29. (
  30. setID('form-paramsType'),
  31. setClass('params-group struct'),
  32. set::label($lang->struct->type),
  33. radioList
  34. (
  35. set::name('type'),
  36. set::inline(true),
  37. set::value('formData'),
  38. set::items($lang->struct->typeOptions)
  39. )
  40. ),
  41. formGroup
  42. (
  43. setID('form-params'),
  44. setClass('params-group struct'),
  45. set::label($lang->api->params),
  46. h::table
  47. (
  48. setClass('table condensed bordered'),
  49. h::tr
  50. (
  51. h::th
  52. (
  53. width('300px'),
  54. $lang->struct->field
  55. ),
  56. h::th
  57. (
  58. width('100px'),
  59. $lang->struct->paramsType
  60. ),
  61. h::th
  62. (
  63. width('70px'),
  64. $lang->struct->required
  65. ),
  66. h::th
  67. (
  68. $lang->struct->desc
  69. ),
  70. h::th
  71. (
  72. width('100px')
  73. )
  74. ),
  75. h::tr
  76. (
  77. setClass('input-row'),
  78. setData(array('level' => 1, 'key' => 'origin', 'parent' => '0')),
  79. h::td
  80. (
  81. input()
  82. ),
  83. h::td
  84. (
  85. select
  86. (
  87. setClass('objectType'),
  88. set::name(''),
  89. set::value('object'),
  90. set::items($lang->api->paramsTypeOptions)
  91. )
  92. ),
  93. h::td
  94. (
  95. html("<input type='checkbox' />")
  96. ),
  97. h::td
  98. (
  99. textarea
  100. (
  101. set::rows(1)
  102. )
  103. ),
  104. h::td
  105. (
  106. div
  107. (
  108. setClass('pl-2 flex self-center line-btn'),
  109. btn
  110. (
  111. setClass('btn ghost btn-split hidden'),
  112. icon('split')
  113. ),
  114. btn
  115. (
  116. setClass('btn ghost btn-add'),
  117. icon('plus')
  118. ),
  119. btn
  120. (
  121. setClass('btn ghost btn-delete'),
  122. icon('trash')
  123. )
  124. )
  125. )
  126. )
  127. )
  128. ),
  129. formHidden('attribute', ''),
  130. formGroup
  131. (
  132. set::label($lang->api->desc),
  133. editor
  134. (
  135. set::name('desc')
  136. )
  137. )
  138. );
  139. render();