formbuilder.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <div class="builder formbuilder-box">
  2. <notempty name="tab_nav">
  3. <div class="builder-tabs builder-form-tabs">
  4. <ul class="nav nav-tabs">
  5. <volist name="tab_nav.tab_list" id="tab">
  6. <li class="<php>if($tab_nav['current_tab'] == $key) echo 'active';</php>"><a href="{$tab.href}">{$tab.title}</a></li>
  7. </volist>
  8. </ul>
  9. </div>
  10. <div class="form-group"></div>
  11. </notempty>
  12. {// 数据列表 }
  13. <div class="builder-container">
  14. <div class="row">
  15. <div class="col-xs-12">
  16. <form enctype="multipart/form-data" action="{$post_url}" method="post" class="form-horizontal form form-builder">
  17. <div class="form-type-list">
  18. <volist name="form_items" id="form" key="k">
  19. <switch name="form.type">
  20. <include file='[builderpath]/FormType/hidden.html' type='' />
  21. {// 不可修改文本 }
  22. <include file='[builderpath]/FormType/static.html' type='' />
  23. {// 数字 }
  24. <include file='[builderpath]/FormType/num.html' type='' />
  25. {// UID }
  26. <include file='[builderpath]/FormType/uid.html' type='' />
  27. {// UIDS }
  28. <include file='[builderpath]/FormType/uids.html' type='' />
  29. {// 价格 }
  30. <include file='[builderpath]/FormType/price.html' type='' />
  31. {// 字符串 }
  32. <include file='[builderpath]/FormType/text.html' type='' />
  33. {// 文本 }
  34. <include file='[builderpath]/FormType/textarea.html' type='' />
  35. {// 数组 }
  36. <include file='[builderpath]/FormType/array.html' type='' />
  37. {// 密码 }
  38. <include file='[builderpath]/FormType/password.html' type='' />
  39. {// 单选按钮 }
  40. <include file='[builderpath]/FormType/radio.html' type='' />
  41. {// 复选框 }
  42. <include file='[builderpath]/FormType/checkbox.html' type='' />
  43. {// 下拉框 }
  44. <include file='[builderpath]/FormType/select.html' type='' />
  45. {// 下拉框(多选) }
  46. <include file='[builderpath]/FormType/selects.html' type='' />
  47. {// 图标 }
  48. <include file='[builderpath]/FormType/icon.html' type='' />
  49. {// 日期 }
  50. <include file='[builderpath]/FormType/date.html' type='' />
  51. {// 时间 }
  52. <include file='[builderpath]/FormType/datetime.html' type='' />
  53. {// 图片 }
  54. <include file='[builderpath]/FormType/picture.html' type='' />
  55. {// 图片(多图) }
  56. <include file='[builderpath]/FormType/pictures.html' type='' />
  57. {// 编辑器 kindeditor }
  58. <include file='[builderpath]/FormType/kindeditor.html' type='' />
  59. <case value="group">
  60. <div class="form-group"></div>
  61. <div class="builder-tabs form-group">
  62. <ul class="nav nav-tabs">
  63. <volist name="form.options" id="li" key="group_k">
  64. <li data-tab="tab{$group_k}" <eq name="group_k" value="1">class="active"</eq>><a href="#tab{$group_k}" data-toggle="tab">{$li.title}</a></li>
  65. </volist>
  66. </ul>
  67. </div>
  68. <div class="builder-container">
  69. <div class="tab-content">
  70. <volist name="form.options" id="tab" key="group_k">
  71. <div id="tab{$group_k}" class='tab-pane <eq name="group_k" value="1">active</eq> tab{$group_k}'>
  72. <div class="group">
  73. <volist name="tab.options" id="tab_form" key="tab_k">
  74. <switch name="tab_form.type">
  75. <include file='[builderpath]/FormType/hidden.html' type='tab_' />
  76. {// 不可修改文本 }
  77. <include file='[builderpath]/FormType/static.html' type='tab_' />
  78. {// 数字 }
  79. <include file='[builderpath]/FormType/num.html' type='tab_' />
  80. {// UID }
  81. <include file='[builderpath]/FormType/uid.html' type='tab_' />
  82. {// UIDS }
  83. <include file='[builderpath]/FormType/uids.html' type='tab_' />
  84. {// 价格 }
  85. <include file='[builderpath]/FormType/price.html' type='tab_' />
  86. {// 字符串 }
  87. <include file='[builderpath]/FormType/text.html' type='tab_' />
  88. {// 文本 }
  89. <include file='[builderpath]/FormType/textarea.html' type='tab_' />
  90. {// 数组 }
  91. <include file='[builderpath]/FormType/array.html' type='tab_' />
  92. {// 密码 }
  93. <include file='[builderpath]/FormType/password.html' type='tab_' />
  94. {// 单选按钮 }
  95. <include file='[builderpath]/FormType/radio.html' type='tab_' />
  96. {// 复选框 }
  97. <include file='[builderpath]/FormType/checkbox.html' type='tab_' />
  98. {// 下拉框 }
  99. <include file='[builderpath]/FormType/select.html' type='tab_' />
  100. {// 下拉框(多选) }
  101. <include file='[builderpath]/FormType/selects.html' type='tab_' />
  102. {// 图标 }
  103. <include file='[builderpath]/FormType/icon.html' type='tab_' />
  104. {// 日期 }
  105. <include file='[builderpath]/FormType/date.html' type='tab_' />
  106. {// 时间 }
  107. <include file='[builderpath]/FormType/datetime.html' type='tab_' />
  108. {// 图片 }
  109. <include file='[builderpath]/FormType/picture.html' type='tab_' />
  110. {// 图片(多图) }
  111. <include file='[builderpath]/FormType/pictures.html' type='tab_' />
  112. {// 编辑器 kindeditor }
  113. <include file='[builderpath]/FormType/kindeditor.html' type='tab_' />
  114. // 扩展类型
  115. <default />
  116. {:hook('FormBuilderExtend', array('form' => $tab_form, 'type' => tab_))}
  117. </switch>
  118. </volist>
  119. </div>
  120. </div>
  121. </volist>
  122. </div>
  123. </div>
  124. <div class="form-group"><hr></div>
  125. </case>
  126. // 扩展类型
  127. <default />
  128. {:hook('FormBuilderExtend', array('form' => $form))}
  129. </switch>
  130. </volist>
  131. <empty name="form_items">
  132. <div class="builder-data-empty text-center">
  133. <div class="empty-info">
  134. <i class="fa fa-database"></i> 暂时没有数据<br>
  135. </div>
  136. </div>
  137. </empty>
  138. <div class="form-group"></div>
  139. <div class="form-group bottom_button_list">
  140. <a class="btn btn-primary submit <?php if($ajax_submit) echo 'ajax-post';?>" type="submit" target-form="form-builder"><?php if ($submit_title) {echo $submit_title;} else {echo '确定';} ?></a>
  141. <a class="btn btn-danger return" onclick="javascript:history.back(-1);return false;">取消</a>
  142. </div>
  143. </div>
  144. </form>
  145. </div>
  146. </div>
  147. </div>
  148. {// 额外功能代码 }
  149. {$extra_html}
  150. </div>