mein-sterntours/resources/views/settings/travel_country/detail.blade.php
2019-10-02 20:03:55 +02:00

116 lines
No EOL
5.6 KiB
PHP
Executable file

@extends('layouts.layout-2')
@section('content')
{!! Form::open(['url' => route('admin_settings_travel_country_detail', [$id]), 'class' => 'form-horizontal']) !!}
<h4 class="font-weight-bold py-3 mb-1">
Reiseland @if($id == "new") <span class="text-primary">anlegen</span> @else {{"(ID: ".$id.")"}} verwalten @endif
<div class="float-right">
<button type="submit" name="action" value="saveAll" class="btn btn-submit btn-sm">{{ __('save changes') }}</button>&nbsp;
<a href="{{route('admin_settings_travel_country')}}" class="btn btn-default btn-sm">{{ __('back') }}</a>
</div>
</h4>
<div class="clearfix"></div>
<input type="hidden" name="id" id="id" value="{{$id}}">
<!-- draft -->
<div class="card mb-2">
<div class="card-body">
<div class="form-row">
<div class="form-group col-sm-6">
<label class="form-label" for="name">{{ __('Name') }}*</label>
{{ Form::text('name', $model->name, array('placeholder'=>__('Name'), 'class'=>'form-control', 'id'=>'name', 'required'=>true)) }}
</div>
<div class="form-group col-sm-2">
<label class="form-label">&nbsp;</label>
<label class="custom-control custom-checkbox mt-2">
{!! Form::checkbox('active_frontend', 1, $model->active_frontend, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label"><i class="far fa-eye"></i> {{__('Seite')}}</span>
</label>
</div>
<div class="form-group col-sm-2">
<label class="form-label">&nbsp;</label>
<label class="custom-control custom-checkbox mt-2">
{!! Form::checkbox('active_backend', 1, $model->active_backend, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label"><i class="far fa-eye"></i> {{__('CRM')}}</span>
</label>
</div>
<div class="form-group col-sm-2">
<label class="form-label">&nbsp;</label>
<label class="custom-control custom-checkbox mt-2">
{!! Form::checkbox('is_customer_country', 1, $model->is_customer_country, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label"><i class="far fa-eye"></i> {{__('Kunden')}}</span>
</label>
</div>
</div>
<div class="form-row">
<div class="form-group col-sm-6">
<label class="form-label" for="slug">{{ __('Slug') }}</label>
{{ Form::text('slug', $model->slug, array('placeholder'=>__('Slug'), 'class'=>'form-control', 'id'=>'slug')) }}
</div>
</div>
<div id="show_active_frontend" @if(!$model->active_frontend) style="display: none;" @endif>
<hr>
<h4>Inhalte für Seite</h4>
<div class="form-row">
<div class="form-group col-sm-12">
<label class="form-label" for="html_information">{{ __('Landinformationen (HTML)') }} </label>
{{ Form::textarea('html_information', $model->html_information, ['class' => 'form-control summernote-small']) }}
</div>
</div>
<hr>
<div class="form-row">
<div class="form-group col-sm-12">
<label class="form-label" for="text_before">{{ __('Formular Text vor der Reise (max. 255 Zeichen)') }} </label>
{{ Form::text('text_before', $model->text_before, ['class' => 'form-control', 'maxlength'=>'255']) }}
</div>
<div class="form-group col-sm-12">
<label class="form-label" for="html_information">{{ __('Formular Text nach der Reise ( max. 255 Zeichen)') }} </label>
{{ Form::text('text_after', $model->text_after, ['class' => 'form-control', 'maxlength'=>'255']) }}
</div>
</div>
<hr>
<h5>Einreisebestimmungen</h5>
@foreach($travel_nationalities as $travel_nationality)
<div class="form-row">
<div class="form-group col-sm-12">
<label class="form-label" for="travel_nationality_requirement_{{$travel_nationality->id}}">{{ $travel_nationality->name }}{{ __('(HTML)') }} </label>
{{ Form::textarea('travel_nationality_requirement['.$travel_nationality->id.']', $model->getNationalityRequirement($travel_nationality->id), ['class' => 'form-control summernote-small', 'id'=>'travel_nationality_requirement_'.$travel_nationality->id]) }}
</div>
</div>
@endforeach
</div>
</div>
</div>
<div class="text-left mt-3">
<button type="submit" name="action" value="saveAll" class="btn btn-submit">{{ __('save changes') }}</button>&nbsp;
<a href="{{route('admin_settings_travel_country')}}" class="btn btn-default">{{ __('back') }}</a>
</div>
{!! Form::close() !!}
<script>
$( document ).ready(function() {
$('input[name="active_frontend"]').on('change', function () {
if($(this).prop( "checked")){
$('#show_active_frontend').show("slow");
}else{
$('#show_active_frontend').hide("slow");
}
});
});
</script>
@endsection