create.html.php 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <?php
  2. /**
  3. * The create 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('productID', (!empty($productID) and $productID !== 'all') ? $productID : 0);?>
  17. <?php js::set('moduleID', !empty($moduleID) ? $moduleID : 0);?>
  18. <div id='mainContent' class='main-content'>
  19. <div class='main-header'>
  20. <h2><?php echo $lang->feedback->create?></h2>
  21. </div>
  22. <form method='post' class='form-ajax' enctype='multipart/form-data'>
  23. <table class='table table-form'>
  24. <tr>
  25. <th class='w-100px'><?php echo $lang->feedback->product?></th>
  26. <td><?php echo html::select('product', $products, (!empty($productID) and $productID !== 'all') ? $productID : '', "class='form-control chosen'")?></td>
  27. <td></td>
  28. </tr>
  29. <tr>
  30. <th class='w-100px'><?php echo $lang->feedback->module;?></th>
  31. <td><?php echo html::select('module', '', '', "class='form-control chosen'")?></td>
  32. <td></td>
  33. </tr>
  34. <tr>
  35. <th class='w-100px'><?php echo $lang->feedback->type?></th>
  36. <td><?php echo html::select('type', $lang->feedback->typeList, '', "class='form-control chosen'")?></td>
  37. </tr>
  38. <tr>
  39. <th><?php echo $lang->feedback->title?></th>
  40. <td colspan='2'>
  41. <div class='input-group'>
  42. <?php echo html::input('title', '', "class='form-control'")?>
  43. <span class='input-group-addon'>
  44. <div class='checkbox-primary'>
  45. <input type='checkbox' id='public' name='public' value='1' checked/>
  46. <label for='notify'><?php echo $lang->feedback->public?></label>
  47. </div>
  48. </span>
  49. <?php // begin print pri selector?>
  50. <span class="input-group-addon fix-border br-0"><?php echo $lang->feedback->pri;?></span>
  51. <?php
  52. $hasCustomPri = false;
  53. foreach($lang->feedback->priList as $priKey => $priValue)
  54. {
  55. if(!empty($priKey) and (string)$priKey != (string)$priValue)
  56. {
  57. $hasCustomPri = true;
  58. break;
  59. }
  60. }
  61. $priList = $lang->feedback->priList;
  62. if(end($priList)) unset($priList[0]);
  63. if(!isset($priList[$pri]))
  64. {
  65. reset($priList);
  66. $pri = key($priList);
  67. }
  68. ?>
  69. <?php if($hasCustomPri):?>
  70. <?php echo html::select('pri', (array)$priList, $pri, "class='form-control'");?>
  71. <?php else: ?>
  72. <div class="input-group-btn pri-selector" data-type="pri">
  73. <button type="button" class="btn dropdown-toggle br-0" data-toggle="dropdown">
  74. <span class="pri-text"><span class="label-pri label-pri-<?php echo empty($pri) ? '0' : $pri?>" title="<?php echo $pri?>"><?php echo $pri?></span></span> &nbsp;<span class="caret"></span>
  75. </button>
  76. <div class='dropdown-menu pull-right'>
  77. <?php echo html::select('pri', (array)$priList, $pri, "class='form-control' data-provide='labelSelector' data-label-class='label-pri'");?>
  78. </div>
  79. </div>
  80. <?php endif; ?>
  81. <?php // end print pri selector ?>
  82. </div>
  83. </td>
  84. </tr>
  85. <tr>
  86. <th><?php echo $lang->feedback->desc?></th>
  87. <td colspan='2'>
  88. <?php echo $this->fetch('user', 'ajaxPrintTemplates', 'type=feedback&link=desc');?>
  89. <?php echo html::textarea('desc', '', "class='form-control'")?>
  90. </td>
  91. </tr>
  92. <tr class='hide'>
  93. <th><?php echo $lang->feedback->status;?></th>
  94. <td><?php echo html::hidden('status', 'wait');?></td>
  95. </tr>
  96. <?php $this->printExtendFields('', 'table');?>
  97. <tr>
  98. <th><?php echo $lang->feedback->feedbackBy;?></th>
  99. <td><?php echo html::input('feedbackBy', '', "class='form-control'");?></td>
  100. </tr>
  101. <tr>
  102. <th><?php echo $lang->feedback->source;?></th>
  103. <td><?php echo html::input('source', '', "class='form-control'");?></td>
  104. </tr>
  105. <tr>
  106. <th><?php echo $lang->feedback->notifyEmail;?></th>
  107. <td><?php echo html::input('notifyEmail', '', "class='form-control'");?></td>
  108. </tr>
  109. <tr>
  110. <th><?php echo $lang->feedback->mailto;?></th>
  111. <td>
  112. <div class="input-group">
  113. <?php echo html::select('mailto[]', $users, '', "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', '', "class='form-control'");?></td>
  121. </tr>
  122. <tr>
  123. <th><?php echo $lang->feedback->files;?></th>
  124. <td><?php echo $this->fetch('file', 'buildform');?></td>
  125. </tr>
  126. <tr>
  127. <th><?php echo $lang->feedback->notify;?></th>
  128. <td>
  129. <div class='checkbox-primary'>
  130. <input type='checkbox' id='notify' name='notify' value='1' checked />
  131. <label for='notify'><?php echo $lang->feedback->mailNotify?></label>
  132. </div>
  133. </td>
  134. </tr>
  135. <tr>
  136. <td colspan='3' class='text-center form-actions'>
  137. <?php echo html::submitButton();?>
  138. <?php echo html::backButton();?>
  139. <?php if($relation) echo html::hidden("{$relation->field}", $relation->prevDataID);?>
  140. </td>
  141. </tr>
  142. </table>
  143. </form>
  144. </div>
  145. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>