mein-sterntours/resources/views/lead/_detail_participant.blade.php

93 lines
6 KiB
PHP

<div class="card mb-2">
<h6 class="card-header bg-primary text-white py-2" data-toggle="collapse" data-target="#collapseLeadParticipant" aria-expanded="false" aria-controls="collapseLeadParticipant">
<strong style="line-height: 1.6em">Teilnehmer</strong>
</h6>
<div class="collapse" id="collapseLeadParticipant">
<div class="card-body row">
<div class="table-responsive" id="booking_files_table">
<table class="table table-striped table-sm">
<thead>
<tr>
<th>Anrede</th>
<th>Vorname</th>
<th>Nachname</th>
<th>Geburtsdatum</th>
<th>Nationalität</th>
<th>Kind</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
@if($lead->participant_firstname)
<tr>
<th scope="row">
{{ Form::select('participant_salutation_id', \App\Services\Model::getSalutationArray(false) , $lead->participant_salutation_id, array('class'=>'custom-select', 'id'=>'participant_salutation_id')) }}
</th>
<td>
{{ Form::text('participant_firstname', $lead->participant_firstname, array('placeholder'=>__('Vorname'), 'class'=>'form-control', 'id'=>'participant_firstname')) }}
</td>
<td>
{{ Form::text('participant_name', $lead->participant_name, array('placeholder'=>__('Nachname'), 'class'=>'form-control', 'id'=>'participant_name')) }}
</td>
<td>
{{ Form::text('participant_birthdate', _format_date($lead->participant_birthdate), array('placeholder'=>__('Datum'), 'class'=>'form-control datepicker-base', 'id'=>'participant_birthdate')) }}
</td>
<td>
&nbsp;
</td>
<td>
&nbsp;
</td>
<td>
&nbsp;
</td>
</tr>
@endif
@if($lead->lead_participants)
@foreach($lead->lead_participants as $item)
<tr>
<th scope="row">
{{ Form::select('participant['.$item->id.'][participant_salutation_id]', \App\Services\Model::getSalutationArray(false) , $item->participant_salutation_id, array('class'=>'custom-select', 'id'=>'participant_'.$item->id.'_participant_salutation_id')) }}
</th>
<td>
{{ Form::text('participant['.$item->id.'][participant_firstname]', $item->participant_firstname, array('placeholder'=>__('Vorname'), 'class'=>'form-control', 'id'=>'participant_'.$item->id.'_participant_firstname')) }}
</td>
<td>
{{ Form::text('participant['.$item->id.'][participant_name]', $item->participant_name, array('placeholder'=>__('Nachname'), 'class'=>'form-control', 'id'=>'participant_'.$item->id.'_participant_name')) }}
</td>
<td>
{{ Form::text('participant['.$item->id.'][participant_birthdate]', _format_date($item->participant_birthdate), array('placeholder'=>__('Datum'), 'class'=>'form-control datepicker-base', 'id'=>'participant_'.$item->id.'_participant_birthdate')) }}
</td>
<td>
{{ Form::select('participant['.$item->id.'][nationality_id]', \App\Services\Model::getTravelNationalityArray(false) , $item->nationality_id, array('class'=>'custom-select', 'id'=>'participant_'.$item->id.'_nationality_id')) }}
</td>
<td>
<label class="custom-control custom-checkbox mt-2">
{!! Form::checkbox('participant['.$item->id.'][participant_child]', 1, $item->participant_child, ['class'=>'custom-control-input', 'id'=>'participant_'.$item->id.'_participant_child']) !!}
<span class="custom-control-label"></span>
</label>
</td>
<td>
<a class="btn btn-sm text-danger" href="{{ route('lead_delete', [$item->id, 'participant']) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a>
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
<div class="col-12">
<hr>
<div class="text-left mt-3">
<button type="submit" name="action" value="update_lead_participant" class="btn btn-sm btn-secondary">{{ __('save changes') }}</button>&nbsp;
<a href="{{route('leads')}}" class="btn btn-sm btn-default">{{ __('zur Übersicht') }}</a>
<a href="{{route('lead_action', ['lead_participant_add', $lead->id])}}" class="btn btn-sm btn-primary float-right ml-2"><i class="fa fa-plus-circle"></i> {{ __('Neuen Teilnehmer') }}</a>
</div>
</div>
</div>
</div>
</div>