check.html.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /**
  3. * The batchEdit view file of auditplan 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 Yuting Wang <wangyuting@easycorp.ltd>
  7. * @package auditplan
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. $items = array();
  12. $items[] = array('label' => $lang->idAB, 'name' => 'resultID', 'control' => 'input', 'hidden' => true);
  13. $items[] = array('label' => $lang->idAB, 'name' => 'listID', 'control' => 'input', 'hidden' => true);
  14. $items[] = array('label' => $lang->auditplan->content, 'name' => 'title', 'control' => 'textarea', 'readonly' => true);
  15. $items[] = array('label' => $lang->auditplan->result, 'name' => 'result', 'control' => array('control' => 'radioList', 'inline' => true), 'value' => 'pass', 'items' => $lang->auditplan->resultList);
  16. $items[] = array('label' => $lang->auditplan->comment, 'name' => 'comment', 'control' => 'textarea');
  17. $items[] = array('label' => $lang->auditplan->severity, 'name' => 'severity', 'control' => 'picker', 'items' => array_filter($lang->nc->severityList));
  18. $items[] = array('label' => $lang->auditplan->status, 'name' => 'status', 'control' => 'input', 'hidden' => true, 'value' => 'normal');
  19. if($checkList)
  20. {
  21. formBatchPanel
  22. (
  23. on::change('[data-name="result"]', 'changeResult'),
  24. set::onRenderRow(jsRaw('renderRowData')),
  25. set::ajax(array('beforeSubmit' => jsRaw('clickSubmit'))),
  26. set::actions
  27. (
  28. array
  29. (
  30. array('text' => $lang->save, 'data-status' => 'normal', 'class' => 'primary', 'btnType' => 'submit'),
  31. array('text' => $lang->auditplan->saveDraft, 'data-status' => 'draft', 'class' => 'secondary', 'btnType' => 'submit')
  32. )
  33. ),
  34. set::title($lang->auditplan->check),
  35. set::mode('edit'),
  36. set::data(array_values($checkList)),
  37. set::items($items)
  38. );
  39. }
  40. else
  41. {
  42. $tips = $auditplan->objectType == 'zoutput' ? $lang->auditplan->outputTip : $lang->auditplan->noCheckList;
  43. formPanel
  44. (
  45. set::actions(''),
  46. set::title($lang->auditplan->check),
  47. div(setClass('h-32 center'), $tips)
  48. );
  49. }