edit.html 5.0 KB

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