add.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. <form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
  2. <div class="form-group">
  3. <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
  4. <div class="col-xs-12 col-sm-8">
  5. <input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="">
  6. </div>
  7. </div>
  8. <div class="form-group">
  9. <label class="control-label col-xs-12 col-sm-2">{:__('Category_id')}:</label>
  10. <div class="col-xs-12 col-sm-8">
  11. <input id="c-category_id" min="0" data-rule="required" data-source="category/selectpage" data-params='{"custom[type]":"test"}' class="form-control selectpage" name="row[category_id]" type="text" value="">
  12. </div>
  13. </div>
  14. <div class="form-group">
  15. <label class="control-label col-xs-12 col-sm-2">{:__('Category_ids')}:</label>
  16. <div class="col-xs-12 col-sm-8">
  17. <input id="c-category_ids" data-rule="required" data-source="category/selectpage" data-params='{"custom[type]":"test"}' data-multiple="true" class="form-control selectpage" name="row[category_ids]" type="text" value="">
  18. </div>
  19. </div>
  20. <div class="form-group">
  21. <label class="control-label col-xs-12 col-sm-2">{:__('Tags')}:</label>
  22. <div class="col-xs-12 col-sm-8">
  23. <input id="c-tags" class="form-control" data-role="tagsinput" name="row[tags]" type="text" value="">
  24. </div>
  25. </div>
  26. <div class="form-group">
  27. <label class="control-label col-xs-12 col-sm-2">{:__('Week')}:</label>
  28. <div class="col-xs-12 col-sm-8">
  29. <select id="c-week" class="form-control selectpicker" name="row[week]">
  30. {foreach name="weekList" item="vo"}
  31. <option value="{$key}" {in name="key" value=""}selected{/in}>{$vo}</option>
  32. {/foreach}
  33. </select>
  34. </div>
  35. </div>
  36. <div class="form-group">
  37. <label class="control-label col-xs-12 col-sm-2">{:__('Flag')}:</label>
  38. <div class="col-xs-12 col-sm-8">
  39. <select id="c-flag" class="form-control selectpicker" multiple="" name="row[flag][]">
  40. {foreach name="flagList" item="vo"}
  41. <option value="{$key}" {in name="key" value=""}selected{/in}>{$vo}</option>
  42. {/foreach}
  43. </select>
  44. </div>
  45. </div>
  46. <div class="form-group">
  47. <label class="control-label col-xs-12 col-sm-2">{:__('Genderdata')}:</label>
  48. <div class="col-xs-12 col-sm-8">
  49. <div class="radio">
  50. {foreach name="genderdataList" item="vo"}
  51. <label for="row[genderdata]-{$key}"><input id="row[genderdata]-{$key}" name="row[genderdata]" type="radio" value="{$key}" {in name="key" value="male"}checked{/in} /> {$vo}</label>
  52. {/foreach}
  53. </div>
  54. </div>
  55. </div>
  56. <div class="form-group">
  57. <label class="control-label col-xs-12 col-sm-2">{:__('Hobbydata')}:</label>
  58. <div class="col-xs-12 col-sm-8">
  59. <div class="checkbox">
  60. {foreach name="hobbydataList" item="vo"}
  61. <label for="row[hobbydata][]-{$key}"><input id="row[hobbydata][]-{$key}" name="row[hobbydata][]" type="checkbox" value="{$key}" {in name="key" value=""}checked{/in} /> {$vo}</label>
  62. {/foreach}
  63. </div>
  64. </div>
  65. </div>
  66. <div class="form-group">
  67. <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
  68. <div class="col-xs-12 col-sm-8">
  69. <input id="c-title" class="form-control" name="row[title]" type="text" value="">
  70. </div>
  71. </div>
  72. <div class="form-group">
  73. <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
  74. <div class="col-xs-12 col-sm-8">
  75. <textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50"></textarea>
  76. </div>
  77. </div>
  78. <div class="form-group">
  79. <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
  80. <div class="col-xs-12 col-sm-8">
  81. <div class="input-group">
  82. <input id="c-image" class="form-control" size="50" name="row[image]" type="text" value="">
  83. <div class="input-group-addon no-border no-padding">
  84. <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
  85. <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
  86. </div>
  87. <span class="msg-box n-right" for="c-image"></span>
  88. </div>
  89. <ul class="row list-inline faupload-preview" id="p-image"></ul>
  90. </div>
  91. </div>
  92. <div class="form-group">
  93. <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
  94. <div class="col-xs-12 col-sm-8">
  95. <div class="input-group">
  96. <input id="c-images" class="form-control" size="50" name="row[images]" type="text" value="">
  97. <div class="input-group-addon no-border no-padding">
  98. <span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
  99. <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
  100. </div>
  101. <span class="msg-box n-right" for="c-images"></span>
  102. </div>
  103. <ul class="row list-inline faupload-preview" id="p-images"></ul>
  104. </div>
  105. </div>
  106. <div class="form-group">
  107. <label class="control-label col-xs-12 col-sm-2">{:__('Attachfile')}:</label>
  108. <div class="col-xs-12 col-sm-8">
  109. <div class="input-group">
  110. <input id="c-attachfile" class="form-control" size="50" name="row[attachfile]" type="text" value="">
  111. <div class="input-group-addon no-border no-padding">
  112. <span><button type="button" id="faupload-attachfile" class="btn btn-danger faupload" data-input-id="c-attachfile" data-multiple="false" data-preview-id="p-attachfile"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
  113. <span><button type="button" id="fachoose-attachfile" class="btn btn-primary fachoose" data-input-id="c-attachfile" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
  114. </div>
  115. <span class="msg-box n-right" for="c-attachfile"></span>
  116. </div>
  117. <ul class="row list-inline faupload-preview" id="p-attachfile"></ul>
  118. </div>
  119. </div>
  120. <div class="form-group">
  121. <label class="control-label col-xs-12 col-sm-2">{:__('Keywords')}:</label>
  122. <div class="col-xs-12 col-sm-8">
  123. <input id="c-keywords" class="form-control" name="row[keywords]" type="text" value="">
  124. </div>
  125. </div>
  126. <div class="form-group">
  127. <label class="control-label col-xs-12 col-sm-2">{:__('Description')}:</label>
  128. <div class="col-xs-12 col-sm-8">
  129. <input id="c-description" class="form-control" name="row[description]" type="text" value="">
  130. </div>
  131. </div>
  132. <div class="form-group">
  133. <label class="control-label col-xs-12 col-sm-2">{:__('City')}:</label>
  134. <div class="col-xs-12 col-sm-8">
  135. <div class='control-relative'><input id="c-city" class="form-control" data-toggle="city-picker" name="row[city]" type="text" value=""></div>
  136. </div>
  137. </div>
  138. <div class="form-group">
  139. <label class="control-label col-xs-12 col-sm-2">{:__('Json')}:</label>
  140. <div class="col-xs-12 col-sm-8">
  141. <dl class="fieldlist" data-name="row[json]">
  142. <dd>
  143. <ins>{:__('Json key')}</ins>
  144. <ins>{:__('Json value')}</ins>
  145. </dd>
  146. <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
  147. <textarea name="row[json]" class="form-control hide" cols="30" rows="5"></textarea>
  148. </dl>
  149. </div>
  150. </div>
  151. <div class="form-group">
  152. <label class="control-label col-xs-12 col-sm-2">{:__('Multiplejson')}:</label>
  153. <div class="col-xs-12 col-sm-8">
  154. <table class="table fieldlist" data-name="row[multiplejson]" data-template="row[multiplejson]tpl">
  155. <tr>
  156. <td>{:__('multiplejson title')}</td>
  157. <td>{:__('multiplejson intro')}</td>
  158. <td>{:__('multiplejson author')}</td>
  159. <td>{:__('multiplejson age')}</td>
  160. <td width="90">{:__('Operate')}</td>
  161. </tr>
  162. <tr><td colspan="5">
  163. <a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a>
  164. <textarea name="row[multiplejson]" class="form-control hide" cols="30" rows="5"></textarea>
  165. </td></tr>
  166. </table>
  167. <script type="text/html" id="row[multiplejson]tpl">
  168. <tr>
  169. <td><input type="text" name="<%=name%>[<%=index%>][title]" class="form-control" value="<%=row.title%>"/></td>
  170. <td><input type="text" name="<%=name%>[<%=index%>][intro]" class="form-control" value="<%=row.intro%>"/></td>
  171. <td><input type="text" name="<%=name%>[<%=index%>][author]" class="form-control" value="<%=row.author%>"/></td>
  172. <td><input type="text" name="<%=name%>[<%=index%>][age]" class="form-control" value="<%=row.age%>"/></td>
  173. <td width="90">
  174. <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
  175. <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
  176. </td>
  177. </tr>
  178. </script>
  179. </div>
  180. </div>
  181. <div class="form-group">
  182. <label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
  183. <div class="col-xs-12 col-sm-8">
  184. <input id="c-price" min="0" class="form-control" step="0.01" name="row[price]" type="number" value="0.00">
  185. </div>
  186. </div>
  187. <div class="form-group">
  188. <label class="control-label col-xs-12 col-sm-2">{:__('Views')}:</label>
  189. <div class="col-xs-12 col-sm-8">
  190. <input id="c-views" min="0" class="form-control" name="row[views]" type="number" value="0">
  191. </div>
  192. </div>
  193. <div class="form-group">
  194. <label class="control-label col-xs-12 col-sm-2">{:__('Workrange')}:</label>
  195. <div class="col-xs-12 col-sm-8">
  196. <input id="c-workrange" class="form-control datetimerange" data-locale='{"format":"YYYY-MM-DD HH:mm:ss"}' name="row[workrange]" type="text" value="">
  197. </div>
  198. </div>
  199. <div class="form-group">
  200. <label class="control-label col-xs-12 col-sm-2">{:__('Startdate')}:</label>
  201. <div class="col-xs-12 col-sm-8">
  202. <input id="c-startdate" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[startdate]" type="text" value="{:date('Y-m-d')}">
  203. </div>
  204. </div>
  205. <div class="form-group">
  206. <label class="control-label col-xs-12 col-sm-2">{:__('Activitytime')}:</label>
  207. <div class="col-xs-12 col-sm-8">
  208. <input id="c-activitytime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[activitytime]" type="text" value="{:date('Y-m-d H:i:s')}">
  209. </div>
  210. </div>
  211. <div class="form-group">
  212. <label class="control-label col-xs-12 col-sm-2">{:__('Year')}:</label>
  213. <div class="col-xs-12 col-sm-8">
  214. <input id="c-year" class="form-control datetimepicker" data-date-format="YYYY" data-use-current="true" name="row[year]" type="text" value="{:date('Y')}">
  215. </div>
  216. </div>
  217. <div class="form-group">
  218. <label class="control-label col-xs-12 col-sm-2">{:__('Times')}:</label>
  219. <div class="col-xs-12 col-sm-8">
  220. <input id="c-times" class="form-control datetimepicker" data-date-format="HH:mm:ss" data-use-current="true" name="row[times]" type="text" value="{:date('H:i:s')}">
  221. </div>
  222. </div>
  223. <div class="form-group">
  224. <label class="control-label col-xs-12 col-sm-2">{:__('Refreshtime')}:</label>
  225. <div class="col-xs-12 col-sm-8">
  226. <input id="c-refreshtime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[refreshtime]" type="text" value="{:date('Y-m-d H:i:s')}">
  227. </div>
  228. </div>
  229. <div class="form-group">
  230. <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
  231. <div class="col-xs-12 col-sm-8">
  232. <input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="0">
  233. </div>
  234. </div>
  235. <div class="form-group">
  236. <label class="control-label col-xs-12 col-sm-2">{:__('Switch')}:</label>
  237. <div class="col-xs-12 col-sm-8">
  238. <input id="c-switch" name="row[switch]" type="hidden" value="0">
  239. <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-switch" data-yes="1" data-no="0" >
  240. <i class="fa fa-toggle-on text-success fa-flip-horizontal text-gray fa-2x"></i>
  241. </a>
  242. </div>
  243. </div>
  244. <div class="form-group">
  245. <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
  246. <div class="col-xs-12 col-sm-8">
  247. <div class="radio">
  248. {foreach name="statusList" item="vo"}
  249. <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="normal"}checked{/in} /> {$vo}</label>
  250. {/foreach}
  251. </div>
  252. </div>
  253. </div>
  254. <div class="form-group">
  255. <label class="control-label col-xs-12 col-sm-2">{:__('State')}:</label>
  256. <div class="col-xs-12 col-sm-8">
  257. <div class="radio">
  258. {foreach name="stateList" item="vo"}
  259. <label for="row[state]-{$key}"><input id="row[state]-{$key}" name="row[state]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
  260. {/foreach}
  261. </div>
  262. </div>
  263. </div>
  264. <div class="form-group layer-footer">
  265. <label class="control-label col-xs-12 col-sm-2"></label>
  266. <div class="col-xs-12 col-sm-8">
  267. <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
  268. <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
  269. </div>
  270. </div>
  271. </form>