close.html.php 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <?php
  2. /**
  3. * The comment view file of ticket 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 ticket
  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/kindeditor.html.php';?>
  15. <div id='mainContent' class='main-content'>
  16. <div class='main-header'>
  17. <h2><?php echo $lang->ticket->close;?></h2>
  18. </div>
  19. <form method='post' enctype='multipart/form-data' target='hiddenwin'>
  20. <table class='table table-form'>
  21. <tr>
  22. <th><?php echo $lang->ticket->closedReason?></th>
  23. <td><?php echo html::select('closedReason', $lang->ticket->closedReasonList, '', "class='form-control picker-select' required");?></td>
  24. <td></td>
  25. </tr>
  26. <tr class='hidden'>
  27. <th><?php echo $lang->ticket->repeatTicket?></th>
  28. <td><?php echo html::select('repeatTicket', $tickets, 0, "class='form-control'");?></td>
  29. </tr>
  30. <tr class='hidden'>
  31. <th><?php echo $lang->ticket->resolvedBy;?></th>
  32. <td><?php echo html::select('resolvedBy', $users, $app->user->account, "class='form-control chosen'");?></td>
  33. </tr>
  34. <tr class='hidden'>
  35. <th><?php echo $lang->ticket->resolvedDate;?></th>
  36. <td><div class='datepicker-wrapper datepicker-date'><?php echo html::input('resolvedDate', helper::now(), "class='form-control form-date'");?></div></td>
  37. </tr>
  38. <tr class='hidden'>
  39. <th><?php echo $lang->files;?></th>
  40. <td colspan='2'><?php echo $this->fetch('file', 'buildoldform', 'fileCount=1&percent=0.85');?></td>
  41. </tr>
  42. <tr class='hidden'>
  43. <th><?php echo $lang->ticket->resolution;?></th>
  44. <td colspan='2'><?php echo html::textarea('resolution', '', "rows='5' class='w-p100'");?></td>
  45. </tr>
  46. <?php $this->printExtendFields($ticket, 'table');?>
  47. <tr>
  48. <th><?php echo $lang->comment;?></th>
  49. <td colspan='2'><?php echo html::textarea('comment', '', "rows='5' class='w-p100'");?></td>
  50. </tr>
  51. <tr>
  52. <td colspan='3' class='text-center form-actions'>
  53. <?php echo html::submitButton();?>
  54. </td>
  55. </tr>
  56. </table>
  57. </form>
  58. <hr class='small' />
  59. <div class='main'><?php include $app->getModuleRoot() . 'common/view/action.html.php';?></div>
  60. </div>
  61. <script>
  62. $('#closedReason').change(function()
  63. {
  64. $('form table td').removeClass('required')
  65. $('#closedReason').closest('td').addClass('required')
  66. var value = $(this).val();
  67. $('#repeatTicket').parents('tr').toggleClass('hidden', (value !== 'repeat'));
  68. $('#resolvedBy').parents('tr').toggleClass('hidden', (value !== 'commented'));
  69. $('#resolvedDate').parents('tr').toggleClass('hidden', (value !== 'commented'));
  70. $('.file-input-list').parents('tr').toggleClass('hidden', (value !== 'commented'));
  71. $('#resolution').parents('tr').toggleClass('hidden', (value !== 'commented'));
  72. if(value == 'commented')
  73. {
  74. $('#resolvedBy').closest('td').addClass('required')
  75. $('#resolvedDate').closest('td').addClass('required')
  76. $('#resolution').closest('td').addClass('required')
  77. }
  78. if(value == 'repeat')
  79. {
  80. $('#repeatTicket').closest('td').addClass('required')
  81. }
  82. });
  83. $('#repeatTicket').picker({disableEmptySearch:true})
  84. </script>
  85. <?php include $app->getModuleRoot() . 'common/view/footer.lite.html.php';?>