You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
4.2 KiB

8 years ago
  1. <!DOCTYPE html><html><head><title>菜单修改_后台管理</title>@include('admin.common.header')
  2. <div class="container-fluid">
  3. <div class="row">
  4. <!-- 左边开始 --><div class="col-sm-3 col-md-2 sidebar">@include('admin.common.leftmenu')</div><!-- 左边结束 -->
  5. <!-- 右边开始 --><div class="col-sm-9 col-md-10 rightbox"><div id="mainbox">
  6. <h5 class="sub-header"><a href="/fladmin/menu">菜单列表</a> > 菜单修改</h5>
  7. <form id="addarc" method="post" action="/fladmin/menu/doedit" role="form" enctype="multipart/form-data" class="table-responsive">{{ csrf_field() }}
  8. <table class="table table-striped table-bordered">
  9. <tbody>
  10. <tr>
  11. <td align="right">上级:</td>
  12. <td>
  13. <select name="pid" id="pid">
  14. <option value="0">顶级菜单</option>
  15. <?php if($menu){foreach($menu as $row){ ?>
  16. <?php if($row["id"]==$post["pid"]){ ?>
  17. <option selected value="<?php echo $row["id"]; ?>"><?php for($i=0;$i<$row["deep"];$i++){echo "";}echo $row["name"]; ?></option>
  18. <?php }else{ ?>
  19. <option value="<?php echo $row["id"]; ?>"><?php for($i=0;$i<$row["deep"];$i++){echo "";}echo $row["name"]; ?></option>
  20. <?php }}} ?>
  21. </select>
  22. </td>
  23. </tr>
  24. <tr>
  25. <td align="right">名称:</td>
  26. <td><input name="name" type="text" id="name" value="<?php echo $post["name"]; ?>" class="required" style="width:30%" placeholder="在此输入菜单名称"><input style="display:none;" name="id" type="text" id="id" value="<?php echo $id; ?>"></td>
  27. </tr>
  28. <tr>
  29. <td align="right">操作方法:</td>
  30. <td><input name="action" type="text" id="action" value="<?php echo $post["action"]; ?>" class="required" style="width:30%"></td>
  31. </tr>
  32. <tr>
  33. <td align="right">参数:</td>
  34. <td><input name="data" type="text" id="data" value="<?php echo $post["data"]; ?>" style="width:30%"></td>
  35. </tr>
  36. <tr>
  37. <td align="right">图标:</td>
  38. <td><input name="icon" type="text" id="icon" value="<?php echo $post["icon"]; ?>" style="width:30%"></td>
  39. </tr>
  40. <tr>
  41. <td align="right">备注:</td>
  42. <td><input name="des" type="text" id="des" value="<?php echo $post["des"]; ?>" style="width:50%"></td>
  43. </tr>
  44. <tr>
  45. <td align="right">状态:</td>
  46. <td>
  47. <input type="radio" value='1' name="status" <?php if($post['status']==1){echo 'checked';} ?> />&nbsp;显示&nbsp;&nbsp;
  48. <input type="radio" value='0' name="status" <?php if($post['status']==0){echo 'checked';} ?> />&nbsp;隐藏
  49. </td>
  50. </tr>
  51. <tr>
  52. <td align="right">状态:</td>
  53. <td>
  54. <input type="radio" value='1' name="type" <?php if($post['type']==1){echo 'checked';} ?> />&nbsp;权限认证+菜单&nbsp;&nbsp;
  55. <input type="radio" value='0' name="type" <?php if($post['type']==0){echo 'checked';} ?> />&nbsp;只作为菜单
  56. <br><small style="color:#999">注意:“权限认证+菜单”表示加入后台权限管理,纯碎是菜单项请不要选择此项。</small>
  57. </td>
  58. </tr>
  59. <tr>
  60. <td colspan="2"><button type="submit" class="btn btn-success" value="Submit">保存(Submit)</button>&nbsp;&nbsp;<button type="reset" class="btn btn-default" value="Reset">重置(Reset)</button></td>
  61. </tr>
  62. </tbody></table></form><!-- 表单结束 -->
  63. </div></div><!-- 右边结束 --></div></div>
  64. <script>
  65. $(function(){
  66. $(".required").blur(function(){
  67. var $parent = $(this).parent();
  68. $parent.find(".formtips").remove();
  69. if(this.value=="")
  70. {
  71. $parent.append(' <small class="formtips onError"><font color="red">不能为空!</font></small>');
  72. }
  73. else
  74. {
  75. $parent.append(' <small class="formtips onSuccess"><font color="green">OK</font></small>');
  76. }
  77. });
  78. //重置
  79. $('#addarc input[type="reset"]').click(function(){
  80. $(".formtips").remove();
  81. });
  82. $("#addarc").submit(function(){
  83. $(".required").trigger('blur');
  84. var numError = $('#addarc .onError').length;
  85. if(numError){return false;}
  86. });
  87. });
  88. </script>
  89. </body></html>