暂无描述

rolecreate.blade.php 3.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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/store" 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="{{old('name')}}" placeholder="" name="name">
  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. @if(old('permissions'))
  27. <option value="{{$permission['name']}}"
  28. @foreach(old('permissions') as $v) @if($v==$permission['name']) selected @endif @endforeach>{{$permission['name']}}
  29. </option>
  30. @else
  31. <option value="{{$permission['name']}}">{{$permission['name']}}</option>
  32. @endif
  33. @endforeach
  34. </select>
  35. </span>
  36. </div>
  37. </div><br><br>
  38. <div class="row cl">
  39. <div class="col-9 col-offset-2">
  40. <button class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">&nbsp;&nbsp;提交&nbsp;&nbsp;</button>&nbsp;
  41. <button class="btn btn-default" type="reset" onclick="return_index();">&nbsp;&nbsp;返回&nbsp;&nbsp;</button>&nbsp;
  42. {{--<a href="javascript:void(0)" class="btn btn-default radius" onclick="redirect('{{url('/admin/permission/index')}}')">返回并查看结果</a>--}}
  43. </div>
  44. </div>
  45. </form>
  46. </div>
  47. <!--_footer 作为公共模版分离出去-->
  48. <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
  49. <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
  50. <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
  51. <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
  52. <!--/_footer 作为公共模版分离出去-->
  53. <!--请在下方写此页面业务相关的脚本-->
  54. <script type="text/javascript">
  55. $(function(){
  56. setTimeout("$('#error').hide()",3000);
  57. });
  58. /*返回*/
  59. function return_index(){
  60. location.href='/admin/permission/index?type=2';
  61. }
  62. </script>
  63. </body>
  64. @endsection