12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- @extends('admin/master')
- @section('content')
- <body>
- @if(count($errors) > 0)
- <div class="Huialert Huialert-info" id="error">
- @foreach($errors->all() as $error)
- <li>{{$error}}</li>
- @endforeach
- </div>
- @endif
- <div class="page-container" style="margin-top:60px;">
- <form action="/admin/permission/update" method="post" class="form form-horizontal">
- <input type="hidden" name="_token" value="{{ csrf_token() }}" />
- <input type="hidden" name="id" value="{{$permission['id']}}">
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2">
- 名称:</label>
- <div class="formControls col-xs-6 col-sm-6">
- <input type="text" class="input-text" @if(old('name')) value="{{old('name')}}" @else value="{{$permission['name']}}" @endif placeholder="" name="name">
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2">
- 说明:</label>
- <div class="formControls col-xs-6 col-sm-6">
- <input type="text" class="input-text" @if(old('description')) value="{{old('description')}}" @else value="{{$permission['description']}}" @endif placeholder="" name="description">
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-4 col-sm-2">父级权限:</label>
- <div class="formControls col-xs-6 col-sm-6"> <span class="select-box">
- <select class="select" size="1" name="parent_id">
- @if (old('parent_id'))
- @if((old('parent_id'))==0)
- <option value="0" selected >一级权限</option>
- @foreach($permissions as $v)
- <option value="{{$v['id']}}">
- {{$v['name']}}[{{$v['description']}}]
- </option>
- @endforeach
- @else
- <option value="0">一级权限</option>
- @foreach($permissions as $v)
- <option value="{{$v['id']}}"
- @if($v['id']==old('parent_id')) selected @endif>{{$v['name']}}[{{$v['description']}}]
- </option>
- @endforeach
- @endif
- @else
- @if($permission['parent_id']==0)
- <option value="0" selected >一级权限</option>
- @foreach($permissions as $v)
- <option value="{{$v['id']}}">
- {{$v['name']}}[{{$v['description']}}]
- </option>
- @endforeach
- @else
- <option value="0">一级权限</option>
- @foreach($permissions as $v)
- <option value="{{$v['id']}}"
- @if($v['id']==$permission['parent_id']) selected @endif>{{$v['name']}}[{{$v['description']}}]
- </option>
- @endforeach
- @endif
- @endif
- </select>
- </span>
- </div>
- </div><br><br>
- <div class="row cl">
- <div class="col-9 col-offset-2">
- <button class="btn btn-primary radius" type="submit" value=" 提交 "> 修改 </button>
- <button class="btn btn-default" type="reset" onclick="return_index();"> 返回 </button>
- {{--<a href="javascript:void(0)" class="btn btn-default radius" onclick="redirect('{{url('/admin/permission/index')}}')">返回并查看结果</a>--}}
- </div>
- </div>
- </form>
- </div>
- <!--_footer 作为公共模版分离出去-->
- <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
- <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
- <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
- <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
- <!--/_footer 作为公共模版分离出去-->
- <!--请在下方写此页面业务相关的脚本-->
- <script type="text/javascript">
- $(function(){
- setTimeout("$('#error').hide()",3000);
- });
- /*返回*/
- function return_index(){
- location.href='/admin/permission/index';
- }
- </script>
- </body>
- @endsection
|