@extends('admin.layout.app')

@section('content')
    <div class="content-wrapper">
        <section class="content-header">
            <h1 class="pull-left">
                {{ $title }} Form
            </h1>
            <p>&nbsp;</p>
        </section>

        <section class="content">
            <div class="row">
                <div class="col-xs-12">
                    @if(!empty($record))
                        {!! Form::model($record, ['route' => [$route.'update',$record->id],'files' =>true , 'id'=>'myform', 'method' => 'patch', 'class' => 'ajax_submit','autocomplete'=>'off']) !!}
                    @else
                        {!! Form::open(['url' => route($route.'store'), 'files' =>true, 'method' => 'post','id'=>'myform' ,'class' => 'ajax_submit','autocomplete'=>'off']) !!}
                    @endif
                    <div class="box box-primary">
                        <div class="box-header with-border ">
                            <h3 class="box-title">Enter Details</h3>
                        </div>
                        <div class="box-body">
                            @include('admin.city.form')
                        </div>
                        <div class="box-footer">
                            <a href="{{ route($route.'index') }}" type="submit"
                               class="btn btn-default pull-left">Back</a>
                            <button type="submit" class="btn btn-primary pull-right">Submit</button>
                        </div>
                    </div>
                    {!! Form::close() !!}
                </div>
            </div>
        </section>
    </div>
@endsection

