add.html 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <div class="row">
  4. <div class="col-sm-12">
  5. <div class="ibox float-e-margins">
  6. <!--<div class="ibox-title">-->
  7. <!--<h5>{$meta_title}</h5>-->
  8. <!--<div class="ibox-tools">-->
  9. <!--<a class="toback" href="{:url('index',['pid'=>$pid])}">-->
  10. <!--返回上一页-->
  11. <!--</a>-->
  12. <!--</div>-->
  13. <!--</div>-->
  14. <div class="ibox-content">
  15. <form method="post" action="{:url('add')}" class="form-horizontal">
  16. <input type="hidden" name="id" value="{$info['id']|default='0'}">
  17. <div class="form-group">
  18. <label class="col-sm-2 control-label">名称</label>
  19. <div class="col-sm-4">
  20. <input type="text" class="form-control" name="title" value="{$info.title|default=''}">
  21. </div>
  22. </div>
  23. <div class="form-group">
  24. <label class="col-sm-2 control-label">排序</label>
  25. <div class="col-sm-4">
  26. <input type="number" class="form-control" name="sort" value="{$info.sort|default='0'}">
  27. </div>
  28. </div>
  29. <div class="form-group">
  30. <label class="col-sm-2 control-label">链接</label>
  31. <div class="col-sm-4">
  32. <input type="text" class="form-control" name="url" value="{$info.url|default=''}">
  33. </div>
  34. </div>
  35. <div class="form-group">
  36. <label class="col-sm-2 control-label">上级菜单</label>
  37. <div class="col-sm-4">
  38. <select class="form-control m-b" name="pid">
  39. <option value="0">顶级菜单</option>
  40. {volist name="list" id="vo"}
  41. <option value="{$vo.id}">{$vo.title}</option>
  42. {/volist}
  43. </select>
  44. </div>
  45. </div>
  46. <div class="form-group">
  47. <label class="col-sm-2 control-label">图标</label>
  48. <div class="col-sm-4">
  49. <input type="text" class="form-control" name="icons" value="{$info.icons|default='fa fa-folder'}">
  50. </div>
  51. </div>
  52. <div class="form-group">
  53. <label class="col-sm-2 control-label">简介</label>
  54. <div class="col-sm-4">
  55. <input type="text" class="form-control" name="des" value="{$info.des|default=''}">
  56. </div>
  57. </div>
  58. <div class="form-group">
  59. <label class="col-sm-2 control-label">图标<span class="text-danger">*</span></label>
  60. <div class="col-sm-6">
  61. {:widget_view('common/upimg',['name'=>'img','multi'=>0,'val'=>isset($info)?$info['img']:''])}
  62. </div>
  63. </div>
  64. <div class="form-group">
  65. <label class="col-sm-2 control-label">是否是按钮权限</label>
  66. <div class="col-sm-4">
  67. <label class="cr-inline">
  68. <input type="radio" value="1" name="is_btn">是&nbsp;&nbsp;
  69. </label>
  70. <label class="cr-inline">
  71. <input type="radio" value="0" name="is_btn">否
  72. </label>
  73. </div>
  74. </div>
  75. <div class="form-group">
  76. <label class="col-sm-2 control-label">状态</label>
  77. <div class="col-sm-4">
  78. <label class="cr-inline">
  79. <input type="radio" value="1" name="enable">正常&nbsp;&nbsp;
  80. </label>
  81. <label class="cr-inline">
  82. <input type="radio" value="0" name="enable">禁用
  83. </label>
  84. </div>
  85. </div>
  86. <div class="hr-line-dashed"></div>
  87. <div class="form-group">
  88. <div class="col-sm-4 col-sm-offset-2">
  89. <button class="btn btn-primary ajax-post" data-layer_c="1" target-form="form-horizontal" type="submit">确 定</button>
  90. <!--<a href="{:url('index',['pid'=>$pid])}" class="btn btn-default">取 消</a>-->
  91. <button class="btn cancel-btn btn-default" type="button">取 消</button>
  92. </div>
  93. </div>
  94. </form>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. {/block}
  100. {block name="script"}
  101. <script>
  102. $(document).ready(function(){
  103. formSetValue("pid", {$pid|default=0});
  104. formSetValue("is_btn", {$info.is_btn|default=0});
  105. formSetValue("enable", {$info.enable|default=1});
  106. });
  107. </script>
  108. {/block}