@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">{{ trans('competition.info_name') }}:</label>
            <div class="layui-input-block">
                <input type="text" name="info_name"   id="info_name"  required  lay-verify="required" placeholder="" autocomplete="off" value="{{isset($data['info_name'])?$data['info_name']:''}}" class="layui-input">
            </div>
        </div>

            <div class="layui-form-item">
                <label class="layui-form-label">{{ trans('competition.sub_title') }}:</label>
                <div class="layui-input-block">
                    <input type="text" name="sub_title"   id="sub_title"  required  lay-verify="required" placeholder="" autocomplete="off" value="{{isset($data['sub_title'])?$data['sub_title']:''}}" class="layui-input">
                </div>
            </div>
        <!---期号-->
        <div class="layui-form-item">
            <label class="layui-form-label">{{ trans('competition.info_no') }}:</label>
            <div class="layui-input-block">
                <input type="text" name="remark"   id="remark"  required  lay-verify="required" placeholder="" autocomplete="off" value="{{isset($data['info_no'])?$data['info_no']:''}}" class="layui-input">
            </div>
        </div>
        <!---一队-->
        <div class="layui-form-item">
            <label class="layui-form-label">{{ trans('competition.team_a_name') }}:</label>
            <div class="layui-input-block">
            <input type="text" name="team_a_name"   id="team_a_name"  required  lay-verify="required" placeholder="" autocomplete="off" value="{{isset($data['team_a_name'])?$data['team_a_name']:''}}" class="layui-input">
            <!---<div class="layui-input-block">
                {{--<input type="radio" name="type" value="2" title="后台" @if($data['type']==2) checked @endif>--}}
                {{--<input type="radio" name="type" value="1" title="前台" @if($data['type']==1) checked @endif>--}}
            </div>--->
            </div>
        </div>
        <!---二队-->
        <div class="layui-form-item">
            <label class="layui-form-label">{{ trans('competition.team_b_name') }}:</label>
            <div class="layui-input-block">
            <input type="text" name="team_b_name"   id="team_b_name"  required  lay-verify="required" placeholder="" autocomplete="off" value="{{isset($data['team_b_name'])?$data['team_b_name']:''}}" class="layui-input">
            </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-green">重置</button>
                </div>
            </div>
        @endif
    </form>

    <script>
        //Demo
        layui.use(['form'], function(){
            var form = layui.form;

            //监听提交
            form.on('submit(submitForm)', function(data){
                return true;
            });
        });
        lay('.test-item').each(function(){
            laydate.render({
                elem: this
                ,type: 'datetime'
                ,trigger: 'click'
            });
        });
    </script>
@endsection
