createtask.html.php 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <?php
  2. /**
  3. * The create view of task module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2015 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
  6. * @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author Chunsheng Wang <chunsheng@cnezsoft.com>
  8. * @package task
  9. * @version $Id: create.html.php 5090 2013-07-10 05:49:24Z zhujinyonging@gmail.com $
  10. * @link http://www.zentao.net
  11. */
  12. ?>
  13. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  14. <?php include $app->getModuleRoot() . 'common/view/kindeditor.html.php';?>
  15. <?php include $app->getModuleRoot() . 'common/view/sortable.html.php';?>
  16. <?php js::set('vision', $config->vision);?>
  17. <?php js::set('requiredFields', $config->task->create->requiredFields);?>
  18. <?php js::set('estimateNotEmpty', sprintf($lang->error->gt, $lang->task->estimate, '0'))?>
  19. <div id='mainContent' class='main-content'>
  20. <div class='center-block'>
  21. <div class='main-header'>
  22. <h2><?php echo $lang->task->create;?></h2>
  23. </div>
  24. <form class='main-form form-ajax' method='post' enctype='multipart/form-data' id='dataform'>
  25. <table class='table table-form'>
  26. <tr>
  27. <th><?php echo $lang->marketresearch->execution;?></th>
  28. <td><?php echo html::select('execution', $stages, $stageID, "class='form-control chosen' onchange='loadAll(this.value)' required");?></td><td></td><td></td>
  29. </tr>
  30. <tr>
  31. <th><?php echo $lang->task->assignedTo;?></th>
  32. <td>
  33. <div class="input-group" id="dataPlanGroup">
  34. <?php echo html::select('assignedTo[]', $members, $task->assignedTo, "class='form-control chosen'");?>
  35. </div>
  36. </td>
  37. </tr>
  38. <tr>
  39. <th><?php echo $lang->task->name;?></th>
  40. <td colspan='3'>
  41. <div class='keep-row-height'>
  42. <div class="input-group title-group">
  43. <div class="input-control has-icon-right">
  44. <div class="colorpicker">
  45. <button type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown"><span class="cp-title"></span><span class="color-bar"></span><i class="ic"></i></button>
  46. <ul class="dropdown-menu clearfix">
  47. <li class="heading"><?php echo $lang->task->colorTag;?><i class="icon icon-close"></i></li>
  48. </ul>
  49. <input type="hidden" class="colorpicker" id="color" name="color" value="" data-icon="color" data-wrapper="input-control-icon-right" data-update-color="#name" data-provide="colorpicker">
  50. </div>
  51. <?php echo html::input('name', $task->name, "class='form-control' required");?>
  52. </div>
  53. <span class="input-group-addon fix-border br-0 priBox"><?php echo $lang->task->pri;?></span>
  54. <?php
  55. $hasCustomPri = false;
  56. foreach($lang->task->priList as $priKey => $priValue)
  57. {
  58. if(!empty($priKey) and (string)$priKey != (string)$priValue)
  59. {
  60. $hasCustomPri = true;
  61. break;
  62. }
  63. }
  64. $priList = $lang->task->priList;
  65. if(end($priList)) unset($priList[0]);
  66. if(!isset($priList[$task->pri]))
  67. {
  68. reset($priList);
  69. $task->pri = key($priList);
  70. }
  71. ?>
  72. <?php if($hasCustomPri):?>
  73. <?php echo html::select('pri', (array)$priList, $task->pri, "class='form-control'");?>
  74. <?php else: ?>
  75. <div class="input-group-btn pri-selector priBox" data-type="pri">
  76. <button type="button" class="btn dropdown-toggle br-0" data-toggle="dropdown">
  77. <span class="pri-text"><span class="label-pri label-pri-<?php echo empty($task->pri) ? '0' : $task->pri?>" title="<?php echo $task->pri?>"><?php echo $task->pri?></span></span> &nbsp;<span class="caret"></span>
  78. </button>
  79. <div class='dropdown-menu pull-right'>
  80. <?php echo html::select('pri', (array)$priList, $task->pri, "class='form-control' data-provide='labelSelector' data-label-class='label-pri'");?>
  81. </div>
  82. </div>
  83. <?php endif; ?>
  84. <div class="table-col w-120px estimateBox">
  85. <div class="input-group">
  86. <span class="input-group-addon fix-border br-0"><?php echo $lang->task->estimateAB;?></span>
  87. <input type="text" name="estimate" id="estimate" value="<?php echo $task->estimate;?>" class="form-control" autocomplete="off">
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. </td>
  93. </tr>
  94. <tr>
  95. <th><?php echo $lang->task->desc;?></th>
  96. <td colspan='3'>
  97. <?php echo $this->fetch('user', 'ajaxPrintTemplates', 'type=task&link=desc');?>
  98. <?php echo html::textarea('desc', htmlSpecialString($task->desc), "rows='10' class='form-control kindeditor'");?>
  99. </td>
  100. </tr>
  101. <tr>
  102. <th><?php echo $lang->files;?></th>
  103. <td colspan='3'><?php echo $this->fetch('file', 'buildoldform');?></td>
  104. </tr>
  105. <tr class="datePlanBox">
  106. <th><?php echo $lang->task->datePlan;?></th>
  107. <td colspan='2'>
  108. <div class='input-group'>
  109. <?php echo html::input('estStarted', '', "class='form-control form-date estStartedBox' placeholder='{$lang->task->estStarted}'");?>
  110. <span class="input-group-addon fix-border borderBox">~</span>
  111. <?php echo html::input('deadline', '', "class='form-control form-date deadlineBox' placeholder='{$lang->task->deadline}'");?>
  112. </div>
  113. </td>
  114. </tr>
  115. <tr class="mailtoBox">
  116. <th><?php echo $lang->task->mailto;?></th>
  117. <td colspan='3'>
  118. <div class="input-group">
  119. <?php echo html::select('mailto[]', $users, str_replace(' ', '', $task->mailto), "class='form-control picker-select' data-placeholder='{$lang->chooseUsersToMail}' multiple");?>
  120. </div>
  121. </td>
  122. </tr>
  123. <?php if(!isonlybody()):?>
  124. <tr id='after-tr'>
  125. <th><?php echo $lang->task->afterSubmit;?></th>
  126. <td colspan='3'><?php echo html::radio('after', $lang->marketresearch->task->afterChoices, !empty($task->id) ? 'toTaskList' : 'continueAdding');?></td>
  127. </tr>
  128. <?php endif;?>
  129. <tr>
  130. <td colspan='4' class='text-center form-actions'>
  131. <?php echo html::hidden('type', 'research');?>
  132. <?php echo html::submitButton();?>
  133. <?php echo html::backButton();?>
  134. </td>
  135. </tr>
  136. </table>
  137. </form>
  138. </div>
  139. </div>
  140. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>