@extends('admin.layout')
<style type="text/css">

</style>
@section('header')

@endsection

@section('content')
<div id="sg-main-container-sg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>{{ '添加' . $model_name }}</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link"> <i class="fa fa-chevron-up"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="row">
                            <div class="col-sm-12 pull-right">
                                <a href="{{ $pre_uri . 'index' }}" class="btn btn-sm btn-primary pull-right">返回列表</a>
                            </div>
                        </div>
                        <form class="form-horizontal" method="POST" action="{{ $pre_uri . 'store' }}">
                            {{ csrf_field() }}

                            <div class="form-group row">
                                <label class="col-sm-2 col-sm-offset-1 control-label">课程名</label>
                                <div class="col-sm-8">
                                    <input type="text" name="data[name]" class="form-control" placeholder="请输入课程名" value="{{ isset(old('data')['name']) ? old('data')['name'] : '' }}" required>
                                </div>
                                @if($errors->has('name'))
                                    <span class="help-block">{{ $errors->first('name') }}</span>
                                @endif
                            </div>

                            <div class="form-group row">
                                <label class="col-sm-2 col-sm-offset-1 control-label">是否启用</label>
                                <div class="col-sm-8">
                                    <label class="radio-inline">
                                        <input type="radio" name="data[status]" value="2" checked>是
                                    </label>
                                    <label class="radio-inline">
                                        <input type="radio" name="data[status]" value="1">否
                                    </label>
                                </div>
                            </div>

                            <div class="form-group row">
                                <div class="col-sm-8 col-sm-offset-3">
                                    <button type="submit" class="btn btn-sm btn-primary">提交</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection

@section('footer')
<script type="text/javascript">
$(function () {

})
</script>
@endsection