@extends('layouts.admin') @section('css') @endsection @section('content') @include('layouts.partials.messages')
{!! Form::open(['route' => $route, 'method' => 'POST', 'id' => 'ajaxSave', 'files' => true]) !!}
@php $selectedStore = isset($result->stores) ? explode(',', $result->stores) : []; @endphp
{!! Form::label('stores', __('global_items.stores'), ['class' => 'control-label mb-2']) !!} {!! Form::select('stores[]', $stores, $selectedStore, [ 'class' => 'form-control select2', 'multiple' => 'true', 'data-actions-box' => 'true', 'data-width' => '100%', ]) !!}
{!! Form::label('link_type', __('slider.link_type'), ['class' => 'control-label mb-2']) !!} {!! Form::select('link_type', $linkType, $result->link_type, [ 'class' => 'form-control select2-new select_link_type', ]) !!}
@php $showCategory = "style='display:none'"; $showItem = "style='display:none'"; $showUrl = "style='display:none'"; if (isset($result->link_type)) { if ($result->link_type == 1) { $showItem = "style='display:block'"; } elseif ($result->link_type == 2) { $showItem = "style='display:none'"; $showUrl = "style='display:none'"; $showCategory = "style='display:block'"; } elseif ($result->link_type == 3) { $showItem = "style='display:none'"; $showCategory = "style='display:none'"; $showUrl = "style='display:block'"; } else { $showItem = "style='display:none'"; $showCategory = "style='display:none'"; $showUrl = "style='display:none'"; } } @endphp
{!! Form::label('link', __('slider.items'), ['class' => 'control-label mb-2']) !!} {!! Form::select('items', $items, $result->link_type == 1 ? $result->link : '', [ 'class' => 'form-control select2', ]) !!}
{!! Form::label('link', __('slider.category'), ['class' => 'control-label mb-2']) !!} {!! Form::select('category', $category, $result->link_type == 2 ? $result->link : '', [ 'class' => 'form-control select2', ]) !!}
{!! Form::label('link', __('slider.url'), ['class' => 'control-label mb-2']) !!} {!! Form::text('url', $result->link_type == 3 ? $result->link : '', ['class' => 'form-control']) !!}
{!! Form::label('title', __('slider.title'), ['class' => 'control-label mb-2']) !!} {!! Form::text('title', $result->title, ['class' => 'form-control']) !!}
{!! Form::label('postion', __('slider.position'), ['class' => 'control-label mb-2']) !!} {!! Form::select('position', smallBannerPositions(), $result->position, ['class' => 'form-control select2']) !!}
{!! Form::label('sort', __('slider.sort'), ['class' => 'control-label mb-2']) !!} {!! Form::text('sort', $result->sort, ['class' => 'form-control']) !!}
{!! Form::label('description', __('slider.description'), ['class' => 'control-label mb-2']) !!} {!! Form::textarea('description', $result->description, ['class' => 'form-control', 'size' => '4x2']) !!}
@php $scheduleStyle = (isset($result) && $result->is_schedule == 1) || isset($_GET['is_schedule']) ? '' : 'style="display:none"'; @endphp
{{Form::label('id', __('advertisements.weeks'), array('class' => 'control-label'))}} {{--
--}}
@foreach($weekdays as $dayNo => $days) @endforeach
{!! Form::text('start_date', $startDate, [ 'class' => 'form-control datepicker-input-sch', ]) !!}
{!! Form::text('end_date', $endDate, [ 'class' => 'form-control datepicker-input-sch', ]) !!}
{{ Form::file('image[]', ['class' => 'gallery', 'id' => 'banners', 'accept' => 'image/*']) }}

{{ __('small_banner.note-size') }}

@if (isset($result->image) && $result->image != '') @php $images = json_decode($result->image); @endphp @if (count($images) > 0) @foreach ($images as $img)
@if (count($images) > 1) @endif
@endforeach @endif @endif
{!! Form::close() !!}
@endsection @section('script') @endsection