m.resolve.html.php 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?php
  2. /**
  3. * The resolve mobile view file of bug 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 bug
  9. * @version $Id$
  10. * @link http://www.zentao.net
  11. */
  12. ?>
  13. <div class='heading divider'>
  14. <span class='title'><strong><?php echo $lang->bug->resolve ?></strong> #<?php echo $bug->id ?></span>
  15. <nav class='nav'>
  16. <a data-dismiss='display'><i class='icon-remove muted'></i></a>
  17. </nav>
  18. </div>
  19. <form class='has-padding content' method='post' target='hiddenwin' action='<?php echo $this->createLink('bug', 'resolve', "id=$bug->id")?>' id='resolveForm' data-form-refresh='#page' enctype='multipart/form-data'>
  20. <div class='control'>
  21. <label for='resolution'><?php echo $lang->bug->resolution;?></label>
  22. <div class='select'><?php echo html::select('resolution', $lang->bug->resolutionList, '', "onchange='setDuplicate(this.value)'");?></div>
  23. </div>
  24. <div class="control hidden" id='duplicateBugBox'>
  25. <label for='duplicateBug'><?php echo $lang->bug->duplicateBug;?></label>
  26. <?php echo html::input('duplicateBug', '', "class='input'");?>
  27. </div>
  28. <div class="control">
  29. <div>
  30. <label for='resolvedBuild'><strong><?php echo $lang->bug->resolvedBuild;?></strong></label>
  31. <?php if(common::hasPriv('build', 'create')):?>
  32. <span><input type="checkbox" name="createBuild" value='1' id='createBuild'> <?php echo $lang->bug->createBuild?></span>
  33. <?php endif;?>
  34. </div>
  35. <div id='resolvedBuildBox' class='select'><?php echo html::select('resolvedBuild', $builds, '');?></div>
  36. <?php if(common::hasPriv('build', 'create')):?>
  37. <span id='newBuildBox' class='hidden'><?php echo html::input('buildName', '', "class='input' placeholder='{$lang->bug->placeholder->newBuildName}'");?></span>
  38. <?php endif;?>
  39. </div>
  40. <div class="control hidden" id='newBuildExecutionBox'>
  41. <label for='buildExecution'><?php echo $lang->bug->execution;?></label>
  42. <div class='select'><?php echo html::select('buildExecution', $executions, '');?></div>
  43. </div>
  44. <div class="control">
  45. <label for='resolvedDate'><?php echo $lang->bug->resolvedDate;?></label>
  46. <input type='date' id='resolvedDate' name='resolvedDate' class='input' />
  47. </div>
  48. <div class="control">
  49. <label for='assignedTo'><?php echo $lang->bug->assignedTo;?></label>
  50. <div class='select'><?php echo html::select('assignedTo', $users, $assignedTo);?></div>
  51. </div>
  52. <div class='control'>
  53. <label for='comment'><?php echo $lang->story->comment;?></label>
  54. <?php echo html::textarea('comment', '', 'rows=2 class="textarea"');?></td>
  55. </div>
  56. <div class='control'>
  57. <?php echo $this->fetch('file', 'buildform');?>
  58. </div>
  59. </form>
  60. <div class='footer has-padding'>
  61. <button type='button' id='submitButton' class='btn primary'><?php echo $lang->save ?></button>
  62. </div>
  63. <script>
  64. $(function()
  65. {
  66. $('#createBuild').change(function()
  67. {
  68. if($(this).prop('checked'))
  69. {
  70. $('#resolvedBuildBox').addClass('hidden');
  71. $('#newBuildBox').removeClass('hidden');
  72. $('#newBuildExecutionBox').removeClass('hidden');
  73. }
  74. else
  75. {
  76. $('#resolvedBuildBox').removeClass('hidden');
  77. $('#newBuildBox').addClass('hidden');
  78. $('#newBuildExecutionBox').addClass('hidden');
  79. }
  80. })
  81. $('#submitButton').click(function(){$('#resolveForm').submit()});
  82. })
  83. </script>