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

			             <div class="layui-form-item">
                <label class="layui-form-label">{{ trans('routes.rdesc') }}:</label>
                <div class="layui-input-block">
                <textarea type="text" style="width: 100%;height: 150px;" name="rdesc"   id="rdesc"  required  lay-verify="" placeholder="" autocomplete="off" class="layui-input">@isset($data) {{ $data['rdesc'] }} @endisset</textarea>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">类别:</label>
                <div class="layui-input-inline">
                <input  name="remark"   id="remark"  style="width: 100%;"  lay-verify="" placeholder="" autocomplete="off" class="layui-input" >@isset($data) {{ $data['remark'] }} @endisset </input>
                </div>
                <div class="layui-form-mid layui-word-aux">（供前端筛选数据可选值 <b>ios、android、pc、mobile</b>）</div>
            </div>


           <div class="layui-form-item">
                <label class="layui-form-label">{{ trans('routes.sort') }}:</label>
                <div class="layui-input-block">
                 <input name="sort"   id="sort"    lay-verify="" placeholder="" autocomplete="off" class="layui-input" value="@isset($data) {{ $data['sort'] }} @endisset">
                </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>
//Demo
layui.use(['form'], function(){
  var form = layui.form;

  //监听提交
  form.on('submit(submitForm)', function(data){
    return true;
  });
});
function cbFormSuccess(data){
	layer.msg(data.msg);
	setTimeout(function(){
    window.location.href='/admin/RoutesCategory/index';
		// parent.window.location.reload();
	},2500);
}
lay('.test-item').each(function(){
    laydate.render({
        elem: this
        ,type: 'datetime'
        ,trigger: 'click'
    });
});
</script>
@endsection
