0
0

add2.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <style>
  4. .laydate-time-list{padding-bottom:0;overflow:hidden}
  5. .laydate-time-list>li{width:50%!important;}
  6. .laydate-time-list>li:last-child { display: none;}
  7. .laydate-time-list ol>li:last-child{margin-bottom:.26rem;}
  8. .rr{
  9. padding-right: 10px;
  10. }
  11. </style>
  12. <div class="row">
  13. <div class="col-sm-12">
  14. <div class="ibox float-e-margins">
  15. <div class="ibox-content">
  16. <form method="post" action="{:url('add2')}" class="form-horizontal">
  17. <input type="hidden" name="id" value="{$info['id']|default='0'}">
  18. <input type="hidden" name="cate" value="1">
  19. <div class="col-sm-6">
  20. <div class="form-group">
  21. <label class="control-label">食品名<span class="text-danger">*</span></label></br>
  22. <input type="text" class="form-control" name="name" value="{$info.name|default=''}">
  23. </div>
  24. </div>
  25. <div class="col-sm-6">
  26. <div class="form-group">
  27. <label class="control-label">价格<span class="text-danger">*</span></label></br>
  28. <input type="text" class="form-control" name="money" value="{$info.money|default=''}">
  29. </div>
  30. </div>
  31. <div class="col-sm-6">
  32. <div class="form-group">
  33. <label class="control-label">分类<span class="text-danger">*</span></label></br>
  34. <select name="dinner_type_id" class="form-control">
  35. <option value="">选择分类</option>
  36. {foreach $typeList as $k=>$v}
  37. <option value="{$v.id}">{$v.name}</option>
  38. {/foreach}
  39. </select>
  40. </div>
  41. </div>
  42. <div class="col-sm-6">
  43. <div class="form-group">
  44. <label class="control-label">排序(正序)<span class="text-danger">*</span></label></br>
  45. <input type="text" class="form-control" name="sort" value="{$info.sort|default='0'}">
  46. </div>
  47. </div>
  48. <div class="col-sm-12">
  49. <div class="form-group">
  50. <label class="control-label">类型<span class="text-danger">*</span></label></br>
  51. <label class="cr-inline">
  52. <input type="radio" value="0" name="type">普通&nbsp;&nbsp;
  53. </label>
  54. <label class="cr-inline">
  55. <input type="radio" value="1" name="type">流食或半流食&nbsp;&nbsp;
  56. </label>
  57. </div>
  58. </div>
  59. <div class="col-sm-12">
  60. <div class="form-group">
  61. <label class="control-label">图片<span class="text-danger">*</span></label>
  62. {:widget_view('common/upimg',['name'=>'imgs','multi'=>10,'val'=>isset($info)?$info['imgs']:''])}
  63. </div>
  64. </div>
  65. <div class="col-sm-12">
  66. <div class="form-group">
  67. <label class="control-label">描述</label></br>
  68. <textarea name="content" class="form-control" cols="30" rows="3" >{$info.content|default=''}</textarea>
  69. </div>
  70. </div>
  71. <div class="col-sm-12">
  72. <div class="hr-line-dashed"></div>
  73. </div>
  74. <div class="form-group">
  75. <div class="col-sm-6 col-sm-offset-2">
  76. <button class="btn btn-primary ajax-post" data-layer="1" target-form="form-horizontal" type="submit">确 定</button>
  77. </div>
  78. </div>
  79. </form>
  80. </div>
  81. </div>
  82. </div>
  83. </div>
  84. {/block}
  85. {block name="script"}
  86. <script>
  87. $(document).ready(function(){
  88. formSetValue("enable", {$info.enable|default=1});
  89. formSetValue("type", {$info.type|default=0});
  90. formSetValue("dinner_type_id", {$info.dinner_type_id|default=''});
  91. });
  92. </script>
  93. {/block}