setcategory.html.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. /**
  3. * The setCategory view of reviewcl 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 Deqing Chai <chaideqing@cnezsoft.com>
  8. * @package design
  9. * @version $Id: setCategory.html.php 4903 2023-10-26 05:32:59Z $
  10. * @link http://www.zentao.net
  11. */
  12. ?>
  13. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  14. <?php
  15. $itemRow = <<<EOT
  16. <tr class='text-left'>
  17. <td>
  18. <input type='text' class="form-control" autocomplete="off" value="" name="keys[]">
  19. </td>
  20. <td>
  21. <input type='text' class="form-control" value="" autocomplete="off" name="values[]">
  22. </td>
  23. <td class='c-actions'>
  24. <a href="javascript:void(0)" class='btn btn-link' onclick="addItem(this)"><i class='icon-plus'></i></a>
  25. <a href="javascript:void(0)" class='btn btn-link' onclick="delItem(this)"><i class='icon-close'></i></a>
  26. </td>
  27. </tr>
  28. EOT;
  29. ?>
  30. <?php js::set('itemRow', $itemRow)?>
  31. <div id='mainContent' class='main-row'>
  32. <div class='main-col main-content'>
  33. <div class='main-header'>
  34. <div class='heading'>
  35. <strong><?php echo $lang->reviewcl->clcategory;?></strong>
  36. </div>
  37. </div>
  38. <form class="load-indicator main-form form-ajax" method='post'>
  39. <table class='table table-form active-disabled table-condensed mw-600px'>
  40. <thead>
  41. <tr class='text-center'>
  42. <th class='w-70px'><?php echo $lang->custom->key;?></th>
  43. <th class='w-250px'><?php echo $lang->custom->value;?></th>
  44. <th class='w-100px'></th>
  45. </tr>
  46. </thead>
  47. <tbody>
  48. <?php foreach(array_filter($lang->reviewcl->{$section}) as $key => $value):?>
  49. <tr class='text-center'>
  50. <td class='w-70px'>
  51. <?php echo $key;?>
  52. <?php echo html::hidden('keys[]', $key) ?>
  53. </td>
  54. <td class='w-200px'><?php echo html::input('values[]', $value, "class='form-control'");?></td>
  55. <td class='c-actions text-left'>
  56. <a href="javascript:void(0)" onclick="addItem(this)" class='btn btn-link'><i class='icon-plus'></i></a>
  57. <a href="javascript:void(0)" class='btn btn-link' onclick="delItem(this)"><i class='icon-close'></i></a>
  58. </td>
  59. </tr>
  60. <?php endforeach;?>
  61. <tr>
  62. <td colspan='3' class='text-center form-actions'>
  63. <?php
  64. $appliedTo = array($currentLang => $lang->custom->currentLang, 'all' => $lang->custom->allLang);
  65. echo html::radio('lang', $appliedTo, $lang2Set);
  66. echo html::submitButton();
  67. if(common::hasPriv('custom', 'restore')) echo html::linkButton($lang->custom->restore, $this->createLink('custom', 'restore', "module=reviewcl&field={$section}"), 'hiddenwin', '', 'btn btn-wide');
  68. ?>
  69. </td>
  70. </tr>
  71. </tbody>
  72. </table>
  73. </form>
  74. </div>
  75. </div>
  76. <script>
  77. function addItem(clickedButton)
  78. {
  79. $(clickedButton).parent().parent().after(itemRow);
  80. }
  81. function delItem(clickedButton)
  82. {
  83. $(clickedButton).parent().parent().remove();
  84. }
  85. </script>
  86. <style>
  87. .main-header {height: 50px; display: flex; align-items: center;}
  88. </style>
  89. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>