batchcreatecase.html.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <?php
  2. /**
  3. * The batchcreatecase view file of caselib 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 Mengyi Liu <liumengyi@easycorp.ltd>
  7. * @package caselib
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. /* Field of id. */
  12. $items[] = array
  13. (
  14. 'name' => 'id',
  15. 'label' => $lang->idAB,
  16. 'control' => 'index',
  17. 'width' => '32px'
  18. );
  19. /* Field of module. */
  20. $items[] = array
  21. (
  22. 'name' => 'module',
  23. 'label' => $lang->testcase->module,
  24. 'control' => 'picker',
  25. 'items' => $moduleOptionMenu,
  26. 'value' => $currentModuleID,
  27. 'width' => '200px',
  28. 'required' => strpos($config->testcase->create->requiredFields, 'module') !== false,
  29. 'ditto' => true
  30. );
  31. /* Field of type. */
  32. $items[] = array
  33. (
  34. 'name' => 'type',
  35. 'label' => $lang->testcase->type,
  36. 'control' => 'picker',
  37. 'items' => $lang->testcase->typeList,
  38. 'value' => 'feature',
  39. 'width' => '160px',
  40. 'required' => true,
  41. 'ditto' => true
  42. );
  43. /* Field of stage. */
  44. $items[] = array
  45. (
  46. 'name' => 'stage',
  47. 'label' => $lang->testcase->stage,
  48. 'control' => 'picker',
  49. 'items' => $lang->testcase->stageList,
  50. 'value' => '',
  51. 'multiple' => true,
  52. 'required' => strpos($config->testcase->create->requiredFields, 'stage') !== false,
  53. 'width' => '160px'
  54. );
  55. /* Field of title. */
  56. $items[] = array
  57. (
  58. 'name' => 'title',
  59. 'label' => $lang->testcase->title,
  60. 'control' => 'input',
  61. 'width' => '240px',
  62. 'required' => true
  63. );
  64. /* Field of pri. */
  65. $priList = array_filter($lang->testcase->priList);
  66. $items[] = array
  67. (
  68. 'name' => 'pri',
  69. 'label' => $lang->testcase->pri,
  70. 'control' => 'priPicker',
  71. 'items' => $priList,
  72. 'value' => 3,
  73. 'width' => '100px',
  74. 'required' => strpos($config->testcase->create->requiredFields, 'pri') !== false,
  75. 'ditto' => true
  76. );
  77. /* Field of precondition. */
  78. $items[] = array
  79. (
  80. 'name' => 'precondition',
  81. 'label' => $lang->testcase->precondition,
  82. 'control' => 'input',
  83. 'width' => '200px',
  84. 'required' => strpos($config->testcase->create->requiredFields, 'precondition') !== false
  85. );
  86. /* Field of keywords. */
  87. $items[] = array
  88. (
  89. 'name' => 'keywords',
  90. 'label' => $lang->testcase->keywords,
  91. 'control' => 'input',
  92. 'width' => '200px',
  93. 'required' => strpos($config->testcase->create->requiredFields, 'keywords') !== false
  94. );
  95. formBatchPanel
  96. (
  97. set::title($lang->testcase->batchCreate),
  98. set::pasteField('title'),
  99. set::items($items)
  100. );
  101. render();