batchcreate.html.php 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * The batchcreate view file of opportunity module of ZenTaoPMS.
  4. * @copyright Copyright 2009-2024 禅道软件(青岛)有限公司(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 Shujie Tian <tianshujie@chandao.com>
  7. * @package opportunity
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. $isEn = $app->getClientLang() == 'en';
  12. $items = array();
  13. /* Field of ID. */
  14. $items[] = array('name' => 'id', 'label' => $lang->idAB, 'control' => 'index', 'width' => '32px');
  15. /* Field of execution. */
  16. if(!empty($project->multiple)) $items[] = array('name' => 'execution', 'label' => $lang->opportunity->execution, 'control' => 'picker', 'items' => $executions, 'value' => isset($executionID) ? $executionID : '', 'width' => '200px');
  17. /* Field of name. */
  18. $items[] = array( 'name' => 'name', 'label' => $lang->opportunity->name, 'required' => true, 'control' => 'input', 'width' => '200px');
  19. /* Field of source. */
  20. $items[] = array('name' => 'source', 'label' => $lang->opportunity->source, 'control' => 'picker', 'items' => $lang->opportunity->sourceList, 'value' => '', 'width' => '200px');
  21. /* Field of impact. */
  22. $items[] = array('name' => 'impact', 'label' => $lang->opportunity->impact, 'control' => array('control' => 'picker', 'required' => true), 'items' => $lang->opportunity->impactList, 'value' => 3, 'width' => '90px');
  23. /* Field of chance. */
  24. $items[] = array('name' => 'chance', 'label' => $lang->opportunity->chance, 'control' => array('control' => 'picker', 'required' => true), 'items' => $lang->opportunity->chanceList, 'value' => 3, 'width' => '90px');
  25. /* Field of ratio. */
  26. $items[] = array('name' => 'ratio', 'label' => $lang->opportunity->ratio, 'control' => 'input', 'readonly' => true, 'value' => 9, 'width' => $isEn ? '140px' : '90px');
  27. /* Field of pri. */
  28. $items[] = array('name' => 'pri', 'label' => $lang->opportunity->pri, 'control' => 'priPicker', 'readonly' => true, 'value' => 2, 'width' => '90px');
  29. /* Field of desc. */
  30. $items[] = array('name' => 'desc', 'label' => $lang->opportunity->desc, 'control' => 'textarea', 'value' => '', 'width' => '150px');
  31. formBatchPanel
  32. (
  33. on::change('[data-name=impact]', 'computeIndex'),
  34. on::change('[data-name=chance]', 'computeIndex'),
  35. set::title($lang->opportunity->batchCreate),
  36. set::pasteField('name'),
  37. set::items($items)
  38. );