<?php
/**
 * The edit relation file of task module of ZenTaoPMS.
 *
 * @copyright   Copyright 2009-2024 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
 * @license     ZPL (http://zpl.pub/page/zplv12.html)
 * @author      Qiyu Xie <xieqiyu@cnezsoft.com>
 * @package     execution
 * @version     $Id: editrelation.html.php 935 2024-08-08 15:14:24Z $
 * @link        https://www.zentao.net
 */
namespace zin;

jsVar('executionID', $executionID);

modalHeader(set::title($lang->execution->editRelation), set::entityID($relationID), set::entityText(''));

$items = array();
$items[] = array(
    'label' => $lang->execution->gantt->pretask,
    'name'  => 'pretask',
    'items' => $preTaskItems,
    'value' => $relation->pretask
);

$items[] = array(
    'label'    => $lang->execution->gantt->condition,
    'name'     => 'condition',
    'items'    => $lang->execution->gantt->preTaskStatus,
    'value'    => $relation->condition,
    'required' => true
);

$items[] = array(
    'label' => $lang->execution->gantt->task,
    'name'  => 'task',
    'items' => $postTaskItems,
    'value' => $relation->task
);

$items[] = array(
    'label'    => $lang->execution->gantt->action,
    'name'     => 'action',
    'items'    => $lang->execution->gantt->taskActions,
    'value'    => $relation->action,
    'required' => true
);

formPanel
(
    set::items($items),
    on::click('[data-name="pretask"]', 'loadTasks'),
    on::click('[data-name="task"]', 'loadTasks')
);
