Ei kuvausta

roleedit.blade.php 3.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. @extends('admin/master')
  2. @section('content')
  3. <body>
  4. @if(count($errors) > 0)
  5. <div class="Huialert Huialert-info" id="error">
  6. @foreach($errors->all() as $error)
  7. <li>{{$error}}</li>
  8. @endforeach
  9. </div>
  10. @endif
  11. <div class="page-container" style="margin-top:60px;">
  12. <form action="/admin/role/update" method="post" class="form form-horizontal">
  13. <input type="hidden" name="_token" value="{{ csrf_token() }}" />
  14. <div class="row cl">
  15. <label class="form-label col-xs-4 col-sm-2">
  16. 名称:</label>
  17. <div class="formControls col-xs-6 col-sm-6">
  18. <input type="text" class="input-text" value="{{$data['role']}}" placeholder="" name="name" readonly="true">
  19. </div>
  20. </div>
  21. <div class="row cl">
  22. <label class="form-label col-xs-4 col-sm-2">子项:</label>
  23. <div class="formControls col-xs-6 col-sm-6"> <span class="select-box">
  24. <select class="select" name="permissions[]" multiple="multiple" style="height:300px;">
  25. @foreach($permissions as $permission)
  26. <option value="{{$permission['name']}}"
  27. @foreach($data['role_permissions'] as $v)
  28. @if(old('permissions'))
  29. @foreach(old('permissions') as $va)
  30. @if($va==$permission['name']) selected @endif
  31. @endforeach
  32. @elseif($v['child'] == $permission['name']) selected
  33. @endif
  34. @endforeach >{{$permission['name']}} [{{$permission['description']}}]</option>
  35. @endforeach
  36. </select>
  37. </span>
  38. </div>
  39. </div><br><br>
  40. <div class="row cl">
  41. <div class="col-9 col-offset-2">
  42. <button class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">&nbsp;&nbsp;修改&nbsp;&nbsp;</button>&nbsp;
  43. <button class="btn btn-default" type="reset" onclick="return_index();">&nbsp;&nbsp;返回&nbsp;&nbsp;</button>&nbsp;
  44. {{--<a href="javascript:void(0)" class="btn btn-default radius" onclick="redirect('{{url('/admin/permission/index')}}')">返回并查看结果</a>--}}
  45. </div>
  46. </div>
  47. </form>
  48. </div>
  49. <!--_footer 作为公共模版分离出去-->
  50. <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
  51. <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
  52. <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
  53. <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
  54. <!--/_footer 作为公共模版分离出去-->
  55. <!--请在下方写此页面业务相关的脚本-->
  56. <script type="text/javascript">
  57. $(function(){
  58. setTimeout("$('#error').hide()",3000);
  59. });
  60. /*返回*/
  61. function return_index(){
  62. location.href='/admin/permission/index?type=2';
  63. }
  64. </script>
  65. </body>
  66. @endsection