edit.html 7.4 KB

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