@extends('layouts.admin',['hide_menu'=>true])

@section('content')



{{--
    <span class="glyphicon glyphicon-menu-left"></span>
    <a href="{{ route('$ROUTE$.index'$IF_HAS_PARENT$, [$parent]$END_HAS_PARENT$) }}">Back to list</a>
    <br><br>
--}}


    <form style="display:inline-block" class="form-inline" method="POST" $IF_FILE_UPLOAD$enctype="multipart/form-data"$END_IF_FILE_UPLOAD$
          action="{{  route('$ROUTE$.store'$IF_HAS_PARENT$, [$parent]$END_HAS_PARENT$) }}">


        @if(session()->has('flash_message'))
            <div class="alert alert-success alert-dismissible" role="alert">
              <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                  <span aria-hidden="true">&times;</span>
              </button>
              &nbsp; {{ session()->get('flash_message') }}
            </div>
            <br clear="all">
            <script>
                parent.refreshPageOnModalClose = true;
            </script>
        @endif


        @if($errors->any())
            <div class="alert alert-danger alert-dismissible" role="alert">
                <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                @foreach($errors->all() as $error)
                    {{ $error }}<br>
                @endforeach
            </div>
            <br clear="all">
        @endif



        {{ csrf_field() }}

        <table style="width: auto;" class="table table-inverse table-bordered table-sm table-responsive">
$FORM$
            <tr>
                <td>
                    &nbsp;
                </td>
                <td>
                    <button type="submit" class="btn btn-primary btn-sm">Save</button>
                    {{--
                    <a href="{{ route('$ROUTE$.index', [$IF_HAS_PARENT$$parent$END_HAS_PARENT$]) }}" class="btn btn-default btn-sm pull-right">Cancel</a>
                    --}}
                </td>
            </tr>
        </table>

    </form>




@stop