add.html 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
  2. <div class="form-group">
  3. <label for="c-category_id" class="control-label col-xs-12 col-sm-2">{:__('Category')}:</label>
  4. <div class="col-xs-12 col-sm-8">
  5. <select id="c-category_id" data-rule="required" class="form-control selectpicker" name="row[category_id]">
  6. {foreach name="categoryList" item="vo"}
  7. <option value="{$key}" {in name="key" value=""}selected{/in}>{$vo.name}</option>
  8. {/foreach}
  9. </select>
  10. </div>
  11. </div>
  12. <div class="form-group">
  13. <label for="c-flag" class="control-label col-xs-12 col-sm-2">{:__('Flag')}:</label>
  14. <div class="col-xs-12 col-sm-8">
  15. <select id="c-flag" data-rule="" class="form-control selectpicker" multiple="" name="row[flag][]">
  16. {foreach name="flagList" item="vo"}
  17. <option value="{$key}" {in name="key" value=""}selected{/in}>{$vo}</option>
  18. {/foreach}
  19. </select>
  20. </div>
  21. </div>
  22. <div class="form-group">
  23. <label for="c-title" class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
  24. <div class="col-xs-12 col-sm-8">
  25. <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="">
  26. </div>
  27. </div>
  28. <div class="form-group">
  29. <label for="c-diyname" class="control-label col-xs-12 col-sm-2">{:__('Diyname')}:</label>
  30. <div class="col-xs-12 col-sm-8">
  31. <input id="c-diyname" data-rule="required;diyname" class="form-control" name="row[diyname]" type="text" value="">
  32. </div>
  33. </div>
  34. <div class="form-group">
  35. <label for="c-summary" class="control-label col-xs-12 col-sm-2">{:__('Summary')}:</label>
  36. <div class="col-xs-12 col-sm-8">
  37. <textarea id="c-summary" data-rule="required" class="form-control editor" rows="5" name="row[summary]" cols="50"></textarea>
  38. </div>
  39. </div>
  40. <div class="form-group">
  41. <label for="c-content" class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
  42. <div class="col-xs-12 col-sm-8">
  43. <textarea id="c-content" data-rule="required" class="form-control editor" rows="5" name="row[content]" cols="50"></textarea>
  44. </div>
  45. </div>
  46. <div class="form-group">
  47. <label for="c-thumb" class="control-label col-xs-12 col-sm-2">{:__('Thumb')}:</label>
  48. <div class="col-xs-12 col-sm-8">
  49. <div class="input-group">
  50. <input id="c-thumb" class="form-control" size="50" name="row[thumb]" type="text" value="">
  51. <div class="input-group-addon no-border no-padding">
  52. <span><button type="button" id="plupload-thumb" class="btn btn-danger plupload" data-input-id="c-thumb" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-preview-id="p-thumb"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
  53. <span><button type="button" id="fachoose-thumb" class="btn btn-primary fachoose" data-multiple="false" data-mimetype="image/*" data-input-id="c-thumb"><i class="fa fa-list-ul"></i> {:__('Choose')}</button></span>
  54. </div>
  55. <span class="msg-box n-right"></span>
  56. </div>
  57. <ul class="row list-inline plupload-preview" id="p-thumb"></ul>
  58. </div>
  59. </div>
  60. <div class="form-group">
  61. <label for="c-image" class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
  62. <div class="col-xs-12 col-sm-8">
  63. <div class="input-group">
  64. <input id="c-image" class="form-control" size="50" name="row[image]" type="text" value="">
  65. <div class="input-group-addon no-border no-padding">
  66. <span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
  67. <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-multiple="false" data-mimetype="image/*" data-input-id="c-image"><i class="fa fa-list-ul"></i> {:__('Choose')}</button></span>
  68. </div>
  69. <span class="msg-box n-right"></span>
  70. </div>
  71. <ul class="row list-inline plupload-preview" id="p-image"></ul>
  72. </div>
  73. </div>
  74. <div class="form-group">
  75. <label for="c-seotitle" class="control-label col-xs-12 col-sm-2">{:__('Seotitle')}:</label>
  76. <div class="col-xs-12 col-sm-8">
  77. <input id="c-seotitle" class="form-control" name="row[seotitle]" type="text" value="" placeholder="为空时将使用文档标题">
  78. </div>
  79. </div>
  80. <div class="form-group">
  81. <label for="c-keywords" class="control-label col-xs-12 col-sm-2">{:__('Keywords')}:</label>
  82. <div class="col-xs-12 col-sm-8">
  83. <input id="c-keywords" class="form-control" name="row[keywords]" type="text" value="">
  84. </div>
  85. </div>
  86. <div class="form-group">
  87. <label for="c-description" class="control-label col-xs-12 col-sm-2">{:__('Description')}:</label>
  88. <div class="col-xs-12 col-sm-8">
  89. <textarea id="c-description" class="form-control" name="row[description]"></textarea>
  90. </div>
  91. </div>
  92. <div class="form-group">
  93. <label for="c-views" class="control-label col-xs-12 col-sm-2">{:__('Views')}:</label>
  94. <div class="col-xs-12 col-sm-8">
  95. <input id="c-views" data-rule="required" class="form-control" name="row[views]" type="number" value="0">
  96. </div>
  97. </div>
  98. <div class="form-group">
  99. <label for="c-comments" class="control-label col-xs-12 col-sm-2">{:__('Comments')}:</label>
  100. <div class="col-xs-12 col-sm-8">
  101. <input id="c-comments" data-rule="required" class="form-control" name="row[comments]" type="number" value="0">
  102. </div>
  103. </div>
  104. <div class="form-group">
  105. <label for="c-weigh" class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
  106. <div class="col-xs-12 col-sm-8">
  107. <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="0">
  108. </div>
  109. </div>
  110. <div class="form-group">
  111. <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
  112. <div class="col-xs-12 col-sm-8">
  113. {foreach name="statusList" item="vo"}
  114. <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>
  115. {/foreach}
  116. </div>
  117. </div>
  118. <div class="form-group layer-footer">
  119. <label class="control-label col-xs-12 col-sm-2"></label>
  120. <div class="col-xs-12 col-sm-8">
  121. <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
  122. <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
  123. </div>
  124. </div>
  125. </form>