distribute.html.php 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  2. <?php include $app->getModuleRoot() . 'common/view/kindeditor.html.php';?>
  3. <?php js::set('prckerList', array());?>
  4. <div id="mainContent" class="main-content fade">
  5. <div class="center-block">
  6. <div class="main-header">
  7. <h2>
  8. <span class='label label-id'><?php echo $demand->id;?></span>
  9. <span title='<?php echo $demand->title;?>'><?php echo $demand->title;?></span>
  10. </h2>
  11. </div>
  12. <form class="load-indicator main-form form-ajax" method='post' enctype='multipart/form-data' id='dataform'>
  13. <table class="table table-form">
  14. <tbody>
  15. <?php foreach($preProducts as $index => $productID):?>
  16. <tr>
  17. <th class='w-100px'><?php echo $lang->demand->distributeProduct;?></th>
  18. <td class='w-p45 productsBox'>
  19. <div class='input-group required select'>
  20. <?php echo html::select("product[$index]", $products, $productID, "onchange='loadProductBranches(this.value, $index);' data-index='$index' class='form-control'");?>
  21. <span class='input-group-addon fix-border fix-padding'></span>
  22. <?php if(common::hasPriv('product', 'create') and count($products) <= 1):?>
  23. <span class='input-group-addon newProduct'>
  24. <?php echo html::checkBox('newProduct', $lang->demand->addProduct, '', "onchange=addNewProduct(this);");?>
  25. </span>
  26. <?php endif;?>
  27. </div>
  28. <div class="input-group addProduct hidden">
  29. <?php echo html::input('productName', '', "class='form-control'");?>
  30. <span class='input-group-addon required'><?php echo html::checkBox('newProduct', $lang->demand->addProduct, '', "onchange=addNewProduct(this);");?></span>
  31. </div>
  32. </td>
  33. <td class='w-p45 roadmapBox' id='roadmapBox'>
  34. <div class='input-group select'>
  35. <span class='input-group-addon'><?php echo $lang->demand->roadmap;?></span>
  36. <?php echo html::select("roadmap[$index]", $roadmaps, '', 'class="form-control"');?>
  37. <span class='input-group-addon fix-border fix-padding'></span>
  38. <?php if(common::hasPriv('roadmap', 'create') and empty($roadmaps)):?>
  39. <span class='input-group-addon newRoadmap<?php echo $index;?> hidden'>
  40. <?php echo html::checkBox("newRoadmap$index", $lang->demand->addRoadmap, '', "onchange=addNewRoadmap(this,'$index');");?>
  41. </span>
  42. <?php endif;?>
  43. </div>
  44. <div class="input-group addRoadmap hidden required">
  45. <span class='input-group-addon'><?php echo $lang->demand->roadmap;?></span>
  46. <?php echo html::input("roadmapName[$index]", '', "class='form-control'");?>
  47. <span class='input-group-addon'><?php echo html::checkBox("newRoadmap$index", $lang->demand->addRoadmap, '', "onchange=addNewRoadmap(this,'$index')");?></span>
  48. </div>
  49. </td>
  50. <td class='c-actions text-center w-p10'>
  51. <a href='javascript:;' onclick='addItem(this)' class='addItem btn btn-link'><i class='icon-plus'></i></a>
  52. <a href='javascript:;' onclick='deleteItem(this)' class='deleteItem btn btn-link'><i class='icon icon-close'></i></a>
  53. </td>
  54. </tr>
  55. <?php endforeach;?>
  56. <tr>
  57. <th><?php echo $lang->comment;?></th>
  58. <td colspan='2'><?php echo html::textarea('comment', '', "rows='6' class='form-control'");?></td>
  59. </tr>
  60. <tr>
  61. <td class='form-actions text-center' colspan='4'><?php echo html::submitButton($lang->demand->distribute);?></td>
  62. </tr>
  63. </tbody>
  64. </table>
  65. </form>
  66. <table class="table table-form hidden">
  67. <tr id='itemRow'>
  68. <th class='w-100px'></th>
  69. <td class='w-p45 productsBox'>
  70. <div class='input-group required'>
  71. <?php echo html::select('product[itemIndex]', $products, '', "onchange=loadProductBranches(this.value,'itemIndex') data-index='itemIndex' class='form-control'");?>
  72. <span class='input-group-addon fix-border fix-padding'></span>
  73. </div>
  74. </td>
  75. <td class='w-p45 roadmapBox' id='roadmapBox'>
  76. <div class='input-group select'>
  77. <span class='input-group-addon'><?php echo $lang->demand->roadmap;?></span>
  78. <?php echo html::select('roadmap[itemIndex]', $roadmaps, '', 'class="form-control"');?>
  79. <span class='input-group-addon fix-border fix-padding'></span>
  80. <?php if(common::hasPriv('roadmap', 'create') and empty($roadmaps)):?>
  81. <span class='input-group-addon newRoadmapitemIndex hidden'>
  82. <?php echo html::checkBox('newRoadmapitemIndex', $lang->demand->addRoadmap, '', "onchange=addNewRoadmap(this,'itemIndex');");?>
  83. </span>
  84. <?php endif;?>
  85. </div>
  86. <div class="input-group addRoadmap hidden required">
  87. <span class='input-group-addon'><?php echo $lang->demand->roadmap;?></span>
  88. <?php echo html::input('roadmapName[itemIndex]', '', "class='form-control'");?>
  89. <span class='input-group-addon'><?php echo html::checkBox('newRoadmapitemIndex', $lang->demand->addRoadmap, '', "onchange=addNewRoadmap(this,'itemIndex');");?></span>
  90. </div>
  91. </td>
  92. <td class='c-actions text-center w-p10'>
  93. <a href='javascript:;' onclick='addItem(this)' class='addItem btn btn-link'><i class='icon-plus'></i></a>
  94. <a href='javascript:;' onclick='deleteItem(this)' class='deleteItem btn btn-link'><i class='icon icon-close'></i></a>
  95. </td>
  96. </tr>
  97. </table>
  98. <hr/>
  99. <?php include $app->getModuleRoot() . 'common/view/action.html.php';?>
  100. </div>
  101. </div>
  102. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>