@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" style="width: 125px">
      <input type="text" name="game" required  lay-verify="required" autocomplete="off" class="layui-input" value="{{isset(
      $game)?trans('common.'.$game):''}}" disabled="disabled">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">期号</label>
    <div class="layui-input-block">
      <input type="hidden" name="game" required  lay-verify="required" autocomplete="off" class="layui-input" value="{{$game}}">
      <input type="text" name="no"   lay-verify="" autocomplete="off" class="layui-input" value="{{isset($no)?$no:''}}" readonly="true">
    </div>
  </div>

    <div class="layui-form-item">
        <label class="layui-form-label">一队名称</label>
        <div class="layui-input-block">
            <input type="text" name="team_a_name"   lay-verify="" autocomplete="off" class="layui-input" value="{{ $team_info['team_a_name'] }}" disabled>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">二队名称</label>
        <div class="layui-input-block">
            <input type="text" name="team_b_name"   lay-verify="" autocomplete="off" class="layui-input" value="{{$team_info['team_b_name']}}" disabled>
        </div>
    </div>

    @foreach($gameCode as $k=>$v)
        <div class="layui-form-item">
            <label class="layui-form-label">{{ trans($game.'.'.$k) }}</label>
            <div class="layui-input-block">
                @if(is_array($v)&&count($v)>0)
                <select name="codes[]" >
                    @foreach($v as $key=>$v2)
                        <option value="{{$key}}">{{ trans($game.'.'.$v2) }}</option>
                    @endforeach
                </select>
                    @else
                    <input type="text" class="layui-input" name="codes[]" value="">
                @endif
            </div>
        </div>
    @endforeach


  {{--<div class="layui-form-item">
    <label class="layui-form-label">{{ trans('gamemenu.dragon') }}</label>
    <div class="layui-input-block">
      <select name="" >
        <option value="first">{{ trans('opengame.opengame.dragon.first') }}</option>
        <option value="second">{{ trans('opengame.opengame.dragon.second') }}</option>
        <option value="second">{{ trans('opengame.opengame.dragon.tie') }}</option>
      </select>
    </div>
  </div>
  @endif

  <div class="layui-form-item">
    <label class="layui-form-label">{{ trans('gamemenu.blood') }}</label>
    <div class="layui-input-block">
      <select name="parent_id" >
        <option value="first">{{ trans('opengame.opengame.dragon.first') }}</option>
        <option value="second">{{ trans('opengame.opengame.dragon.second') }}</option>
      </select>
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">{{ trans('gamemenu.tower') }}</label>
    <div class="layui-input-block">
      <select name="parent_id" >
        <option value="first">{{ trans('opengame.opengame.dragon.first') }}</option>
        <option value="second">{{ trans('opengame.opengame.dragon.second') }}</option>
      </select>
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">{{ trans('gamemenu.attribute') }}</label>
    <div class="layui-input-block">
      <select name="parent_id" >
        <option value="1">{{ trans('opengame.opengame.attribute.wind') }}</option>
        <option value="2">{{ trans('opengame.opengame.attribute.fire') }}</option>
        <option value="3">{{ trans('opengame.opengame.attribute.water') }}</option>
        <option value="4">{{ trans('opengame.opengame.attribute.soil') }}</option>
      </select>
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">{{ trans('gamemenu.kill') }}</label>
    <div class="layui-input-block">
      <select name="parent_id" >
        <option value="1">{{ trans('opengame.opengame.dragon.first') }}</option>
        <option value="2">{{ trans('opengame.opengame.dragon.second') }}</option>
        <option value="0">{{ trans('opengame.opengame.dragon.tie') }}</option>
      </select>
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">{{ trans('gamemenu.head') }}</label>
    <div class="layui-input-block">
      <select name="parent_id" >
        <option value="1">{{ trans('opengame.opengame.number.single') }}</option>
        <option value="2">{{ trans('opengame.opengame.number.double') }}</option>
      </select>
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">{{ trans('gamemenu.team') }}</label>
    <div class="layui-input-block">
      <select name="parent_id" >
        <option value="1">{{ trans('opengame.opengame.dragon.first') }}</option>
        <option value="2">{{ trans('opengame.opengame.dragon.second') }}</option>
      </select>
    </div>
  </div>--}}

  <div class="layui-form-item">
    <label class="layui-form-label">二级密码</label>
    <div class="layui-input-block">
    <input type="password" name="password"   lay-verify="" placeholder="请输入密码" autocomplete="off" class="layui-input" value="">
    </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-normal">重置</button>
    </div>
  </div>
</form>
 
<script>
//Demo
layui.use(['form'], function(){
  var form = layui.form;
  
  //监听提交
  form.on('submit(submitForm)', function(data){
    return true;
  });
});

</script>
@endsection
