create.html.php 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php
  2. /**
  3. * The create view file of workflowcondition module of ZDOO.
  4. *
  5. * @copyright Copyright 2009-2016 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
  6. * @license 商业软件,非开源软件
  7. * @author Gang Liu <liugang@cnezsoft.com>
  8. * @package workflowcondition
  9. * @version $Id$
  10. * @link http://www.zdoo.com
  11. */
  12. ?>
  13. <?php include '../../common/view/header.modal.html.php';?>
  14. <?php include '../../common/view/picker.html.php';?>
  15. <?php js::set('moduleName', $action->module);?>
  16. <form id='createConditionForm' method='post' action='<?php echo inlink('create', "action=$action->id");?>'>
  17. <?php if(empty($config->flow->workflowcondition->knowTips)):?>
  18. <div id='tips' class='alert'>
  19. <span><i class='icon icon-info'></i> <?php echo $lang->workflowcondition->tips;?></span>
  20. <?php echo baseHTML::a('javascript:;', $lang->workflowcondition->know);?>
  21. </div>
  22. <?php endif;?>
  23. <table class='table table-form' id='conditionTable'>
  24. <tr>
  25. <td class='w-80px'></td>
  26. <td class='w-220px'></td>
  27. <td class='w-80px'></td>
  28. <td></td>
  29. <td class='w-120px'></td>
  30. </tr>
  31. <tr>
  32. <th><?php echo $lang->workflowcondition->type;?></th>
  33. <td colspan='3'><?php echo html::select('conditionType', $lang->workflowcondition->typeList, 'data', "class='form-control'");?></td>
  34. </tr>
  35. <?php /* SQL TR */ ?>
  36. <tr class='sqlTR'>
  37. <th class='text-right '><?php echo $lang->workflowcondition->sql;?></th>
  38. <td colspan='3' class='required'><?php echo html::textarea('sql', '', "rows='3' class='form-control' placeholder='{$lang->workflowcondition->placeholder->sql}'");?></td>
  39. </tr>
  40. <tr class='sqlTR'>
  41. <th class='text-right '><?php echo $lang->workflowcondition->result;?></th>
  42. <td colspan='3'><?php echo html::select('sqlResult', $lang->workflowcondition->resultList, 'empty', "class='form-control'");?></td>
  43. </tr>
  44. <?php /* Data TR */ ?>
  45. <tr class='dataTR' data-key='1'>
  46. <th class='text-right'>
  47. <?php echo $lang->workflowcondition->field;?>
  48. <?php echo html::hidden('logicalOperator[1]', '');?>
  49. </th>
  50. <td><?php echo html::select("field[1]", $fields, '', "class='form-control chosen'");?></td>
  51. <td><?php echo html::select("operator[1]", $lang->workflowcondition->operatorList, '', "class='form-control'");?></td>
  52. <td id='paramTD'><?php echo html::input("param[1]", '', "id='param1' class='form-control' autocomplete='off'");?></td>
  53. <td class='text-middle'>
  54. <?php echo baseHTML::a('javascript:;', "<i class='icon-plus icon-large'></i>", "class='btn addCondition'");?>
  55. </td>
  56. </tr>
  57. <tr>
  58. <th></th>
  59. <td class='form-actions' colspan='4'><?php echo html::submitButton();?></td>
  60. </tr>
  61. </table>
  62. </form>
  63. <?php
  64. $field = html::select("field[KEY]", $fields, '', "class='form-control chosen'");
  65. $operator = html::select("operator[KEY]", $lang->workflowcondition->operatorList, '', "class='form-control'");
  66. $logicOperater = html::select('logicalOperator[KEY]', $lang->workflowcondition->logicalOperatorList, '', "class='form-control'");
  67. $itemRow = <<<EOT
  68. <tr class='dataTR' data-key='KEY'>
  69. <th>{$logicOperater}</th>
  70. <td>{$field}</td>
  71. <td>{$operator}</td>
  72. <td id='paramTD'><input type="text" value= "" name="param[KEY]" id="paramKEY" class="form-control" autocomplete="off"></td>
  73. <td class='text-middle'>
  74. <a href="javascript:;" class="btn addCondition"><i class="icon-plus icon-large"></i></a>
  75. <a href="javascript:;" class="btn delCondition"><i class="icon-close icon-large"></i></a>
  76. </td>
  77. </tr>
  78. EOT;
  79. js::set('conditionKey', 2);
  80. js::set('itemRow', $itemRow);
  81. ?>
  82. <?php include '../../common/view/footer.modal.html.php';?>