edit.html.php 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <?php
  2. /**
  3. * The edit view file of feedback 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 Yidong Wang <yidong@cnezsoft.com>
  8. * @package feedback
  9. * @version $Id$
  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/chosen.html.php';?>
  15. <?php include $app->getModuleRoot() . 'common/view/kindeditor.html.php';?>
  16. <?php js::set('browseType', $browseType);?>
  17. <div id='mainContent' class='main-content'>
  18. <div class='main-header'>
  19. <h2>
  20. <span class='label label-id'><?php echo $feedback->id;?></span>
  21. <?php echo html::a(inlink('view', "id=$feedback->id"), $feedback->title);?>
  22. <small><?php echo html::icon($lang->icons['edit']) . ' ' . $lang->edit;?></small>
  23. </h2>
  24. </div>
  25. <form class='main-form form-ajax' method='post' enctype='multipart/form-data'>
  26. <table class='table table-form'>
  27. <tr>
  28. <th class='w-80px'><?php echo $lang->feedback->product?></th>
  29. <td><?php echo html::select('product', $products, $feedback->product, "class='form-control chosen'")?></td>
  30. <td></td>
  31. </tr>
  32. <tr>
  33. <th class='w-80px'><?php echo $lang->feedback->module?></th>
  34. <td><?php echo html::select('module', $modules, $feedback->module, "class='form-control chosen'")?></td>
  35. <td></td>
  36. </tr>
  37. <tr>
  38. <th class='w-80px'><?php echo $lang->feedback->type;?></th>
  39. <td><?php echo html::select('type', $lang->feedback->typeList, $feedback->type, "class='form-control chosen'")?></td>
  40. </tr>
  41. <tr>
  42. <th><?php echo $lang->feedback->title?></th>
  43. <td colspan='2'>
  44. <div class='input-group'>
  45. <?php echo html::input('title', $feedback->title, "class='form-control'")?>
  46. <span class='input-group-addon'>
  47. <div class='checkbox-primary'>
  48. <input type='checkbox' id='public' name='public' value='1' <?php if($feedback->public) echo 'checked'?> />
  49. <label for='notify'><?php echo $lang->feedback->public?></label>
  50. </div>
  51. </span>
  52. <?php // begin print pri selector?>
  53. <span class="input-group-addon fix-border br-0"><?php echo $lang->feedback->pri;?></span>
  54. <?php
  55. $hasCustomPri = false;
  56. foreach($lang->feedback->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->feedback->priList;
  65. if(end($priList)) unset($priList[0]);
  66. if(!isset($priList[$feedback->pri]))
  67. {
  68. reset($priList);
  69. $feedback->pri = key($priList);
  70. }
  71. ?>
  72. <?php if($hasCustomPri):?>
  73. <?php echo html::select('pri', (array)$priList, $feedback->pri, "class='form-control'");?>
  74. <?php else: ?>
  75. <div class="input-group-btn pri-selector" 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($feedback->pri) ? '0' : $feedback->pri?>" title="<?php echo $feedback->pri?>"><?php echo $feedback->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, $feedback->pri, "class='form-control' data-provide='labelSelector' data-label-class='label-pri'");?>
  81. </div>
  82. </div>
  83. <?php endif; ?>
  84. <?php // end print pri selector ?>
  85. </div>
  86. </td>
  87. </tr>
  88. <tr>
  89. <th><?php echo $lang->feedback->desc?></th>
  90. <td colspan='2'><?php echo html::textarea('desc', $feedback->desc, "class='form-control'")?></td>
  91. </tr>
  92. <tr class='hide'>
  93. <th><?php echo $lang->feedback->status;?></th>
  94. <td><?php echo html::hidden('status', $feedback->status);?></td>
  95. </tr>
  96. <?php $this->printExtendFields($feedback, 'table');?>
  97. <tr>
  98. <th><?php echo $lang->feedback->feedbackBy;?></th>
  99. <td><?php echo html::input('feedbackBy', $feedback->feedbackBy, "class='form-control'");?></td>
  100. </tr>
  101. <tr>
  102. <th><?php echo $lang->feedback->source;?></th>
  103. <td><?php echo html::input('source', $feedback->source, "class='form-control'");?></td>
  104. </tr>
  105. <tr>
  106. <th><?php echo $lang->feedback->notifyEmail;?></th>
  107. <td><?php echo html::input('notifyEmail', $feedback->notifyEmail, "class='form-control'");?></td>
  108. </tr>
  109. <tr>
  110. <th><?php echo $lang->story->mailto;?></th>
  111. <td>
  112. <div class="input-group">
  113. <?php echo html::select('mailto[]', $users, str_replace(' ', '', $feedback->mailto), "class='form-control picker-select' data-placeholder='{$lang->chooseUsersToMail}' multiple");?>
  114. <?php echo $this->fetch('my', 'buildContactLists');?>
  115. </div>
  116. </td>
  117. </tr>
  118. <tr>
  119. <th><?php echo $lang->feedback->keywords;?></th>
  120. <td><?php echo html::input('keywords', $feedback->keywords, "class='form-control'");?></td>
  121. </tr>
  122. <tr>
  123. <th><?php echo $lang->feedback->files;?></th>
  124. <td>
  125. <?php echo $this->fetch('file', 'printFiles', array('files' => $feedback->files, 'fieldset' => 'false', 'object' => $feedback, 'method' => 'edit'));?>
  126. <?php echo $this->fetch('file', 'buildform');?>
  127. </td>
  128. </tr>
  129. <tr>
  130. <th><?php echo $lang->feedback->notify;?></th>
  131. <td>
  132. <div class='checkbox-primary'>
  133. <input type='checkbox' id='notify' name='notify' value='1' <?php if($feedback->notify) echo 'checked'?> />
  134. <label for='notify'><?php echo $lang->feedback->mailNotify?></label>
  135. </div>
  136. </td>
  137. </tr>
  138. <tr>
  139. <td colspan='3' class='text-center form-actions'>
  140. <?php echo html::submitButton();?>
  141. <?php echo html::backButton();?>
  142. </td>
  143. </tr>
  144. </table>
  145. </form>
  146. </div>
  147. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>