@extends('layouts.admin') @section('css') @endsection @section('content')
{{ Form::open(array('route' => $routes, 'method' => 'POST' ,'id' => 'ajaxSave','files' => true))}}
{{Form::label('id', __('advertisements.store-name'), array('class' => 'control-label'))}} {{ Form::select('store',$stores, $data->store_id, array('class' => 'form-control select2 ajaxSelect', 'id'=>'store', 'data-url' => route('advertisements.get-device-by-store'), 'data-target' => 'device', 'data-live-search'=>'true','title'=>__('common.select-option'))) }}
{{Form::label('id', __('advertisements.screen'), array('class' => 'control-label'))}} {{ Form::select('screen[]', isset($screens) ? $screens : [], explode(',', $data->device_id), array('class' => 'form-control','id'=>'device','multiple'=>'true','data-live-search'=>'true')) }}
{{Form::label('id', __('advertisements.name'), array('class' => 'control-label'))}} {{ Form::text('name',$data->title, array('class' => 'form-control')) }}
{{Form::label('id', __('advertisements.description'), array('class' => 'control-label'))}} {{ Form::textarea('description',$data->description, array('class' => 'form-control','cols'=>2,'rows'=>2)) }}
{{Form::label('id', __('advertisements.from'), array('class' => 'control-label'))}} {{ Form::text('from', dateFormat($data->from_date, DISPLAY_DATETIME2), array('class' => 'form-control datepicker-input-sch')) }}
{{Form::label('id', __('advertisements.to'), array('class' => 'control-label'))}} {{ Form::text('to', dateFormat($data->to_date, DISPLAY_DATETIME2), array('class' => 'form-control datepicker-input-sch')) }}
{{Form::label('id', __('advertisements.priority'), array('class' => 'control-label'))}} {{ Form::select('priority',adsPriority(),$data->priority, array('class' => 'form-control','id'=>'device')) }}
{{Form::label('id', __('advertisements.status'), array('class' => 'control-label'))}} {{ Form::select('status',activeStatus(),isset($data->status) ? $data->status : 1, array('class' => 'form-control','id'=>'status')) }}
{{ Form::file('image[]', ['class' => 'gallery', 'id' => 'main_advt', 'multiple' => true, 'accept' => 'image/*'])}}

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

@php $haveImages = false; @endphp @if(isset($bannerImages) && count($bannerImages) > 0)
@foreach ($bannerImages as $img) @if($img->is_night == 0) @php $haveImages = true; @endphp
@if(count($bannerImages) > 1) × @endif
@endif @endforeach
@endif @if(!$haveImages && file_exists($data->image))
@endif
{{ Form::file('video', ['class' => '__preview_video', 'data-target' => '__preview_video_target', 'accept' => 'video/*'])}}
@if(!empty($data->video))

 

{{ __('advertisements.review')}}

@endif
{{-- Night meny section start --}}
{{Form::label('id', __('advertisements.night_meny'), array('class' => 'control-label'))}}
night_meny_status == 1) ? '' : 'style="display: none;"' !!}>
{{Form::label('id', __('advertisements.weeks'), array('class' => 'control-label'))}}
{{Form::label('id', __('advertisements.start_time'), array('class' => 'control-label'))}} {{ Form::text('night_meny_from_time', $data->night_meny_from_time, ['class' => 'form-control t-picker start_time']) }}
{{Form::label('id', __('advertisements.end_time'), array('class' => 'control-label'))}} {{ Form::text('night_meny_to_time',$data->night_meny_to_time, ['class' => 'form-control t-picker end_time']) }}
{{ Form::file('night_meny_image[]', ['class' => 'gallery', 'id' => 'night_advt', 'multiple' => true, 'accept' => 'image/*'])}}

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

@php $haveNightImages = false; @endphp @if(isset($bannerImages) && count($bannerImages) > 0)
@foreach ($bannerImages as $img) @if($img->is_night == 1) @php $haveNightImages = true; @endphp @endif @endforeach
@endif @if(!$haveNightImages && file_exists($data->night_meny_image))
@endif
{{ Form::file('night_meny_video', ['class' => '__preview_video', 'data-target' => '__night_preview_video_target', 'accept' => 'video/*'])}}
@if(!empty($data->night_meny_video))

 

{{ __('advertisements.review')}}

@endif
{{-- Night meny section end --}}
  • {{ Form::submit( __('common.save'), array('class' => 'btn btn-primary width80'));}}
  • {{--
  • {{ Form::reset( __('common.cancel'), array('class' => 'btn btn-default width80'));}}
  • --}}
{{ Form::close()}}
@endsection @section('script') @endsection