@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="home_team" required  lay-verify="required" placeholder="请输入主动名称" autocomplete="off" value="{{ isset($home_team)?$home_team:'' }}" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">客队名称</label>
    <div class="layui-input-block">
    <input type="text" name="guest_team"   lay-verify="" placeholder="请输入客队名称" autocomplete="off" class="layui-input"  value="{{ isset($guest_team)?$guest_team:'' }}" >
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">客队让球数</label>
    <div class="layui-input-block">
    <input type="text" name="home_rate"   lay-verify="" placeholder="请输入客队让球数" autocomplete="off" class="layui-input"  value="{{ isset($home_rate)?$home_rate:'' }}" >
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">主队让球数</label>
    <div class="layui-input-block">
    <input type="text" name="guest_rate"   lay-verify="" placeholder="请输入主队让球数" autocomplete="off" class="layui-input"  value="{{ isset($guest_rate)?$guest_rate:'' }}" >
    </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($status==1) checked @endif >
            <input type="radio" name="status" value="2" title="已结束" @if($status==2) checked @endif>
        </div>
  </div>


@if(S('ACTION')!='view')
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="submitForm">立即提交</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
@endif
</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
