@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>修改玩法初始限额</label>
</div>
  <div class="layui-form-item">
    <label class="layui-form-label">游戏</label>
    <div class="layui-input-block">
      <input type="text" name="loginname" required  lay-verify="required" autocomplete="off" class="layui-input" value="{{ $gname }}" disabled="disabled">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">{{ trans('sixlottery.play_type') }}</label>
    <div class="layui-input-block">
        <select name="play_type" id="play_type" lay-verify="" autocomplete="off" class="layui-input" eventType=event-query>
          @foreach(trans('sixlottery.playtype_list') as $k=>$v):
            @if(isset($data['play_type'])&&$data['play_type']==$k))
              <option value="{{$k}}" selected="selected">{{$v}}</option>
            @else
              <option value="{{$k}}">{{$v}}</option>
            @endif
          @endforeach
        </select>
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">{{ trans('sixlottery.small_money') }}</label>
    <div class="layui-input-block">
      <input type="small_money" name="small_money"   lay-verify="" autocomplete="off" class="layui-input" value="{{isset($data['small_money'])?$data['small_money']:''}}">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">{{ trans('sixlottery.big_money') }}</label>
    <div class="layui-input-block">
      <input type="big_money" name="big_money"   lay-verify="" autocomplete="off" class="layui-input" value="{{isset($data['big_money'])?$data['big_money']:''}}">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">{{ trans('sixlottery.oneoption_bigmoney') }}</label>
    <div class="layui-input-block">
      <input type="oneoption_bigmoney" name="oneoption_bigmoney"   lay-verify="" autocomplete="off" class="layui-input" value="{{isset($data['oneoption_bigmoney'])?$data['oneoption_bigmoney']:''}}">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">{{ trans('sixlottery.grade') }}</label>
    <div class="layui-input-block">
      <input type="grade_name" name="grade_name"   lay-verify="" autocomplete="off" class="layui-input" value="{{isset($data['name'])?$data['name']:''}}" disabled="disabled">
      <input type="hidden" name="grade"   lay-verify="" autocomplete="off" class="layui-input" value="{{isset($data['grade'])?(($data['grade']==0)?10:$data['grade']):''}}" disabled="disabled">
    </div>
  </div>

  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="submitForm">立即提交</button>
    </div>
  </div>
</form>

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

  //监听提交
  form.on('submit(submitForm)', function(data){
    return true;
  });
});

function cbFormSuccess(data){
	layer.alert(data.msg,{},function(){
		var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
		parent.layer.close(index);
		window.history.go(-1);

	});
}
</script>
@endsection
