add.html 4.8 KB

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