sterntours/trunk/app/Resources/views/default/pages/booking.html.twig
valentin.wacker 652eeb16cb #1339
#1342
#1343
#1345
#1346
#1349

git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3340 f459cee4-fb09-11de-96c3-f9c5f16c3c76
2017-07-20 09:59:11 +00:00

398 lines
No EOL
22 KiB
Twig

{% extends 'base.html.twig' %}
{% form_theme form 'default/form/theme.html.twig' %}
{% block meta_robots %}
<meta name="robots" content="noindex,nofollow" />
{% if app.debug %}<!-- meta-robots wurde durch das Twig-Seitentemplate festgelegt -->{% endif %}
{% endblock %}
{% block canonical_tag %}{% if app.debug %}<!-- Die canonical URL wird für diese Seite bewusst nicht definiert, da sie vom Suchindex ausgeschlossen wurde (Siehe meta robots) -->{% endif %}{% endblock %}
{% block stylesheets %}
{{ parent() }}
{% stylesheets 'bundles/app/css/booking.css' filter='cssrewrite' %}
<link rel="stylesheet" href="{{ asset_url }}"/>
{% endstylesheets %}
{% endblock %}
{% block javascripts %}
{{ parent() }}
{% javascripts '@AppBundle/Resources/public/js/booking.js' %}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
{% endblock %}
{% block body %}
<section class="clearfix">
<div class="content-copy">
<h1>Buchungsformular</h1>
<div class="pull-right">
<a href="{{ page.urlPath }}" class="btn btn-primary btn-sm"><< zurück zu Termine und Preise</a>
</div>
<div class="clearfix"></div>
<h2 style="margin-top:10px">{{ travel_program.title }}</h2>
<div id="booking_form" class="booking_form">
<form class="st-booking-form" method="post">
{{ form_errors(form) }}
<div id="message"></div>
<div class="form-box">
<div class="table-responsive" id="no-more-tables_first">
<table class="table first-table">
<tbody>
<tr>
<td>Reiseprogramm</td>
<td>
{{ travel_program.title }}
{#<br class="visible-xs"><a href="#" data-toggle="modal" data-target="#myModal">(Reisebeschreibung aufrufen)</a>#}
</td>
</tr>
<tr>
<td>Kategorie</td>
<td>Standard {# #TODO #}</td>
</tr>
<tr>
<td>Reisezeitraum</td>
<td>{{ travel_date.start|date }} - {{ travel_date.end|date }} ({{ travel_date.name }})</td>
</tr>
<tr>
<td>{{ form_label(form.departure, 'Abflugort') }}</td>
<td>
{{ form_widget(form.departure) }}
{{ form_errors(form.departure) }}
</td>
</tr>
<tr>
<td>{{ form_label(form.singleRoomCount, 'Einzelzimmer') }}</td>
<td>
{{ form_widget(form.singleRoomCount) }}
{{ form_errors(form.singleRoomCount) }}
</td>
</tr>
<tr>
<td>{{ form_label(form.doubleRoomCount, 'Doppelzimmer') }}</td>
<td>
{{ form_widget(form.doubleRoomCount) }}
{{ form_errors(form.doubleRoomCount) }}
</td>
</tr>
<tr>
<td>{{ form_label(form.tripleRoomCount, 'Dreibettzimmer') }}</td>
<td>
{{ form_widget(form.tripleRoomCount) }}
{{ form_errors(form.tripleRoomCount) }}
</td>
</tr>
<tr>
<td>Reiseversicherung</td>
<td>
<div class="radio">
<input id="st-no-insurance-opt" type="radio" value=""
name="{{ form.insurance.vars.full_name }}"
{% if form.insurance.vars.value == '' %}checked{% endif %}
>
<label for="st-no-insurance-opt">keine Reiseversicherung</label>
</div>
{% for insuranceForm in form.insurance %}
{% include 'default/components/booking/insurance.html.twig' with {
'form': insuranceForm,
'insurance': form.insurance.vars.choices[insuranceForm.vars.value].data
} %}
{% endfor %}
{{ form_errors(form.insurance) }}
</td>
</tr>
<tr>
<td>Zubuchbare Leistungen</td>
<td>
{% if form.comfort is defined %}
<div class="checkbox">
{{ form_widget(form.comfort) }}
<label for="{{ form.comfort.vars.id }}">
Komfort-Kategorie (4 Sterne)
(<a href="#" data-toggle="modal" data-target="#st-comfort-booking-option-modal">Details</a>)
</label>
{% embed "default/components/embed/modal.html.twig" with {
'title': 'Komfort-Kategorie (4 Sterne)',
'id': 'comfort-booking-option'
} %}
{% block body %}
<h4>Aufpreise für Kategorie</h4>
<ul>
{% for price in travel_date.prices %}
{# @var price \AppBundle\Entity\TravelPeriodPrice #}
<li>
p.P. {{ price.effectiveComfortPrice|number_format(2) }}
{{ price_type_by_id[price.priceType.id].name }}
</li>
{% endfor %}
</ul>
{% endblock %}
{% endembed %}
</div>
{% endif %}
{% if form.travelOptions is defined %}
{% for travelOptionForm in form.travelOptions %}
{% include 'default/components/booking/travelOption.html.twig' with {
'travelOptionForm': travelOptionForm,
'travelOption': form.travelOptions.vars.choices[travelOptionForm.vars.value].data
} %}
{% endfor %}
{% endif %}
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-xs-12">
<div class="panel">
<div class="panel-body">
<h3>Ihr gewähltes Angebot</h3>
<div class="st-booking-summary">
{% include 'default/components/booking/summary.html.twig' with {
'summary': summary,
'total_price': total_price
} %}
</div>
</div>
</div>
</div>
</div>
<div class="form-box">
<div class="">
<div class="col-md-12 col-sm-12 col-xs-12">
<h5>Reiseleistungen</h5>
</div>
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="accordion-toggle-2">
<div class="panel-group" id="accordion">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapse1" aria-expanded="true">
<h3><span>Reiseleistungen einblenden</span><i class="indicator pull-right icon-plus"></i></h3>
</a>
<div id="collapse1" class="panel-collapse collapse" aria-expanded="true" style="">
<div class="panel-body">
<h3>Eingeschlossene Leistungen</h3>
<ul class="c1">
{% for travel_program_service in travel_program.included|replace({'*': '<img src="/bundles/app/images/star-mini.png" >'})|split('\n') %}
<li>{{ travel_program_service|raw }}</li>
{% endfor %}
</ul>
<h3>Nicht eingeschlossene / zubuchbare Leistungen</h3>
<ul class="c1">
{% for travel_program_service in travel_program.excluded|split('\n') %}
<li>{{ travel_program_service|raw }}</li>
{% endfor %}
</ul>
<h3>Hinweise</h3>
<ul class="c1">
{% for travel_program_service in travel_program.advices|split('\n') %}
<li>{{ travel_program_service|raw }}</li>
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
</div><!-- accordion -->
</div>
</div>
<div class="form-box">
<div class="">
<div class="col-md-12 col-sm-12 col-xs-12">
<h5>Reiseanmelder</h5>
</div>
<div class="form-group col-md-12 col-sm-12 col-xs-12">
{{ form_field_pho(form.salutation, 'Anrede', {'label_attr': {class: 'sr-only'}}) }}
</div>
<div class="col-md-6 col-sm-6 col-xs-12">
{#<input type="text" name="firstname" id="firstname" class="form-control" placeholder="Vorname *">#}
{{ form_field_pho(form.firstName, 'Vorname') }}
</div>
<div class="col-md-6 col-sm-6 col-xs-12">
{{ form_field_pho(form.lastName, 'Nachname') }}
</div>
<div class="col-md-12 col-sm-12 col-xs-12">
{{ form_field_pho(form.streetAddress, 'Straße, Hausnummer') }}
</div>
<div class="col-md-6 col-sm-6 col-xs-12">
{{ form_field_pho(form.zipCode, 'PLZ') }}
</div>
<div class="col-md-6 col-sm-6 col-xs-12">
{{ form_field_pho(form.city, 'Ort') }}
</div>
<div class="form-group col-md-12 col-sm-12 col-xs-12">
{{ form_field_pho(form.nation, 'Land') }}
</div>
<div class="col-md-6 col-sm-6 col-xs-12">
{{ form_field_pho(form.phone, 'Telefon tagsüber') }}
</div>
<div class="col-md-6 col-sm-6 col-xs-12">
{{ form_field_pho(form.fax, 'Fax (optional)') }}
</div>
<div class="col-md-12 col-sm-12 col-xs-12">
{{ form_field_pho(form.email, 'E-Mail-Adresse') }}
</div>
</div>
</div><!-- end form-box -->
<div class="form-box">
<div class="">
<div class="col-md-12 col-sm-12 col-xs-12">
<h5>Reiseteilnehmer</h5>
<p>Bitte geben Sie Ihre Vornamen und Nachnamen in die beiden Felder "Vornamen" und "Nachnamen" ein, wie diese im maschinenlesbaren Teil in Ihrem Reisepass eingetragen sind.</p>
</div>
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="table-responsive" id="no-more-tables">
<table class="table">
<thead>
<tr>
<th>Raum-Nr.</th>
<th>Geschlecht</th>
<th>Vorname</th>
<th>Nachname</th>
<th>Geburtsdatum (TT.MM.JJJJ)</th>
</tr>
</thead>
<tbody class="st-travelers">
{% set currentIndex = 0 %}
{% for room in form.rooms %}
{% for traveler in room.travelers %}
{#{{ dump(room.vars.value.roomType) }}#}
{% set currentIndex = currentIndex + 1 %}
<tr class="st-traveler st-traveler-{{ currentIndex }}"
data-st-traveler-index="{{ currentIndex }}"
data-room-index="{{ loop.parent.loop.index }}"
data-room-type="{{ room.vars.value.type }}"
style="display: none;"
>
<td>
<button class="btn btn-primary btn-sm border-radius st-traveller-index"
type="button"
>
{{ loop.parent.loop.index ?? '' }} <!-- TODO -->
</button>
</td>
<td>
{{ form_field_pho(traveler.sex, 'Geschlecht', {
required: false
}) }}
</td>
<td>
{{ form_field_pho(traveler.firstName, 'Vorname') }}
</td>
<td>
{{ form_field_pho(traveler.lastName, 'Nachname') }}
</td>
<td>
{{ form_field_pho(traveler.birthDate, 'Geburtsdatum') }}
</td>
</tr>
{% endfor %}
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div><!-- end form-box -->
<div class="form-box">
<div class="">
<div class="col-md-12 col-sm-12 col-xs-12">
<h5>Mitteilungen / Sonstiges (optional)</h5>
</div>
<div class="col-md-12 col-sm-12 col-xs-12">
{{ form_field(form.notes, 'Mitteilungen / Sonstiges (optional)', {
'label_attr': {'class': 'sr-only'},
'attr': {'rows': '6'}
}) }}
</div>
</div>
</div><!-- end form-box -->
<div class="form-box">
<div class="">
<div class="col-md-12 col-sm-12 col-xs-12">
<h5>Zahlung</h5>
<p>Die gewünschte Zahlungsart (Rechnung, Überweisung, Sofortüberweisung, Kreditkarten,
Barzahlung) stimmen wir mit Ihnen im Anschluss an Ihre Buchung ab.
</p>
</div>
</div>
</div><!-- end form-box -->
<div class="form-box">
<div class="">
<div class="col-md-12 col-sm-12 col-xs-12">
<h5>Allgemeine Geschäftsbedingungen</h5>
<div class="checkbox">
{{ form_widget(form.acceptTerms) }}
<label for="{{ form.acceptTerms.vars.id }}">
Ich habe alle Daten und Angaben auf Richtigkeit überprüft. Ich habe die
<a href="/uploads/{{ travel_program.organizer.fileName }}" target="_blank">
Allgemeinen Geschäftsbedingungen des Reiseveranstalters
</a> {{ travel_program.organizer.name }}
{% if travel_program.isMediated %}
sowie die
<a href="/uploads/{{ mediator_terms_filename }}" target="_blank">
Allgemeinen Geschäftsbedingungen des Reisevermittlers
</a>
{% endif %}
gelesen und akzeptiert. Zugleich erkenne ich diese für alle Reiseteilnehmer an.
</label>
{{ form_errors(form.acceptTerms) }}
</div>
</div>
<div class="col-md-12 col-sm-12 col-xs-12">
<button type="submit" value="SEND" id="submit"
class="aligncenter btn btn-primary btn-lg border-radius"
>
kostenpflichtig<br class="visible-xs"> buchen
</button>
</div>
</div>
</div><!-- end form-box -->
{{ form_rest(form) }}
</form>
</div><!-- end contact-form -->
</div>
</section>
{% endblock body %}