editrelation.html.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. /**
  3. * The edit relation file of task module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2024 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
  6. * @license ZPL (http://zpl.pub/page/zplv12.html)
  7. * @author Qiyu Xie <xieqiyu@cnezsoft.com>
  8. * @package execution
  9. * @version $Id: editrelation.html.php 935 2024-08-08 15:14:24Z $
  10. * @link https://www.zentao.net
  11. */
  12. namespace zin;
  13. jsVar('executionID', $executionID);
  14. jsVar('projectID', $projectID);
  15. jsVar('relationID', $relationID);
  16. modalHeader(set::title($lang->execution->editRelation), set::entityID($relationID), set::entityText(''), to::suffix(span(setClass('title-suffix text-sm font-normal ml-2'), $toolTips ? icon('exclamation-sign', setData(array('toggle' => 'tooltip', 'title' => $toolTips, 'placement' => 'top-end'))) : null, span(setClass('text-danger ml-1'), $titleTips))));
  17. $items = array();
  18. $items[] = array(
  19. 'hidden' => true,
  20. 'name' => 'id',
  21. 'value' => $relation->id
  22. );
  23. $items[] = array(
  24. 'label' => $lang->execution->gantt->pretask,
  25. 'name' => 'pretask',
  26. 'items' => $tasks,
  27. 'value' => $relation->pretask,
  28. 'required' => true
  29. );
  30. $items[] = array(
  31. 'label' => $lang->execution->gantt->condition,
  32. 'name' => 'condition',
  33. 'items' => $lang->execution->gantt->preTaskStatus,
  34. 'value' => $relation->condition,
  35. 'required' => true
  36. );
  37. $items[] = array(
  38. 'label' => $lang->execution->gantt->task,
  39. 'name' => 'task',
  40. 'items' => $tasks,
  41. 'value' => $relation->task,
  42. 'required' => true
  43. );
  44. $items[] = array(
  45. 'label' => $lang->execution->gantt->action,
  46. 'name' => 'action',
  47. 'items' => $lang->execution->gantt->taskActions,
  48. 'value' => $relation->action,
  49. 'required' => true
  50. );
  51. formPanel
  52. (
  53. set::items($items),
  54. on::click('[data-name="pretask"]', 'loadTasks'),
  55. on::click('[data-name="task"]', 'loadTasks'),
  56. on::change('[name=pretask], [name=task]', 'changeTask')
  57. );