@extends('admin.layout')

@section('content')

<?php
    if(!isset($data)) $data = array();
    if(!$data && session("data")){
        $data = session("data");
    }
    if(!$data && session('_old_input')){
        $data = session("_old_input");
    }
?>
	<div class="row">
		<div class="col-sm-12">
			<div class="ibox float-e-margins">
				<div class="ibox-title">
					<h5>专业信息</h5>
					<div class="ibox-tools">
						<a class="collapse-link"> <i class="fa fa-chevron-up"></i>
						</a>
					</div>
				</div>
				<div class="ibox-content">
                    @if(role('Major/Info/index'))
				    <div class="row">
    					<div class="col-sm-3 pull-right">
    					   <a href="{{ U('Major/Info/index')}}" class="btn btn-sm btn-primary pull-right">返回列表</a>
    					</div>
					</div>
                    @endif

		            <div class="row">
                        <div class="col-lg-10">
                            <form name="form_product" id="form-validation" action="" class="form-horizontal form-validation" accept-charset="UTF-8" method="post">

                                    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">年份</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_year" name="data[year]" class="form-control" value="{{ $data['year'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">科类</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_class" name="data[class]" class="form-control" value="{{ $data['class'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">批次</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_batch" name="data[batch]" class="form-control" value="{{ $data['batch'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">层次</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_level" name="data[level]" class="form-control" value="{{ $data['level'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">类别</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_type" name="data[type]" class="form-control" value="{{ $data['type'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">院校名称</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_college" name="data[college]" class="form-control" value="{{ $data['college'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">省份</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_province" name="data[province]" class="form-control" value="{{ $data['province'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">城市</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_city" name="data[city]" class="form-control" value="{{ $data['city'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">专业名称</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_major" name="data[major]" class="form-control" value="{{ $data['major'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">最高分</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_max_grade" name="data[max_grade]" class="form-control" value="{{ $data['max_grade'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">最低分</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_min_grade" name="data[min_grade]" class="form-control" value="{{ $data['min_grade'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">平均分</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_avg_grade" name="data[avg_grade]" class="form-control" value="{{ $data['avg_grade'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">批次线</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_batch_grade" name="data[batch_grade]" class="form-control" value="{{ $data['batch_grade'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">线差</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_miss_grade" name="data[miss_grade]" class="form-control" value="{{ $data['miss_grade'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">最高位次</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_max_rank" name="data[max_rank]" class="form-control" value="{{ $data['max_rank'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">最低位次</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_min_rank" name="data[min_rank]" class="form-control" value="{{ $data['min_rank'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">平均位次</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_avg_rank" name="data[avg_rank]" class="form-control" value="{{ $data['avg_rank'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">备注</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_comment" name="data[comment]" class="form-control" value="{{ $data['comment'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>
                                
                                <div class="form-group">
                                    <label class="control-label col-sm-3">&nbsp;</label>
                                    <div class="col-sm-9">
                                        <input type="hidden" name="_referer" value="<?php echo urlencode(request()->server('HTTP_REFERER'));?>"/>
                                        <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>"/>
                                        <input type="submit" class="btn btn-success" style="margin-right:20px;">
                                        <input type="reset" class="btn btn-default" >
                                    </div>
                                </div>
        
                            </form>
                        </div>
                        <!-- /.col-lg-10 -->
                    </div>
                    <!-- /.row -->
				</div>
			</div>
		</div>
	</div>

@endsection