batchcreate.html.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <?php
  2. /**
  3. * The batchcreate of risk module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2024 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
  6. * @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author Chenxuan Song <songchenxuan@cnezsoft.com>
  8. * @package risk
  9. * @version $Id: batchcreate
  10. * @link http://www.zentao.net
  11. */
  12. namespace zin;
  13. $items = array();
  14. /* Field of id. */
  15. $items[] = array
  16. (
  17. 'name' => 'id',
  18. 'label' => $lang->risk->id,
  19. 'control' => 'index',
  20. 'width' => '32px'
  21. );
  22. /* Field of execution. */
  23. $items[] = array
  24. (
  25. 'name' => 'execution',
  26. 'label' => $lang->risk->execution,
  27. 'control' => array('control' => 'picker'),
  28. 'items' => $executions,
  29. 'value' => isset($executionID) ? $executionID : '',
  30. 'width' => '200px',
  31. 'className' => empty($project->multiple) ? 'hidden' : ''
  32. );
  33. /* Field of name. */
  34. $items[] = array
  35. (
  36. 'name' => 'name',
  37. 'label' => $lang->risk->name,
  38. 'control' => 'input',
  39. 'width' => '250px',
  40. 'required' => true
  41. );
  42. /* Field of source. */
  43. $items[] = array
  44. (
  45. 'name' => 'source',
  46. 'label' => $lang->risk->source,
  47. 'control' => array('control' => 'picker'),
  48. 'items' => $lang->risk->sourceList,
  49. 'width' => '100px',
  50. );
  51. /* Field of category. */
  52. $items[] = array
  53. (
  54. 'name' => 'category',
  55. 'label' => $lang->risk->category,
  56. 'control' => array('control' => 'picker'),
  57. 'items' => $lang->risk->categoryList,
  58. 'width' => '100px',
  59. );
  60. /* Field of strategy. */
  61. $items[] = array
  62. (
  63. 'name' => 'strategy',
  64. 'label' => $lang->risk->strategy,
  65. 'control' => array('control' => 'picker'),
  66. 'items' => $lang->risk->strategyList,
  67. 'width' => '100px',
  68. );
  69. /* Hidden field of impact. */
  70. $items[] = array
  71. (
  72. 'name' => 'impact',
  73. 'hidden' => true,
  74. 'required' => true,
  75. 'label' => $lang->risk->impact,
  76. 'control' => array('control' => 'picker'),
  77. 'items' => $lang->risk->impactList,
  78. 'value' => 3,
  79. 'width' => '50px',
  80. );
  81. /* Hidden field of probability. */
  82. $items[] = array
  83. (
  84. 'name' => 'probability',
  85. 'hidden' => true,
  86. 'required' => true,
  87. 'label' => $lang->risk->probability,
  88. 'control' => array('control' => 'picker'),
  89. 'items' => $lang->risk->probabilityList,
  90. 'value' => 3,
  91. 'width' => '50px',
  92. );
  93. /* Hidden field of rate. */
  94. $items[] = array
  95. (
  96. 'name' => 'rate',
  97. 'hidden' => true,
  98. 'label' => $lang->risk->rate,
  99. 'control' => 'input',
  100. 'value' => 9,
  101. 'width' => '50px',
  102. );
  103. /* Hidden field of pri. */
  104. $items[] = array
  105. (
  106. 'name' => 'pri',
  107. 'hidden' => true,
  108. 'required' => true,
  109. 'label' => $lang->risk->pri,
  110. 'control' => array('control' => 'picker'),
  111. 'items' => $lang->risk->priList,
  112. 'value' => 2,
  113. 'width' => '100px',
  114. );
  115. formBatchPanel(set::title($lang->risk->batchCreate), set::pasteField('name'), set::items($items));
  116. render();