@extends('vip.layouts')
@section('content')

<form class="layui-form" action="{{ url()->full() }}" id="submitForm" name="submitForm" method="post" eventType=eventAjaxForm>
{!! csrf_field() !!}
  <div class="layui-form-item">
    <label class="layui-form-label">* 角色等级</label>
    <div class="layui-input-block">
      <input type="number" name="level" required  lay-verify="required" autocomplete="off" class="layui-input" value="{{$data['level']}}">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">* 角色名称</label>
    <div class="layui-input-block">
    <input type="text" name="rootname"   lay-verify="" autocomplete="off" class="layui-input" value="{{$data['name']}}">
    </div>    
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">* 最大操作金额</label>
    <div class="layui-input-inline">
    <input type="text" name="max_money"   lay-verify="" autocomplete="off" class="layui-input" value="{{$data['settingmoney']}}">
    </div>
  </div>

  <!--<div class="layui-form-item">
    <label class="layui-form-label">菜单选择</label>
    {{--@foreach($menu as $v)--}}
    {{--<div class="layui-input-block">--}}
      {{--<input type="checkbox" name="" value="{{$v['id']}}" title="" >{{trans("menu.".$v['name'])}}--}}
    {{--</div>--}}
    {{--@endforeach--}}
  </div>-->

  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="submitForm">立即提交</button>
    </div>
  </div>
</form>
 
<script>
//Demo
layui.use(['form'], function(){
  var form = layui.form;
  
  //监听提交
  form.on('submit(submitForm)', function(data){
    return true;
  });
});
function cbFormSuccess(data){
	layer.msg(data.msg);
	setTimeout(function(){
		parent.window.location.reload();
	},2500);
}
</script>
@endsection
