addui.html.php 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <?php
  2. /**
  3. * The addUI view file of workflowlayout module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2016 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
  6. * @license 商业软件,非开源软件
  7. * @author Yidong Wang <yidong@chandao.com>
  8. * @package workflowlayout
  9. * @version $Id$
  10. * @link http://www.zentao.net
  11. */
  12. ?>
  13. <?php include '../../common/view/header.modal.html.php';?>
  14. <?php include '../../common/view/picker.html.php';?>
  15. <?php js::set('moduleName', $module);?>
  16. <form id='ajaxForm' target='hiddenwin' method='post' action='<?php echo inlink('addUI', "module={$module}&action={$action}");?>'>
  17. <table class='table table-form' id='conditionTable'>
  18. <tr>
  19. <td class='w-80px'></td>
  20. <td class='w-220px'></td>
  21. <td class='w-80px'></td>
  22. <td></td>
  23. <td class='w-120px'></td>
  24. </tr>
  25. <tr>
  26. <th><?php echo $lang->workflowlayout->ui->name;?></th>
  27. <td colspan='3'><?php echo html::input('name', '', "class='form-control'");?></td>
  28. </tr>
  29. <?php $this->loadModel('workflowfield');?>
  30. <?php $operatorList = $lang->workflowcondition->operatorList;?>
  31. <tr class='dataTR' data-key='1'>
  32. <th class='text-right'><?php echo $lang->workflowlayout->ui->condition;?></th>
  33. <td><?php echo html::select("field[1]", $fields, '', "class='form-control chosen'");?></td>
  34. <td><?php echo html::select("operator[1]", $operatorList, '', "class='form-control'");?></td>
  35. <td id='paramTD'><?php echo html::input("param[1]", '', "id='param1' class='form-control' autocomplete='off'");?></td>
  36. <td class='text-middle'><?php echo baseHTML::a('javascript:;', "<i class='icon-plus icon-large'></i>", "class='btn addCondition'");?></td>
  37. </tr>
  38. <?php if($others):?>
  39. <tr><th class='text-left' colspan='4'><?php echo $lang->workflowlayout->ui->other;?></th></tr>
  40. <?php $preUI = 0;?>
  41. <?php foreach($others as $uiID => $uiConditions):?>
  42. <?php foreach($uiConditions as $fieldConditions):?>
  43. <?php foreach($fieldConditions as $condition):?>
  44. <tr>
  45. <th class='text-right'><?php echo $uiID != $preUI ? $uiList[$uiID]->name : ''; $preUI = $uiID;?></th>
  46. <td><?php echo html::select("otherfield", $fields, $condition->field, "class='form-control chosen' disabled");?></td>
  47. <td><?php echo html::select("otheroperator", $operatorList, $condition->operator, "class='form-control' disabled");?></td>
  48. <td id='paramTD'>
  49. <?php $value = helper::safe64Encode(urlencode($condition->param));?>
  50. <?php $elementName = helper::safe64Encode(urlencode("param"));?>
  51. <?php echo $this->workflowfield->getFieldControl($module, $condition->field, $value, $elementName, '', 'disabled');?>
  52. </td>
  53. <td class='text-middle'></td>
  54. </tr>
  55. <?php endforeach;?>
  56. <?php endforeach;?>
  57. <?php endforeach;?>
  58. <?php endif;?>
  59. <tr>
  60. <td class='form-actions text-center' colspan='5'>
  61. <?php
  62. echo html::submitButton();
  63. echo html::a(inlink('admin', "module=$module&action=$action"), $lang->cancel, '', "class='btn btn-wide loadInModal iframe'");
  64. ?>
  65. </td>
  66. </tr>
  67. </table>
  68. </form>
  69. <?php
  70. $field = html::select("field[KEY]", $fields, '', "class='form-control chosen'");
  71. $operator = html::select("operator[KEY]", $operatorList, '', "class='form-control'");
  72. $itemRow = <<<EOT
  73. <tr class='dataTR' data-key='KEY'>
  74. <th></th>
  75. <td>{$field}</td>
  76. <td>{$operator}</td>
  77. <td id='paramTD'><input type="text" value= "" name="param[KEY]" id="paramKEY" class="form-control" autocomplete="off"></td>
  78. <td class='text-middle'>
  79. <a href="javascript:;" class="btn addCondition"><i class="icon-plus icon-large"></i></a>
  80. <a href="javascript:;" class="btn delCondition"><i class="icon-close icon-large"></i></a>
  81. </td>
  82. </tr>
  83. EOT;
  84. js::set('conditionKey', 2);
  85. js::set('itemRow', $itemRow);
  86. ?>
  87. <script>
  88. <?php echo file_get_contents(dirname(__FILE__, 2) . '/js/uicommon.js');?>
  89. </script>
  90. <?php include '../../common/view/footer.modal.html.php';?>