editnormal.html.php 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <?php js::set('confirmChangProduct', $lang->demand->confirmChangProduct);?>
  2. <?php js::set('distributedProducts', $distributedProducts);?>
  3. <?php js::set('isUndetermined', $demand->product == '');?>
  4. <form method='post' enctype='multipart/form-data' class='form-ajax' id='dataform'>
  5. <div class='main-header'>
  6. <h2>
  7. <span class='label label-id'><?php echo $demand->id;?></span>
  8. <?php echo html::a($this->createLink('demand', 'view', "demandID=$demand->id"), $demand->title, '', 'class="demand-title"');?>
  9. <small><?php echo $lang->arrow . ' ' . $lang->demand->edit;?></small>
  10. </h2>
  11. </div>
  12. <div class='main-row'>
  13. <div class='main-col col-8'>
  14. <div class='cell'>
  15. <div class='form-group titleBox'>
  16. <div class="input-control has-icon-right">
  17. <div class="colorpicker">
  18. <button type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown" title="<?php echo $lang->task->colorTag ?>"><span class="cp-title"></span><span class="color-bar"></span><i class="ic"></i></button>
  19. <ul class="dropdown-menu clearfix">
  20. <li class="heading"><?php echo $lang->demand->colorTag;?><i class="icon icon-close"></i></li>
  21. </ul>
  22. <input type="hidden" class="colorpicker" id="color" name="color" value="<?php echo $demand->color ?>" data-icon="color" data-wrapper="input-control-icon-right" data-update-color=".demand-title" data-provide="colorpicker">
  23. </div>
  24. <?php echo html::input('title', $demand->title, 'class="form-control disabled demand-title" disabled="disabled"');?>
  25. </div>
  26. </div>
  27. <div class='detail'>
  28. <div class='detail-title'><?php echo $lang->demand->spec;?></div>
  29. <div class='detail-content article-content'>
  30. <?php echo $demand->spec;?>
  31. </div>
  32. </div>
  33. <div class='detail'>
  34. <div class='detail-title'><?php echo $lang->demand->verify;?></div>
  35. <div class='detail-content article-content'>
  36. <?php echo $demand->verify;?>
  37. </div>
  38. </div>
  39. <?php $showFile = (strpos('draft,changing', $demand->status) === false and empty($demand->files)) ? false : true;?>
  40. <?php if($showFile):?>
  41. <div class='detail'>
  42. <div class='detail-title'><?php echo $lang->attatch;?></div>
  43. <div class='form-group'>
  44. <?php $canChangeFile = strpos('draft,changing', $demand->status) !== false ? true : false;?>
  45. <?php echo $this->fetch('file', 'printFiles', array('files' => $demand->files, 'fieldset' => 'false', 'object' => $demand, 'method' => 'edit', 'showDelete' => $canChangeFile));?>
  46. <?php echo $canChangeFile ? $this->fetch('file', 'buildoldform') : '';?>
  47. </div>
  48. </div>
  49. <?php endif;?>
  50. <?php $this->printExtendFields($demand, 'div', 'position=left');?>
  51. <div class='detail'>
  52. <div class='detail-title'><?php echo $lang->demand->comment;?></div>
  53. <div class='form-group'>
  54. <?php echo html::textarea('comment', '', "rows='5' class='form-control'");?>
  55. </div>
  56. </div>
  57. <div class='actions form-actions text-center'>
  58. <?php
  59. echo html::hidden('lastEditedDate', $demand->lastEditedDate);
  60. if(strpos('draft,changing', $demand->status) !== false)
  61. {
  62. echo html::commonButton($lang->save, "id='saveButton'", 'btn btn-primary btn-wide');
  63. echo html::commonButton($demand->status == 'changing' ? $lang->demand->doNotSubmit : $lang->demand->saveDraft, "id='saveDraftButton'", 'btn btn-secondary btn-wide');
  64. }
  65. else
  66. {
  67. echo html::submitButton($lang->save);
  68. }
  69. if(!isonlybody()) echo html::backButton();
  70. ?>
  71. </div>
  72. <hr class='small' />
  73. <?php include $app->getModuleRoot() . 'common/view/action.html.php';?>
  74. </div>
  75. </div>
  76. <div class='side-col col-4'>
  77. <div class='cell'>
  78. <div class='detail'>
  79. <div class='detail-title'><?php echo $lang->demand->basicInfo;?></div>
  80. <table class='table table-form'>
  81. <tr>
  82. <th><?php echo $lang->demand->pool;?></th>
  83. <td><?php echo html::select('pool', $demandpools, $demand->pool, "class='form-control chosen'");?></td>
  84. </tr>
  85. <tr>
  86. <th><?php echo $lang->demand->product;?></th>
  87. <td>
  88. <div class='input-group'>
  89. <?php $undetermined = empty(trim($demand->product, ',')) ? 'checked' : '';?>
  90. <?php $disableProduct = $undetermined ? "disabled='disabled'" : '';?>
  91. <?php $hideProductName = $undetermined ? '' : 'hidden';?>
  92. <?php echo html::select('product[]', $products, $demand->product, "class='form-control picker-select' $disableProduct data-max_drop_width multiple");?>
  93. <?php echo html::input('undeterminedProduct', '', "class='form-control $hideProductName' disabled");?>
  94. <span class='input-group-addon'>
  95. <div class="checkbox-primary">
  96. <input type="checkbox" name="undetermined" value="0" id="undetermined" <?php echo $undetermined;?> onchange="toggleProductDropdown()"/>
  97. <label for="undetermined0"><?php echo $lang->demand->undetermined;?></label>
  98. </div>
  99. </span>
  100. </div>
  101. </td>
  102. </tr>
  103. <tr>
  104. <th><?php echo $lang->demand->source;?></th>
  105. <td><?php echo html::select('source', $lang->demand->sourceList, $demand->source, "class='form-control chosen'");?></td>
  106. </tr>
  107. <tr>
  108. <th id='sourceNoteBox'><?php echo $lang->demand->sourceNote;?></th>
  109. <td><?php echo html::input('sourceNote', $demand->sourceNote, "class='form-control'");?></td>
  110. </tr>
  111. <tr>
  112. <th><?php echo $lang->demand->duration;?></th>
  113. <td><?php echo html::select('duration', $lang->demand->durationList, $demand->duration, "class='form-control chosen'");?></td>
  114. </tr>
  115. <tr>
  116. <th><?php echo $lang->demand->BSA;?></th>
  117. <td><?php echo html::select('BSA', $lang->demand->bsaList, $demand->BSA, "class='form-control chosen'");?></td>
  118. </tr>
  119. <tr>
  120. <th><?php echo $lang->demand->feedbackedBy;?></th>
  121. <td><?php echo html::input('feedbackedBy', $demand->feedbackedBy, "class='form-control'");?></td>
  122. </tr>
  123. <tr>
  124. <th><?php echo $lang->demand->email;?></th>
  125. <td><?php echo html::input('email', $demand->email, "class='form-control'");?></td>
  126. </tr>
  127. <?php if($demand->parent >= 0):?>
  128. <tr>
  129. <th><?php echo $lang->demand->parent;?></th>
  130. <td><?php echo html::select('parent', $parents, $demand->parent, "class='form-control chosen'");?></td>
  131. </tr>
  132. <?php endif;?>
  133. <tr>
  134. <th><?php echo $lang->demand->status;?></th>
  135. <td>
  136. <span class='demand-<?php echo $demand->status;?>'><?php echo $this->processStatus('demand', $demand);?></span>
  137. <?php echo html::hidden('status', $demand->status);?>
  138. </td>
  139. </tr>
  140. <tr>
  141. <th><?php echo $lang->demand->category;?></th>
  142. <td><?php echo html::select('category', $lang->demand->categoryList, $demand->category, "class='form-control chosen'");?></td>
  143. </tr>
  144. <tr>
  145. <th><?php echo $lang->demand->pri;?></th>
  146. <td><?php echo html::select('pri', $lang->demand->priList, $demand->pri, "class='form-control chosen'");?></td>
  147. </tr>
  148. <tr>
  149. <th><?php echo $lang->demand->mailto;?></th>
  150. <td>
  151. <div class='input-group'>
  152. <?php echo html::select('mailto[]', $users, $demand->mailto, "class='form-control picker-select' multiple");?>
  153. <?php echo $this->fetch('my', 'buildContactLists');?>
  154. </div>
  155. </td>
  156. </tr>
  157. <tr>
  158. <th><?php echo $lang->demand->keywords;?></th>
  159. <td><?php echo html::input('keywords', $demand->keywords, "class='form-control'");?></td>
  160. </tr>
  161. </table>
  162. </div>
  163. <div class='detail'>
  164. <div class='detail-title'><?php echo $lang->story->legendLifeTime;?></div>
  165. <table class='table table-form'>
  166. <tr>
  167. <th class='thWidth'><?php echo $lang->demand->createdBy;?></th>
  168. <td><?php echo zget($users, $demand->createdBy);?></td>
  169. </tr>
  170. <tr>
  171. <th><?php echo $lang->demand->assignedTo;?></th>
  172. <td><?php echo html::select('assignedTo', $assignToList, $demand->assignedTo, 'class="form-control chosen"');?></td>
  173. </tr>
  174. <?php if($demand->status == 'reviewing'):?>
  175. <tr>
  176. <th><?php echo $lang->demand->reviewer;?></th>
  177. <td><?php echo html::select('reviewer[]', $reviewers, $demand->reviewers, 'class="form-control picker-select" multiple');?></td>
  178. </tr>
  179. <?php endif;?>
  180. <?php if($demand->status == 'closed'):?>
  181. <tr>
  182. <th><?php echo $lang->demand->closedBy;?></th>
  183. <td><?php echo html::select('closedBy', $users, $demand->closedBy, 'class="form-control chosen"');?></td>
  184. </tr>
  185. <tr>
  186. <th><?php echo $lang->demand->closedReason;?></th>
  187. <td><?php echo html::select('closedReason', $lang->demand->reasonList, $demand->closedReason, "class='form-control' onchange='setStory(this.value)'");?></td>
  188. </tr>
  189. <?php endif;?>
  190. </table>
  191. </div>
  192. </div>
  193. </div>
  194. </div>
  195. </form>