@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($name)?$name:''}}" disabled="disabled">
    </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">
    <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) {
    if(data.status=='1'){
        layer.msg('修改成功');
        window.parent.location.reload();
    }else{
        layer.msg(data.msg);
    }
};

</script>
@endsection
