m.batchcreate.html.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <?php
  2. /**
  3. * The task create mobile view file of task module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2016 禅道软件(青岛)有限公司(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 Fei Chen <chenfei@cnezsoft.com>
  8. * @package task
  9. * @version $Id
  10. * @link http://www.zentao.net
  11. */
  12. ?>
  13. <div class='heading divider'>
  14. <div class='title'><i class='icon-plus muted'></i> <strong><?php echo $lang->task->create;?></strong></div>
  15. <nav class='nav'><a data-dismiss='display'><i class='icon icon-remove muted'></i></a></nav>
  16. </div>
  17. <form class='content box' data-form-refresh='#page' method='post' id='createTaskForm' action='<?php echo $this->createLink('task', 'batchcreate', http_build_query($this->app->getParams()));?>'>
  18. <div class="control">
  19. <label for='module'><?php echo $lang->task->module;?></label>
  20. <div class='select'>
  21. <?php echo html::select('module[]', $modules, $moduleID, "onchange='setStories(this.value, $execution->id)'");?>
  22. <?php echo html::hidden("parent[]", $parent);?>
  23. </div>
  24. </div>
  25. <div class="control">
  26. <label for='type'><?php echo $lang->task->type;?></label>
  27. <div class='select'><?php echo html::select('type[]', $lang->task->typeList);?></div>
  28. </div>
  29. <div class='control'>
  30. <label for='assignedTo'><?php echo $lang->task->assignedTo;?></label>
  31. <div class='select'>
  32. <?php echo html::select('assignedTo[]', $members);?>
  33. </div>
  34. </div>
  35. <?php if(strpos(",$showFields,", ',story,') !== false and $config->global->flow != 'onlyTask'):?>
  36. <div class='control'>
  37. <label for='story'><?php echo $lang->task->story;?></label>
  38. <div class='select'><?php echo html::select('story[]', array(0 => '') + $stories, $storyID, 'onchange=setStoryModule()');?></div>
  39. </div>
  40. <?php endif;?>
  41. <div class='control'>
  42. <label for='name'><?php echo $lang->task->name;?></label>
  43. <?php echo html::input('name[]', '', "class='input' placeholder='{$lang->required}'");?>
  44. <?php echo html::hidden('color[]', '');?>
  45. </div>
  46. <div class='row'>
  47. <?php if(strpos(",$showFields,", ',pri,') !== false):?>
  48. <div class='cell-6'>
  49. <div class='control'>
  50. <label for='pri'><?php echo $lang->task->pri;?></label>
  51. <div class='select'><?php echo html::select('pri[]', $lang->task->priList);?></div>
  52. </div>
  53. </div>
  54. <?php endif;?>
  55. <?php if(strpos(",$showFields,", ',estimate,') !== false):?>
  56. <div class='cell-6'>
  57. <div class='control'>
  58. <label for='estimate'><?php echo $lang->task->estimate;?></label>
  59. <?php echo html::input('estimate[]', '', "class='input'");?>
  60. </div>
  61. </div>
  62. <?php endif;?>
  63. </div>
  64. <div class='control'>
  65. <label for='desc'><?php echo $lang->task->desc;?></label>
  66. <?php echo html::textarea('desc[]', '', "rews='5' class='textarea'");?>
  67. </div>
  68. <div class='row'>
  69. <?php if(strpos(",$showFields,", ',estStarted,') !== false):?>
  70. <div class='cell-6'>
  71. <div class='control'>
  72. <label for='estStarted'><?php echo $lang->task->estStarted;?></label>
  73. <input type='date' class='input' id='estStarted[]' name='estStarted[]'>
  74. </div>
  75. </div>
  76. <?php endif;?>
  77. <?php if(strpos(",$showFields,", ',deadline,') !== false):?>
  78. <div class='cell-6'>
  79. <div class='control'>
  80. <label for='deadline'><?php echo $lang->task->deadline;?></label>
  81. <input type='date' class='input' id='deadline[]' name='deadline[]'>
  82. </div>
  83. </div>
  84. <?php endif;?>
  85. </div>
  86. </form>
  87. <div class='footer has-padding'>
  88. <button type='button' data-submit='#createTaskForm' class='btn primary'><?php echo $lang->save;?></button>
  89. </div>
  90. <div class='template'>
  91. <div class='row flex-nowrap'>
  92. <div class='cell'>
  93. <div class='control'>
  94. <div class='select'>
  95. <?php echo html::select("team[key]", $members);?>
  96. </div>
  97. </div>
  98. </div>
  99. <div class='cell-4'>
  100. <div class='control'>
  101. <?php echo html::input("teamEstimate[key]", '', "type='number' step='0.01' class='input text-center' autocomplete='off' placeholder='{$lang->task->estimateAB}'") ?>
  102. </div>
  103. </div>
  104. <div class='cell flex-none'>
  105. <a class='btn member-deleter'><i class='icon-trash text-danger'></i></a>
  106. </div>
  107. </div>
  108. </div>
  109. <script>
  110. function setStoryModule()
  111. {
  112. var storyID = $('[name*=story]').val();
  113. if(storyID)
  114. {
  115. var link = createLink('story', 'ajaxGetModule', 'storyID=' + storyID);
  116. $.get(link, function(moduleID){$('[name*=module]').val(moduleID);});
  117. }
  118. }
  119. function setStories(moduleID, executionID)
  120. {
  121. link = createLink('story', 'ajaxGetExecutionStories', 'executionID=' + executionID + '&productID=0&branch=0&moduleID=' + moduleID);
  122. $.get(link, function(stories)
  123. {
  124. var storyID = $('[name*=story]').val();
  125. if(!stories) stories = '<select id="story0" name="story[]"></select>';
  126. $('[name*=story]').replaceWith(stories);
  127. $('[name*=story]').val(storyID);
  128. });
  129. }
  130. $(function()
  131. {
  132. $('#createTaskForm').modalForm().listenScroll({container: 'parent'});
  133. });
  134. </script>