@extends('admins.layouts.index') @section('content') {!! Form::model($model, ['method'=>'post','class'=>'form-horizontal','files'=>true]) !!}

{{__('Photos Information')}}

@foreach($model->photos()->orderBy('is_header','desc')->get() as $photo)
@if($photo->is_header)
{{ __('Header') }}
@else @endif
{{ __('Remove Photo') }}
@endforeach
@foreach(App\Translation::get_lang_array() as $index => $row) @php $data = $model->getFormTranslation($row->lang); @endphp
{{ __('Basic Information') }}
{!! Form::label('locale['.$row->lang.'][title]', __('Title'), ['class'=>'col-sm-3 col-form-label text-right']) !!}
{!! Form::text('locale['.$row->lang.'][title]', $model->id ? (isset($data['title']) ? $data['title']:null):null, ['id'=>'locale['.$row->lang.'][title]','class'=>'form-control '.($errors->first('locale.*.title') ? 'is-invalid' : ''), $index == 0 ? 'autofocus':'']) !!} {!!$errors->first('locale.*.title', ':message')!!}
{!! Form::label('locale['.$row->lang.'][description]', __('Description'), ['class'=>'col-sm-2 col-form-label text-right']) !!}
{!! Form::textarea('locale['.$row->lang.'][description]', $model->id ? (isset($data['description']) ? $data['description']:null):null, ['id'=>'locale['.$row->lang.'][description]','class'=>'textarea form-control '.($errors->first('locale.*.description') ? 'is-invalid' : ''), $index == 0 ? 'autofocus':'']) !!} {!!$errors->first('locale.*.description', ':message')!!}
{!! Form::label('locale['.$row->lang.'][highlight_places]', __('Highlight Places'), ['class'=>'col-sm-3 col-form-label text-right']) !!}
{!! Form::text('locale['.$row->lang.'][highlight_places]', $model->id ? (isset($data['highlight_places']) ? $data['highlight_places']:null):null, ['id'=>'locale['.$row->lang.'][highlight_places]','class'=>'form-control '.($errors->first('locale.*.highlight_places') ? 'is-invalid' : ''), $index == 0 ? 'autofocus':'']) !!} {!!$errors->first('locale.*.highlight_places', ':message')!!}
@endforeach

{{__('Basic Information')}}

{!! Form::label('category_id', __('Tour Category'), ['class'=>'col-sm-4 col-form-label text-right']) !!}
{!! Form::select('category_id', App\TourCategory::combobox(), null, ['id'=>'category_id','class'=>'form-control select2 '.($errors->first('category_id') ? 'is-invalid' : '')]) !!} {!!$errors->first('category_id', ':message')!!}
{!! Form::label('introduce_place_id', __('Introduce Place'), ['class'=>'col-sm-4 col-form-label text-right']) !!}
{!! Form::select('introduce_place_id', App\IntroducePlace::combobox(), null, ['id'=>'introduce_place_id','class'=>'form-control select2 '.($errors->first('introduce_place_id') ? 'is-invalid' : '')]) !!} {!!$errors->first('introduce_place_id', ':message')!!}
{!! Form::label('photo_url[]', __('Photo'), ['class'=>'col-sm-4 col-form-label text-right']) !!}
{!! Form::file('photo_url[]', ['id'=>'photo_url','class'=>'custom-file-input '.($errors->first('photo_url[]') ? 'is-invalid' : ''),'multiple'=>true]) !!} {!! Form::label('photo_url[]', __('Choose File'), ['class'=>'custom-file-label']) !!}
{!! Form::label('attachment_brochure', __('Brochure (En)'), ['class'=>'col-sm-4 col-form-label text-right']) !!}
{!! Form::file('attachment_brochure', ['id'=>'attachment_brochure','class'=>'custom-file-input '.($errors->first('attachment_brochure') ? 'is-invalid' : '')]) !!} {!! Form::label('attachment_brochure', __('Choose File'), ['class'=>'custom-file-label']) !!}
@if($model->attachment_brochure) @endif
{!!$errors->first('attachment_brochure', ':message')!!}
{!! Form::label('attachment_brochure_ch', __('Brochure (Ch)'), ['class'=>'col-sm-4 col-form-label text-right']) !!}
{!! Form::file('attachment_brochure_ch', ['id'=>'attachment_brochure_ch','class'=>'custom-file-input '.($errors->first('attachment_brochure_ch') ? 'is-invalid' : '')]) !!} {!! Form::label('attachment_brochure_ch', __('Choose File'), ['class'=>'custom-file-label']) !!}
@if($model->attachment_brochure_ch) @endif
{!!$errors->first('attachment_brochure_ch', ':message')!!}
{!! Form::label('standard_adult_price', __('Standard Adult Price'), ['class'=>'col-sm-4 col-form-label text-right']) !!}
{!! Form::number('standard_adult_price', null, ['id'=>'standard_adult_price','class'=>'form-control '.($errors->first('standard_adult_price') ? 'is-invalid' : ''),'min'=>'0.00','step'=>'0.01']) !!} {!!$errors->first('standard_adult_price', ':message')!!}
{!! Form::label('standard_child_price', __('Standard Child Price'), ['class'=>'col-sm-4 col-form-label text-right']) !!}
{!! Form::number('standard_child_price', null, ['id'=>'standard_child_price','class'=>'form-control '.($errors->first('standard_child_price') ? 'is-invalid' : ''),'min'=>'0.00','step'=>'0.01']) !!} {!!$errors->first('standard_child_price', ':message')!!}

{{__('Time Table Information')}}

@if(!is_null($model->time_tables)) @foreach($model->time_tables as $row) @php $i++; @endphp @endforeach @endif
# {{ __('Days') }} {{ __('Description') }}
{{ $i }} {!! Form::text('time_tables['.$i.'][label_days]', isset($row['label_days']) ? $row['label_days']:null, ['id'=>'time_tables_label_days_'.$i,'class'=>'text-center form-control '.($errors->first('time_tables.'.$i.'.label_days]') ? 'is-invalid' : '')]) !!} {!! Form::textarea('time_tables['.$i.'][description]', isset($row['description']) ? $row['description']:null, ['rows'=>5,'id'=>'time_tables_description_'.$i,'class'=>'form-control '.($errors->first('time_tables.'.$i.'.description]') ? 'is-invalid' : '')]) !!}
{{ $i }} {!! Form::text('time_tables['.$i.'][label_days]', null, ['id'=>'time_tables_label_days_'.$i,'class'=>'text-center form-control '.($errors->first('time_tables.'.$i.'.label_days]') ? 'is-invalid' : '')]) !!} {!! Form::textarea('time_tables['.$i.'][description]', null, ['rows'=>5,'id'=>'time_tables_description_'.$i,'class'=>'form-control '.($errors->first('time_tables.'.$i.'.description]') ? 'is-invalid' : '')]) !!}

{{__('Schedule Information')}}

@foreach($model->schedules as $row) @php $n++; @endphp @endforeach
# {{ __('Date') }} {{ __('Max. Pax.') }} {{ __('Adult Price') }} {{ __('Discounted Price') }} {{ __('Child Price') }} {{ __('Discounted Price') }}
{{ $n }} {!! Form::text('schedules['.$n.'][tourist_date]', $row->tourist_date, ['id'=>'schedules_tourist_date_'.$n,'class'=>'datepicker text-center form-control '.($errors->first('schedules.'.$n.'.tourist_date]') ? 'is-invalid' : '')]) !!} {!! Form::text('schedules['.$n.'][max_pax]', $row->max_pax, ['id'=>'schedules_max_pax_'.$n,'class'=>'text-center form-control '.($errors->first('schedules.'.$n.'.max_pax]') ? 'is-invalid' : '')]) !!} {!! Form::text('schedules['.$n.'][adult_price]', $row->adult_price, ['id'=>'schedules_adult_price_'.$n,'onchange'=>'init_double(this)','class'=>'text-center form-control '.($errors->first('schedules.'.$n.'.adult_price]') ? 'is-invalid' : '')]) !!} {!! Form::text('schedules['.$n.'][adult_discounted_price]', $row->adult_discounted_price, ['id'=>'schedules_adult_discounted_price_'.$n,'onchange'=>'init_double(this)','class'=>'text-center form-control '.($errors->first('schedules.'.$n.'.adult_discounted_price]') ? 'is-invalid' : '')]) !!} {!! Form::text('schedules['.$n.'][child_price]', $row->child_price, ['id'=>'schedules_child_price_'.$n,'onchange'=>'init_double(this)','class'=>'text-center form-control '.($errors->first('schedules.'.$n.'.child_price]') ? 'is-invalid' : '')]) !!} {!! Form::text('schedules['.$n.'][child_discounted_price]', $row->child_discounted_price, ['id'=>'schedules_child_discounted_price_'.$n,'onchange'=>'init_double(this)','class'=>'text-center form-control '.($errors->first('schedules.'.$n.'.child_discounted_price]') ? 'is-invalid' : '')]) !!}
{{ $n }} {!! Form::text('schedules['.$n.'][tourist_date]', null, ['id'=>'schedules_tourist_date_'.$n,'class'=>'datepicker text-center form-control '.($errors->first('schedules.'.$n.'.tourist_date]') ? 'is-invalid' : '')]) !!} {!! Form::text('schedules['.$n.'][max_pax]', null, ['id'=>'schedules_max_pax_'.$n,'class'=>'text-center form-control '.($errors->first('schedules.'.$n.'.max_pax]') ? 'is-invalid' : '')]) !!} {!! Form::text('schedules['.$n.'][adult_price]', null, ['id'=>'schedules_adult_price_'.$n,'onchange'=>'init_double(this)','class'=>'text-center form-control '.($errors->first('schedules.'.$n.'.adult_price]') ? 'is-invalid' : '')]) !!} {!! Form::text('schedules['.$n.'][adult_discounted_price]', null, ['id'=>'schedules_adult_discounted_price_'.$n,'onchange'=>'init_double(this)','class'=>'text-center form-control '.($errors->first('schedules.'.$n.'.adult_discounted_price]') ? 'is-invalid' : '')]) !!} {!! Form::text('schedules['.$n.'][child_price]', null, ['id'=>'schedules_child_price_'.$n,'onchange'=>'init_double(this)','class'=>'text-center form-control '.($errors->first('schedules.'.$n.'.child_price]') ? 'is-invalid' : '')]) !!} {!! Form::text('schedules['.$n.'][child_discounted_price]', null, ['id'=>'schedules_child_discounted_price_'.$n,'onchange'=>'init_double(this)','class'=>'text-center form-control '.($errors->first('schedules.'.$n.'.child_discounted_price]') ? 'is-invalid' : '')]) !!}

{{__('More Information')}}

{{ __('Meal Provided') }}
{!! Form::radio('meal_provided', 1, true, ['id'=>'meal_provided_yes','class'=>'form-check-input']) !!}
{!! Form::radio('meal_provided', 0, false, ['id'=>'meal_provided_no','class'=>'form-check-input']) !!}
{{ __('Hotel Provided') }}
{!! Form::radio('hotel_provided', 1, true, ['id'=>'hotel_provided_yes','class'=>'form-check-input']) !!}
{!! Form::radio('hotel_provided', 0, false, ['id'=>'hotel_provided_no','class'=>'form-check-input']) !!}
{{ __('Accessibiliy Provided') }}
{!! Form::radio('accessibiliy_provided', 1, true, ['id'=>'accessibiliy_provided_yes','class'=>'form-check-input']) !!}
{!! Form::radio('accessibiliy_provided', 0, false, ['id'=>'accessibiliy_provided_no','class'=>'form-check-input']) !!}
{{ __('Tour Guide Provided') }}
{!! Form::radio('tour_guide_provided', 1, true, ['id'=>'tour_guide_provided_yes','class'=>'form-check-input']) !!}
{!! Form::radio('tour_guide_provided', 0, false, ['id'=>'tour_guide_provided_no','class'=>'form-check-input']) !!}
{{ __('Transport Provided') }}
{!! Form::radio('transport_provided', 1, true, ['id'=>'transport_provided_yes','class'=>'form-check-input']) !!}
{!! Form::radio('transport_provided', 0, false, ['id'=>'transport_provided_no','class'=>'form-check-input']) !!}

{{ __('Status') }}
{!! Form::radio('status', 1, true, ['id'=>'status_enabled','class'=>'form-check-input']) !!}
{!! Form::radio('status', 0, false, ['id'=>'status_disabled','class'=>'form-check-input']) !!}
{!! Form::close() !!} @endsection @section('script') @endsection