add.html 5.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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">{:__('Box_mc')}:</label>
  4. <div class="col-xs-12 col-sm-8">
  5. <input id="c-box_name" data-rule="required" class="form-control" name="row[box_mc]" type="text">
  6. </div>
  7. </div>
  8. <div class="form-group row">
  9. <label class="control-label col-xs-12 col-sm-2">{:__('Box_tx')}:</label>
  10. <div class="col-xs-12 col-sm-8">
  11. <div class="input-group">
  12. <input id="c-files2" data-rule="required" class="form-control" size="50" name="row[box_tx]" type="text" value="">
  13. <div class="input-group-addon no-border no-padding">
  14. <span><button type="button" id="plupload-files2" class="btn btn-danger plupload" data-input-id="c-files2" data-mimetype="*" data-multiple="true" data-preview-id="p-files2"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
  15. <span><button type="button" id="fachoose-files2" class="btn btn-primary fachoose" data-input-id="c-files2" data-mimetype="*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
  16. </div>
  17. <span class="msg-box n-right" for="c-files2"></span>
  18. </div>
  19. <!--ul需要添加 data-template和data-name属性,并一一对应且唯一 -->
  20. <ul class="row list-inline plupload-preview" id="p-files2" data-template="introtpl2" data-name="row[box_tx]"> </ul>
  21. <!--请注意 ul和textarea间不能存在其它任何元素,实际开发中textarea应该添加个hidden进行隐藏-->
  22. <!--textarea name="row[box_banner_images_desc]" class="form-control hidden" hidden style="margin-top:5px;"></textarea-->
  23. <!--这里自定义图片预览的模板 开始-->
  24. <script type="text/html" id="introtpl2">
  25. <li class="col-xs-3">
  26. <a href="<%=fullurl%>" data-url="<%=url%>" target="_blank" class="thumbnail">
  27. <img src="<%=fullurl%>" class="img-responsive">
  28. </a>
  29. <!--input type="text" name="row[intro][<%=index%>]" class="form-control" placeholder="请输入文件描述" value="<%=value?value:''%>"/-->
  30. <a href="javascript:;" class="btn btn-danger btn-xs btn-trash"><i class="fa fa-trash"></i></a>
  31. </li>
  32. </script>
  33. <!--这里自定义图片预览的模板 结束-->
  34. </div>
  35. </div>
  36. <div class="form-group">
  37. <label class="control-label col-xs-12 col-sm-2">{:__('Box_zw')}:</label>
  38. <div class="col-xs-12 col-sm-8">
  39. <input id="c-box_name" data-rule="required" class="form-control" name="row[box_zw]" type="text">
  40. </div>
  41. </div>
  42. <div class="form-group row">
  43. <label class="control-label col-xs-12 col-sm-2">{:__('Box_img')}:</label>
  44. <div class="col-xs-12 col-sm-8">
  45. <div class="input-group">
  46. <input id="c-files" data-rule="required" class="form-control" size="50" name="row[box_img]" type="text" value="">
  47. <div class="input-group-addon no-border no-padding">
  48. <span><button type="button" id="plupload-files" class="btn btn-danger plupload" data-input-id="c-files" data-mimetype="*" data-multiple="true" data-preview-id="p-files"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
  49. <span><button type="button" id="fachoose-files" class="btn btn-primary fachoose" data-input-id="c-files" data-mimetype="*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
  50. </div>
  51. <span class="msg-box n-right" for="c-files"></span>
  52. </div>
  53. <!--ul需要添加 data-template和data-name属性,并一一对应且唯一 -->
  54. <ul class="row list-inline plupload-preview" id="p-files" data-template="introtpl" data-name="row[box_img]"> </ul>
  55. <!--请注意 ul和textarea间不能存在其它任何元素,实际开发中textarea应该添加个hidden进行隐藏-->
  56. <!--textarea name="row[box_banner_images_desc]" class="form-control hidden" hidden style="margin-top:5px;"></textarea-->
  57. <!--这里自定义图片预览的模板 开始-->
  58. <script type="text/html" id="introtpl">
  59. <li class="col-xs-3">
  60. <a href="<%=fullurl%>" data-url="<%=url%>" target="_blank" class="thumbnail">
  61. <img src="<%=fullurl%>" class="img-responsive">
  62. </a>
  63. <!--input type="text" name="row[intro][<%=index%>]" class="form-control" placeholder="请输入文件描述" value="<%=value?value:''%>"/-->
  64. <a href="javascript:;" class="btn btn-danger btn-xs btn-trash"><i class="fa fa-trash"></i></a>
  65. </li>
  66. </script>
  67. <!--这里自定义图片预览的模板 结束-->
  68. </div>
  69. </div>
  70. <div class="form-group layer-footer">
  71. <label class="control-label col-xs-12 col-sm-2"></label>
  72. <div class="col-xs-12 col-sm-8">
  73. <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
  74. <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
  75. </div>
  76. </div>
  77. </form>