@if(session()->has('section_updated')) @endif @include('includes.form_errors') @can('read', App\Location::class)
@lang('Location:') @if($section->location) {{$section->location->name}} @else @lang('None') @endif

@endcan @lang('Apply CSS to this section')
@lang('CSS Selector:') @lang('#section-id-'){{$section->id}}

{!! Form::model($section, ['method'=>'patch', 'action'=>['ManageSectionsController@update', $section->id], 'files'=>true, 'onsubmit'=>'submit_button.disabled = true; submit_button.value = "' . __('Please Wait...') . '"; return true;']) !!}
{!! Form::label('content', __('Content:')) !!} {!! Form::textarea('content', null, ['class'=>'form-control', 'rows'=>12, 'placeholder'=>__('Enter section content')]) !!}
{!! Form::label('priority', __('Priority:')) !!} {!! Form::number('priority', null, ['class'=>'form-control', 'placeholder'=>__('Enter priority'), 'min'=>'1']) !!}
{!! Form::label('position', __('Show in Home Page:')) !!} {!! Form::select('position', [ null=>'None', 'Above Main Slider'=>__('Above Main Slider'), 'Below Main Slider'=>__('Below Main Slider'), 'Above Deal Slider'=>__('Above Deal Slider'), 'Below Deal Slider'=>__('Below Deal Slider'), 'Above Footer'=>__('Above Footer'), 'Above Side Banners'=>__('Above Side Banners'), 'Below Side Banners'=>__('Below Side Banners') ], $section->position, ['class'=>'form-control selectpicker', 'data-style'=>'btn-default']) !!}
{!! Form::label('brand', __('Show in Brand:')) !!} {!! Form::select('brand', [''=>__('None')] + $brands, $section->brand_id, ['class'=>'form-control selectpicker', 'data-style'=>'btn-default']) !!}
{!! Form::label('position_brand', __('Position in Brand Page:')) !!} {!! Form::select('position_brand', [ null=>__('None'), 'Above Main Slider'=>__('Above Main Slider'), 'Below Main Slider'=>__('Below Main Slider'), 'Above Side Banners'=>__('Above Side Banners'), 'Below Side Banners'=>__('Below Side Banners'), 'Above Footer'=>__('Above Footer') ], $section->position_brand, ['class'=>'form-control selectpicker', 'data-style'=>'btn-default']) !!}
@if(count($categories) > 0)
@lang('Show in Category:') @if($section->category_id == 0) @lang('None')@endif
@endif @if($section->category)
@endif
{!! Form::label('position_category', __('Position in Category Page:')) !!} {!! Form::select('position_category', [ null=>'None', 'Above Main Slider'=>__('Above Main Slider'), 'Below Main Slider'=>__('Below Main Slider'), 'Above Side Banners'=>__('Above Side Banners'), 'Below Side Banners'=>__('Below Side Banners'), 'Above Footer'=>__('Above Footer') ], $section->position_category, ['class'=>'form-control selectpicker', 'data-style'=>'btn-default']) !!}
{!! Form::label('status', __('Status:')) !!} {!! Form::select('status', [0=>__('inactive'), 1=>__('active')], $section->is_active, ['class'=>'form-control selectpicker', 'data-style'=>'btn-default']) !!}
{!! Form::submit(__('Update'), ['class'=>'btn btn-primary col-xs-6 col-sm-6 pull-left', 'name'=>'submit_button']) !!}
{!! Form::close() !!}