create.html.php 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <?php
  2. /**
  3. * The create view file of workflowfield 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 workflowfield
  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 include $app->getModuleRoot() . 'common/view/sortable.html.php';?>
  16. <?php include './expression.html.php';?>
  17. <?php js::set('hiddenPlaceholder', $config->workflowfield->hiddenPlaceholder)?>
  18. <form method='post' id='ajaxForm' class='fieldForm' action='<?php echo inlink('create', "module=$flow->module");?>'>
  19. <table class='table table-form' id='fieldTable'>
  20. <tr>
  21. <th class='w-80px'><?php echo $lang->workflowfield->name;?></th>
  22. <td class='w-200px required'><?php echo html::input('name', '', "class='form-control'");?></td>
  23. <td class='w-60px'></td>
  24. <td></td>
  25. </tr>
  26. <tr class='field-tr'>
  27. <th class='w-80px'><?php echo $lang->workflowfield->field;?></th>
  28. <td class='required'><?php echo html::input('field', '', "class='form-control field-input' placeholder='{$lang->workflowfield->placeholder->code}'");?></td>
  29. </tr>
  30. <tr>
  31. <th><?php echo $lang->workflowfield->control;?></th>
  32. <td>
  33. <?php unset($lang->workflowfield->controlTypeList['label']);?>
  34. <?php echo html::select('control', $lang->workflowfield->controlTypeList, 'input', "class='form-control chosen'");?>
  35. </td>
  36. <td></td>
  37. <td></td>
  38. </tr>
  39. <tr>
  40. <th><?php echo $lang->workflowfield->type;?></th>
  41. <td>
  42. <select id='type' name='type' class='form-control'>
  43. <?php
  44. foreach($config->workflowfield->typeList as $type => $typeList)
  45. {
  46. foreach($typeList as $key => $value)
  47. {
  48. $selected = $key == 'varchar' ? "selected='selected'" : '';
  49. echo "<option class='{$type}' value='{$key}' {$selected}>{$value}</option>";
  50. }
  51. }
  52. ?>
  53. </select>
  54. </td>
  55. <td colspan='2'>
  56. <div class='input-group'>
  57. <span class='input-group-addon length'><?php echo $lang->workflowfield->length;?></span>
  58. <?php echo html::number('length', 255, "max='{$config->workflowfield->max->varcharLength}' min='{$config->workflowfield->min->varcharLength}' step='1' class='form-control length' placeholder='{$lang->workflowfield->placeholder->varcharLength}' title='{$lang->workflowfield->placeholder->varcharLength}'");?>
  59. <span class='input-group-addon digits'><?php echo $lang->workflowfield->integerDigits;?></span>
  60. <?php echo html::number('integerDigits', 10, "max='{$config->workflowfield->max->integerDigits}' min='{$config->workflowfield->min->integerDigits}' step='1' class='form-control digits' placeholder='{$lang->workflowfield->placeholder->integerDigits}' title='{$lang->workflowfield->placeholder->integerDigits}'");?>
  61. <span class='input-group-addon digits'><?php echo $lang->workflowfield->decimalDigits;?></span>
  62. <?php echo html::number('decimalDigits', 2, "max='{$config->workflowfield->max->decimalDigits}' min='{$config->workflowfield->min->decimalDigits}' step='1' class='form-control digits' placeholder='{$lang->workflowfield->placeholder->decimalDigits}' title='{$lang->workflowfield->placeholder->decimalDigits}'");?>
  63. </div>
  64. </td>
  65. </tr>
  66. <tr class='hide'>
  67. <th></th>
  68. <td colspan='3' class='dataTip text-warning'></td>
  69. </tr>
  70. <tr class='hide'>
  71. <th><?php echo $lang->workflowfield->expression;?></th>
  72. <td colspan='3'>
  73. <div class='expression'></div>
  74. <?php echo baseHTML::a('javascript:;', $lang->workflowfield->formula->set, "class='set-expression'");?>
  75. <?php echo html::hidden('expression');?>
  76. </td>
  77. </tr>
  78. <tr>
  79. <th><?php echo $lang->workflowfield->datasource;?></th>
  80. <td colspan='3'><?php echo html::select('optionType', $datasources, 'custom', "class='form-control chosen optionType'");?></td>
  81. </tr>
  82. <tr class='sqlTR'>
  83. <th><?php echo $lang->workflowfield->sql;?></th>
  84. <td colspan='3'><?php echo html::textarea('sql', '', "rows='4' class='form-control' placeholder='{$lang->workflowfield->placeholder->sql}'");?></td>
  85. </tr>
  86. <tr class='hide' id='varsTR'>
  87. <th><?php echo $lang->workflowfield->vars;?></th>
  88. <td colspan='3' id='varsTD'></td>
  89. </tr>
  90. <tr class='hide'>
  91. <th></th>
  92. <td colspan='3'><?php echo baseHTML::a(inlink('addSqlVar'), $lang->workflowfield->addVar, "class='btn' data-toggle='modal'");?></td>
  93. </tr>
  94. <tr id='optionTR'>
  95. <th><?php echo $lang->workflowfield->options;?></th>
  96. <td colspan='3'>
  97. <div class="input-group">
  98. <span class='statusKey input-group-addon'><?php echo $lang->workflowfield->key;?></span>
  99. <?php echo html::input('options[code][]', '', "class='form-control' placeholder='{$lang->workflowfield->placeholder->optionCode}'");?>
  100. <span class='input-group-addon'><?php echo $lang->workflowfield->value;?></span>
  101. <?php echo html::input('options[name][]', '', "class='form-control'");?>
  102. <span class='input-group-btn sort-btn'>
  103. <a href='javascript:;' class='btn btn-default sortItem'><i class='icon-move'></i></a>
  104. </span>
  105. <span class='input-group-btn'>
  106. <a href='javascript:;' class='btn btn-default addItem'><i class='icon-plus'></i></a>
  107. </span>
  108. <span class='input-group-btn'>
  109. <a href='javascript:;' class='btn btn-default delItem'><i class='icon-minus'></i></a>
  110. </span>
  111. </div>
  112. <div id='optionsDIV'></div>
  113. </td>
  114. </tr>
  115. <tr>
  116. <th><?php echo $lang->workflowfield->defaultValue;?></th>
  117. <td colspan='3'><?php echo html::input('default', '', "class='form-control'");?></td>
  118. </tr>
  119. <tr class='tipInfoBox'>
  120. <th><?php echo $lang->workflowfield->tipInfo;?></th>
  121. <td colspan='3'><?php echo html::input('placeholder', '', "class='form-control'");?></td>
  122. </tr>
  123. <tr class='tipInfoBox'>
  124. <th></th>
  125. <td colspan='3' class='text-warning'><?php echo $lang->workflowfield->tips->placeholder;?></td>
  126. </tr>
  127. <tr>
  128. <th><?php echo $lang->workflowfield->rules;?></th>
  129. <td colspan='3'><?php echo html::select('rules[]', $rules, '', "multiple class='form-control chosen'");?></td>
  130. </tr>
  131. <tr>
  132. <th></th>
  133. <td colspan='3' class='form-actions'><?php echo html::submitButton();?></td>
  134. </tr>
  135. </table>
  136. </form>
  137. <div id='varGroup' class='hide'>
  138. <div id='key' class='w-p45 varControl'>
  139. <div class='input-group'>
  140. </div>
  141. </div>
  142. </div>
  143. <?php include '../../common/view/footer.modal.html.php';?>