edit.html 5.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
  2. <input type="hidden" id="category-id" value="{$row.id}" />
  3. <div class="form-group">
  4. <label for="c-pid" class="control-label col-xs-12 col-sm-2">{:__('Pid')}:</label>
  5. <div class="col-xs-12 col-sm-8">
  6. <select id="c-pid" data-rule="required" class="form-control selectpicker" name="row[pid]">
  7. {foreach name="parentList" item="vo"}
  8. <option value="{$key}" {in name="key" value="$row.pid"}selected{/in}>{$vo.name}</option>
  9. {/foreach}
  10. </select>
  11. </div>
  12. </div>
  13. <div class="form-group">
  14. <label for="c-name" class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
  15. <div class="col-xs-12 col-sm-8">
  16. <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
  17. </div>
  18. </div>
  19. <div class="form-group">
  20. <label for="c-nickname" class="control-label col-xs-12 col-sm-2">{:__('Nickname')}:</label>
  21. <div class="col-xs-12 col-sm-8">
  22. <input id="c-nickname" data-rule="" class="form-control" name="row[nickname]" type="text" value="{$row.nickname|htmlentities}">
  23. </div>
  24. </div>
  25. <div class="form-group">
  26. <label for="c-diyname" class="control-label col-xs-12 col-sm-2">{:__('Diyname')}:</label>
  27. <div class="col-xs-12 col-sm-8">
  28. <input id="c-diyname" data-rule="required;diyname" class="form-control" name="row[diyname]" type="text" value="{$row.diyname|htmlentities}">
  29. </div>
  30. </div>
  31. <div class="form-group">
  32. <label for="c-flag" class="control-label col-xs-12 col-sm-2">{:__('Flag')}:</label>
  33. <div class="col-xs-12 col-sm-8">
  34. <select id="c-flag" data-rule="" class="form-control selectpicker" multiple="" name="row[flag][]">
  35. {foreach name="flagList" item="vo"}
  36. <option value="{$key}" {in name="key" value="$row.flag"}selected{/in}>{$vo}</option>
  37. {/foreach}
  38. </select>
  39. </div>
  40. </div>
  41. <div class="form-group">
  42. <label for="c-image" class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
  43. <div class="col-xs-12 col-sm-8">
  44. <div class="input-group">
  45. <input id="c-image" class="form-control" size="50" name="row[image]" type="text" value="{$row.image|htmlentities}">
  46. <div class="input-group-addon no-border no-padding">
  47. <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>
  48. <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>
  49. </div>
  50. <span class="msg-box n-right"></span>
  51. </div>
  52. <ul class="row list-inline plupload-preview" id="p-image"></ul>
  53. </div>
  54. </div>
  55. <div class="form-group">
  56. <label for="c-keywords" class="control-label col-xs-12 col-sm-2">{:__('Keywords')}:</label>
  57. <div class="col-xs-12 col-sm-8">
  58. <input id="c-keywords" class="form-control" name="row[keywords]" type="text" value="{$row.keywords|htmlentities}">
  59. </div>
  60. </div>
  61. <div class="form-group">
  62. <label for="c-description" class="control-label col-xs-12 col-sm-2">{:__('Description')}:</label>
  63. <div class="col-xs-12 col-sm-8">
  64. <input id="c-description" class="form-control" name="row[description]" type="text" value="{$row.description|htmlentities}">
  65. </div>
  66. </div>
  67. <div class="form-group">
  68. <label for="c-weigh" class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
  69. <div class="col-xs-12 col-sm-8">
  70. <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
  71. </div>
  72. </div>
  73. <div class="form-group">
  74. <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
  75. <div class="col-xs-12 col-sm-8">
  76. {foreach name="statusList" item="vo"}
  77. <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>
  78. {/foreach}
  79. </div>
  80. </div>
  81. <div class="form-group layer-footer">
  82. <label class="control-label col-xs-12 col-sm-2"></label>
  83. <div class="col-xs-12 col-sm-8">
  84. <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
  85. <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
  86. </div>
  87. </div>
  88. </form>