@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('matchcode.odds_code') }}:</label>
                <div class="layui-input-block">
                <input type="text" name="odds_code"   id="odds_code"  required  lay-verify="" placeholder="" autocomplete="off" value="@isset($matchcode) {{ $matchcode['odds_code'] }} @endisset" class="layui-input">
                </div>
            </div>
			 <div class="layui-form-item">
                <label class="layui-form-label">{{ trans('matchcode.odds_name') }}:</label>
                <div class="layui-input-block">
                <textarea  name="odds_name"   id="odds_name"    lay-verify="" placeholder="" autocomplete="off" class="layui-input" >@isset($matchcode) {{ $matchcode['odds_name'] }} @endisset </textarea>
                </div>
            </div>
            <div class="layui-form-item layui-form">
                <label class="layui-form-label">{{ trans('matchcode.p_id') }}:</label>
                    <div class="layui-input-block">
                    <select name="p_id"  id="p_id" lay-filter = 'sect'  lay-verify="" autocomplete="off" class="layui-input"  eventType=event-query>
                        <option value="">{{ trans('matchcode.choice') }}</option>
                        @foreach($data as $k=>$v)
                            <option value="{{$v['id']}}">{{$v['odds_name']}}</option>
                        @endforeach
                    </select>
                </div>
            </div>
            <div class="layui-form-item layui-form">
                <label class="layui-form-label">{{ trans('matchcode.game_code') }}:</label>
                    <div class="layui-input-block">
                    <select name="game_code"  id="game_code" lay-filter = 'sect'  lay-verify="" autocomplete="off" class="layui-input"  eventType=event-query>
                        <option value="">{{ trans('matchcode.choice_type') }}</option>
                        @foreach(trans('matchcode.choice_onlyt') as $k=>$v):
                            <option value="{{$k}}">{{$v}}</option>
                        @endforeach
                    </select>
                </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>
// function cbFormSuccess(data){
// 	layer.msg(data.msg);
// 	setTimeout(function(){
//     window.location.href='/admin/Sportsfoot/index';
// 		// parent.window.location.reload();
// 	},2500);
// }
// lay('.test-item').each(function(){
//     laydate.render({
//         elem: this
//         ,type: 'datetime'
//         ,trigger: 'click'
//     });
// });
</script>
@endsection
