add.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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>{$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. <input type="hidden" name="pid" value="{$pid|default='0'}">
  18. <div class="form-group">
  19. <label class="col-sm-2 control-label">名称<span class="text-danger">*</span></label>
  20. <div class="col-sm-6">
  21. <input type="text" class="form-control" name="name" value="{$info.name|default=''}">
  22. </div>
  23. </div>
  24. <div class="form-group">
  25. <label class="col-sm-2 control-label">mode</label>
  26. <div class="col-sm-6">
  27. <input type="number" class="form-control" name="mode" value="{$info.mode|default=''}">
  28. </div>
  29. </div>
  30. {if ($pid <= 0)}
  31. <div class="form-group">
  32. <label class="col-sm-2 control-label">链接</label>
  33. <div class="col-sm-6">
  34. <input type="text" class="form-control" name="url" value="{$info.url|default=''}">
  35. </div>
  36. </div>
  37. <div class="form-group">
  38. <label class="col-sm-2 control-label">备注</label>
  39. <div class="col-sm-6">
  40. <input type="text" class="form-control" name="des" value="{$info.des|default=''}">
  41. </div>
  42. </div>
  43. <div class="form-group">
  44. <label class="col-sm-2 control-label">位置</label>
  45. <div class="col-sm-6">
  46. <select name="type" class="form-control">
  47. <option value="0">首页</option>
  48. <option value="1">统计页</option>
  49. </select>
  50. </div>
  51. </div>
  52. <div class="form-group">
  53. <label class="col-sm-2 control-label">排序</label>
  54. <div class="col-sm-6">
  55. <input type="number" class="form-control" name="sort" value="{$info.sort|default=''}">
  56. </div>
  57. </div>
  58. <div class="form-group">
  59. <label class="col-sm-2 control-label">状态</label>
  60. <div class="col-sm-6">
  61. <label class="cr-inline">
  62. <input type="radio" value="1" name="enable">正常&nbsp;&nbsp;
  63. </label>
  64. <label class="cr-inline">
  65. <input type="radio" value="0" name="enable">禁用
  66. </label>
  67. </div>
  68. </div>
  69. {/if}
  70. <div class="form-group">
  71. <label class="col-sm-2 control-label">图标<span class="text-danger">*</span></label>
  72. <div class="col-sm-6">
  73. {:widget_view('common/upimg',['name'=>'path','multi'=>0,'val'=>isset($info)?$info['path']:''])}
  74. </div>
  75. </div>
  76. <div class="hr-line-dashed"></div>
  77. <div class="form-group">
  78. <div class="col-sm-6 col-sm-offset-2">
  79. <button class="btn btn-primary ajax-post" data-layer_c="1" target-form="form-horizontal" type="submit">确 定</button>
  80. <button class="btn cancel-btn btn-default" type="button">取 消</button>
  81. <!--<a href="{:url('index',['pid'=>$pid])}" class="btn btn-default">取 消</a>-->
  82. </div>
  83. </div>
  84. </form>
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. {/block}
  90. {block name="script"}
  91. <script>
  92. $(document).ready(function(){
  93. formSetValue("enable", {$info.enable|default=1});
  94. });
  95. $(document).ready(function(){
  96. formSetValue("type", {$info.type|default=0});
  97. });
  98. </script>
  99. {/block}