@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="infoname" required  lay-verify="required" autocomplete="off" class="layui-input" value="{{isset(
      $data['infoname'])?$data['infoname']:''}}" disabled="disabled">
    </div>
  </div>
  @if(in_array($data['infotype'],$arr))
  <div class="layui-form-item">
    <label class="layui-form-label">@if($data['infotype']==17)密码@else内容@endif</label>
    <div class="layui-input-block">
      @if($data['infotype']==6)
        <textarea name="infocontent" cols="80" rows="10">{{$data['infocontent']}}</textarea>
        @else
    <input type="@if($data['infotype']==17)passeord @else text @endif" name="infocontent"   lay-verify=""
           autocomplete="off" class="layui-input" value="@if($data['infotype']!=17) {{$data['infocontent']}} @endif">
    @endif
    </div>
  </div>
  @endif

 
  <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(){
		parent.window.location.reload();
	},2500);
}
</script>
@endsection
