showimport.html.php 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. /**
  3. * The show import view file of workflowfield module of ZDOO.
  4. *
  5. * @copyright Copyright 2009-2020 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
  6. * @license ZPL (http://zpl.pub/page/zplv12.html)
  7. * @author Gang Liu <liugang@easycorp.ltd>
  8. * @package workflowfield
  9. * @version $Id$
  10. * @link http://www.zdoo.com
  11. */
  12. ?>
  13. <?php include '../../common/view/header.modal.html.php';?>
  14. <form id='ajaxForm' method='post' action='<?php echo inlink('showImport', "module=$module");?>'>
  15. <table class='table table-form' id='fieldTable'>
  16. <thead class='text-center'>
  17. <tr>
  18. <th class='w-120px required'><?php echo $lang->workflowfield->name;?></th>
  19. <th class='w-120px required'><?php echo $lang->workflowfield->field;?></th>
  20. <th class='w-120px'><?php echo $lang->workflowfield->control;?></th>
  21. <th><?php echo $lang->workflowfield->type;?></th>
  22. <th class='w-140px'><?php echo $lang->workflowfield->datasource;?></th>
  23. <th class='w-180px'><?php echo $lang->workflowfield->options . '/' . $lang->workflowfield->sql;?></th>
  24. <th class='w-120px'><?php echo $lang->workflowfield->defaultValue;?></th>
  25. </tr>
  26. </thead>
  27. <tbody>
  28. <?php foreach($fieldList as $key => $field):?>
  29. <tr class='text-top' data-key='<?php echo $key;?>'>
  30. <td><?php echo html::input("name[$key]", htmlspecialchars($field->name, ENT_QUOTES), "id='name{$key}' class='form-control'");?></td>
  31. <td><?php echo html::input("field[$key]", htmlspecialchars($field->field, ENT_QUOTES), "id='field{$key}' class='form-control'");?></td>
  32. <td><?php echo html::select("control[$key]", $lang->workflowfield->controlTypeList, $field->control, "id='control{$key}' class='form-control chosen'");?></td>
  33. <td>
  34. <div class='input-group'>
  35. <select id='type<?php echo $key;?>' name='type[<?php echo $key;?>]' class='form-control'>
  36. <?php
  37. foreach($config->workflowfield->typeList as $group => $typeList)
  38. {
  39. foreach($typeList as $type => $value)
  40. {
  41. $selected = $type == 'varchar' ? "selected='selected'" : '';
  42. echo "<option class='{$group}' value='{$type}' {$selected}>{$value}</option>";
  43. }
  44. }
  45. ?>
  46. </select>
  47. <span class='input-group-addon length'><?php echo $lang->workflowfield->length;?></span>
  48. <?php echo html::number("length[$key]", 255, "id='length{$key}' max='1000' min='1' step='1' class='form-control length' placeholder='{$lang->workflowfield->placeholder->varcharLength}' title='{$lang->workflowfield->placeholder->varcharLength}'");?>
  49. <span class='input-group-addon digits'><?php echo $lang->workflowfield->integerDigits;?></span>
  50. <?php echo html::number("integerDigits[$key]", 10, "id='integerDigits{$key}' max='12' min='1' step='1' class='form-control digits' placeholder='{$lang->workflowfield->placeholder->integerDigits}' title='{$lang->workflowfield->placeholder->integerDigits}'");?>
  51. <span class='input-group-addon digits'><?php echo $lang->workflowfield->decimalDigits;?></span>
  52. <?php echo html::number("decimalDigits[$key]", 2, "id='decimalDigits{$key}' max='8' min='0' step='1' class='form-control digits' placeholder='{$lang->workflowfield->placeholder->decimalDigits}' title='{$lang->workflowfield->placeholder->decimalDigits}'");?>
  53. </div>
  54. </td>
  55. <td><?php echo html::select("optionType[$key]", $datasources, $field->datasource, "id='optionType{$key}' class='form-control chosen'");?></td>
  56. <td>
  57. <?php echo html::textarea("options[$key]", $field->options, "id='options{$key}' class='form-control' rows='1'");?>
  58. <?php echo html::textarea("sql[$key]", $field->sql, "id='sql{$key}' class='form-control' rows='1'");?>
  59. <div id='optionsDIV<?php echo $key;?>'></div>
  60. </td>
  61. <td><?php echo html::input("default[$key]", $field->defaultValue, "id='default{$key}' class='form-control'");?></td>
  62. </tr>
  63. <?php endforeach;?>
  64. <tr>
  65. <td colspan='7' class='text-warning'><?php echo $lang->workflowfield->excel->tips;?></td>
  66. </tr>
  67. </tbody>
  68. <tfoot>
  69. <tr>
  70. <td colspan='7' class='text-center form-actions'><?php echo html::submitButton();?></td>
  71. </tr>
  72. </tfoot>
  73. </table>
  74. </form>
  75. <?php include '../../common/view/footer.modal.html.php';?>