@extends('vip.layouts')
@section('content')
    <form class="layui-form" action="{{ url()->full() }}" id="submitForm" name="submitForm" method="post" eventType=eventAjaxForm>
        {!! csrf_field() !!}

            <input type="hidden" name="game_name" value="{{ $match['game_name'] }}">
            <input type="hidden" name="match_id" value="{{ $match['id'] }}">
        <!---比赛名-->
        <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="{{$match['match_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="" 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="info_no"   id="info_no"  required  lay-verify="required" placeholder="" autocomplete="off" value="" 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">
                <select name="team_a_identity" >
                    @foreach($team as $k=>$v)
                        <option value="{{$v['identity']}}">{{$v['team_name']}}</option>
                    @endforeach
                </select>
            </div>
        </div>
        <!---二队-->
        <div class="layui-form-item">
            <label class="layui-form-label">{{ trans('competition.team_b_name') }}:</label>
            <div class="layui-input-block">
                <select name="team_b_identity" >
                    @foreach($team as $k=>$v)
                        <option value="{{$v['identity']}}">{{$v['team_name']}}</option>
                    @endforeach
                </select>
            </div>
        </div>
        <!--开始时间-->
        <div class="layui-form-item">
            <label class="layui-form-label">{{ trans('competition.start_time') }}:</label>
            <div class="layui-input-block">
                <input type="text" name="start_time" class="layui-input test-item" id="form_start_time" placeholder="-">
            </div>
        </div>
        <!--结束时间-->
        <div class="layui-form-item">
            <label class="layui-form-label">{{ trans('competition.end_time') }}:</label>
            <div class="layui-input-block">
                <input type="text" name="end_time" class="layui-input test-item3"  id="form_end_time" placeholder="-">
            </div>
        </div>
        <!---期号-->
        <div class="layui-form-item">
            <label class="layui-form-label">{{ trans('competition.sealingplate') }}:</label>
            <div class="layui-input-block">
                <input type="text" name="sealingplate"   id="sealingplate"  required  lay-verify="required" placeholder="" autocomplete="off" value="" class="layui-input">
            </div>
        </div>
        <!--视频地址--->
        <div class="layui-form-item">
            <label class="layui-form-label">{{ trans('competition.video_url') }}:</label>
            <div class="layui-input-block">
                <input type="text" name="video_url"   id="sealingplate"  required placeholder="" autocomplete="off" value="" class="layui-input">
            </div>
        </div>
        <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>

    </form>

    <script>
        //Demo
        layui.use(['form','laydate'], function(){
            var form = layui.form,
                laydate = layui.laydate;
            //时间插件
            laydate.render({
                elem: '.test-item'
                ,type: 'datetime'
            });
            laydate.render({
                elem: '.test-item3'
                ,type: 'datetime'
            });
            //监听提交
            form.on('submit(submitForm)', function(data){
                return true;
            });

        });



    </script>
@endsection
