<?php
/**
 * The finish view file of task module of ZDOO.
 *
 * @copyright   Copyright 2009-2018 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
 * @license     ZPL (http://zpl.pub/page/zplv12.html)
 * @author      Tingting Dai <daitingting@xirangit.com>
 * @package     task
 * @version     $Id$
 * @link        http://www.zdoo.com
 */
?>
<?php include '../../common/view/header.modal.html.php';?>
<?php include '../../common/view/editor.html.php';?>
<form method='post' id='finishForm' action='<?php echo $this->createLink('task', 'finish', "taskID={$task->id}&from=$from&laneID=$laneID")?>'>
  <table class='table table-form'>
    <?php if($project->taskStatus != 'simple'): ?>
    <tr>
      <th class='w-60px'><?php echo empty($task->team) ? $lang->task->consumed : $lang->task->myConsumption;?></th>
      <td class='w-p45'><?php echo html::input('consumed', $task->consumed ? $task->consumed : '', "class='form-control' autocomplete='off'")?></td>
      <td></td>
    </tr>
    <?php endif;?>
    <tr>
      <th><?php echo $lang->task->assignedTo;?></th>
      <td><?php echo html::select('assignedTo', $users, $task->createdBy, "class='form-control'");?></td>
      <td></td>
    </tr>
    <?php if($project->taskStatus != 'simple'): ?>
    <tr>
      <th><?php echo $lang->task->finishedDate;?></th>
      <td><?php echo html::input('finishedDate', helper::now(), "class='form-control form-datetime'");?></td>
      <td></td>
    </tr>
    <?php endif;?>
    <?php if(commonModel::hasPriv('file', 'upload')):?>
    <tr>
      <th><?php echo $lang->files;?></th>
      <td colspan='2'><?php echo $this->fetch('file', 'buildForm')?></td>
    </tr>
    <?php endif;?>
    <tr>
      <th><?php echo $lang->comment?></th>
      <td colspan='2'><?php echo html::textarea('comment');?></td>
    </tr>
    <tr>
      <th></th>
      <td class='form-actions'><?php echo html::submitButton();?></td>
      <td></td>
    </tr>
  </table>
  <?php echo $this->fetch('action', 'history', "objectType=task&objectID={$task->id}")?>
</form>
<?php include '../../common/view/footer.modal.html.php';?>
