create.html.php 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <?php
  2. /**
  3. * The create view file of workflowlabel 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 workflowlabel
  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', $module);?>
  16. <form id='ajaxForm' method='post' action='<?php echo inlink('create', "module=$module");?>'>
  17. <?php if(empty($config->flow->workflowlabel->featureTipsClosers) || strpos($config->flow->workflowlabel->featureTipsClosers, ",{$this->app->user->account},") === false):?>
  18. <div class='alert alert-dismissable'>
  19. <span class='text-muted'><i class='icon-alert icon-md'></i> <?php echo $lang->workflowlabel->tips->features;?></span>
  20. <span class='pull-right remove' data-dismiss='alert' aria-hidden='true'><?php echo $lang->workflowlabel->tips->known;?></span>
  21. </div>
  22. <?php endif;?>
  23. <table class='table table-form'>
  24. <tr class='no-padding'>
  25. <td class='w-100px'></td>
  26. <td></td>
  27. <td class='w-100px'></td>
  28. <td class='w-220px'></td>
  29. <td class='w-100px'></td>
  30. </tr>
  31. <tr>
  32. <th><?php echo $lang->workflowlabel->label;?></th>
  33. <td class='required' colspan='2'><?php echo html::input('label', '', "class='form-control'")?></td>
  34. <td></td>
  35. <td></td>
  36. </tr>
  37. <tr data-key='1'>
  38. <th class='params'><?php echo $lang->workflowlabel->params;?></th>
  39. <td>
  40. <?php echo html::select('fields[1]', $fields, 'deleted', "class='form-control' disabled")?>
  41. <?php echo html::hidden('fields[1]', 'deleted');?>
  42. </td>
  43. <td>
  44. <?php echo html::select('operators[1]', $lang->workflowlabel->operatorList, '=', "class='form-control' disabled");?>
  45. <?php echo html::hidden('operators[1]', '=');?>
  46. </td>
  47. <td class='value'>
  48. <?php echo html::select('values[1]', $lang->workflowfield->default->options->deleted, '0', "class='form-control' disabled")?>
  49. <?php echo html::hidden('values[1]', '0');?>
  50. <?php echo html::hidden('values2[1]', '');?>
  51. </td>
  52. <td data-type='params'><a href='javascript:;' class='btn addItem'><i class='icon icon-plus'></i></a></td>
  53. </tr>
  54. <tr data-key='2'>
  55. <th></th>
  56. <td><?php echo html::select('fields[2]', $fields, '', "class='form-control chosen'");?></td>
  57. <td><?php echo html::select('operators[2]', $lang->workflowlabel->operatorList, '', "class='form-control chosen'");?></td>
  58. <td class='value'>
  59. <?php echo html::input('values[2]', '', "class='form-control'");?>
  60. <?php echo html::hidden('values2[2]');?>
  61. </td>
  62. <td data-type='params'>
  63. <a href='javascript:;' class='btn addItem'><i class='icon icon-plus'></i></a>
  64. <a href='javascript:;' class='btn delItem'><i class='icon icon-close'></i></a>
  65. </td>
  66. </tr>
  67. <tr>
  68. <th><?php echo $lang->workflowlabel->orderBy;?></th>
  69. <td colspan='2'><?php echo html::select('orderFields[]', $fields, '', "class='form-control chosen'");?></td>
  70. <td><?php echo html::select('orderTypes[]', $lang->workflowlabel->orderTypeList, '', "class='form-control chosen'");?></td>
  71. <td data-type='orderBy'>
  72. <a href='javascript:;' class='btn addItem'><i class='icon icon-plus'></i></a>
  73. </td>
  74. </tr>
  75. <tr>
  76. <th></th>
  77. <td class='form-actions' colspan='4'>
  78. <?php echo html::hidden('module', $module);?>
  79. <?php echo html::submitButton();?>
  80. </td>
  81. <tr>
  82. </table>
  83. </form>
  84. <?php
  85. $field = html::select('fields[KEY]', $fields, '', "class='form-control chosen'");
  86. $operator = html::select('operators[KEY]', $lang->workflowlabel->operatorList, '', "class='form-control chosen'");
  87. $value = html::input('values[KEY]', '', "class='form-control'");
  88. $value2 = html::hidden('values2[KEY]');
  89. $orderField = html::select('orderFields[]', $fields, '', "class='form-control chosen'");
  90. $orderType = html::select('orderTypes[]', $lang->workflowlabel->orderTypeList, '', "class='form-control chosen'");
  91. $paramsRow = <<<EOT
  92. <tr data-key='KEY'>
  93. <th></th>
  94. <td>{$field}</td>
  95. <td>{$operator}</td>
  96. <td class='value'>
  97. {$value}
  98. {$value2}
  99. </td>
  100. <td data-type='params'>
  101. <a href="javascript:;" class="btn addItem"><i class="icon icon-plus"></i></a>
  102. <a href="javascript:;" class="btn delItem"><i class="icon icon-close"></i></a>
  103. </td>
  104. </tr>
  105. EOT;
  106. $orderByRow = <<<EOT
  107. <tr>
  108. <th></th>
  109. <td colspan='2'>{$orderField}</td>
  110. <td>{$orderType}</td>
  111. <td data-type='orderBy'>
  112. <a href="javascript:;" class="btn addItem"><i class="icon icon-plus"></i></a>
  113. <a href="javascript:;" class="btn delItem"><i class="icon icon-close"></i></a>
  114. </td>
  115. </tr>
  116. EOT;
  117. js::set('key', 3);
  118. js::set('paramsRow', $paramsRow);
  119. js::set('orderByRow', $orderByRow);
  120. ?>
  121. <?php include '../../common/view/footer.modal.html.php';?>