@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="text" name="loginname" required  lay-verify="required" autocomplete="off" class="layui-input" value="{{isset($data['loginname'])?$data['loginname']:''}}" @if(!isset($dis)) readonly="readonly" @endif>
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">登陆密码</label>
    <div class="layui-input-block">
    <input type="password" name="password"   lay-verify="" autocomplete="off" class="layui-input" value="">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">确认密码</label>
    <div class="layui-input-block">
      <input type="password" name="repassword"   lay-verify="" autocomplete="off" class="layui-input" value="">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">二次密码</label>
    <div class="layui-input-block">
      <input type="password" name="password_2"   lay-verify="" autocomplete="off" class="layui-input" value="">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">确认二次密码</label>
    <div class="layui-input-block">
      <input type="password" name="repassword_2"   lay-verify="" autocomplete="off" class="layui-input" value="">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">允许开奖</label>
    <div class="layui-input-block">
      <input type="radio" name="root_id" value="1" title="允许" @if($data['root_id']==1) checked @endif>
      <input type="radio" name="root_id" value="4" title="不允许" @if($data['root_id']==4) checked @endif>
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">是否禁用</label>
    <div class="layui-input-block">
      <input type="radio" name="status" value="1" title="启用" @if($data['status']==1) checked @endif>
      <input type="radio" name="status" value="0" title="禁用" @if($data['status']==0) checked @endif>
    </div>
  </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(){
			window.location.href="/admin/Adminmanage/index";
	},2500);
}
</script>
@endsection
