batchedit.html.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * The batch edit view file of ticket 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 Mengyi Liu
  7. * @package ticket
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. $moduleItems = array();
  12. foreach($modules as $productID => $productModules)
  13. {
  14. $moduleItems[$productID] = array();
  15. foreach($productModules as $moduleID => $moduleName) $moduleItems[$productID][] = array('text' => $moduleName, 'value' => $moduleID);
  16. }
  17. jsVar('modules', $moduleItems);
  18. jsVar('batchEditTip', $batchEditTip);
  19. $items = $this->config->ticket->form->batchEdit;
  20. $items['product']['items'] = $products;
  21. $items['module']['items'] = array();
  22. $items['module']['control'] = array('control' => 'picker', 'required' => true);
  23. $items['pri']['items'] = $this->lang->ticket->priList;
  24. $items['type']['items'] = $this->lang->ticket->typeList;
  25. $items['assignedTo']['items'] = $users;
  26. foreach(array_filter(explode(',', $config->ticket->edit->requiredFields)) as $field)
  27. {
  28. if(isset($items[$field])) $items[$field]['required'] = true;
  29. }
  30. formBatchPanel(on::change('[data-name="product"]', 'changeModule'), set::onRenderRow(jsRaw('renderRowData')), set::title($lang->ticket->batchEdit), set::mode('edit'), set::items($items), set::data(array_values($tickets)));
  31. render();