{% set arrivaladdresses = [{
"label": "",
"value": "",
"disabled": true,
"selected": true,
"class": "sr-only"
}] %}
{% if editmode %}
<div class="editmode-box editmode-box--info mb-5 text-left">
<div class="editmode-box__header">Settings</div>
<div>
{% endif %}
{% for i in pimcore_iterate_block(pimcore_block('arrivale_addresses_block')) %}
{% if editmode %}
<label><strong>Arrivaladdress label</strong></label>
{{ pimcore_input('arrivaladress_label') }}
<label><strong>Arriavaladdress value </strong>(e.g. Am Schlossberg, 8010 Graz): </label>
{{ pimcore_input('arrivaladress_value') }}
{% endif %}
{% set arrivaladdresses = arrivaladdresses|merge([{
"label": pimcore_input('arrivaladress_label').data,
"value": pimcore_input('arrivaladress_value').data,
"class": "",
"selected": i == 1 and pimcore_block('arrivale_addresses_block').count <= 1
}]) %}
{% endfor %}
{% if editmode %}
</div>
</div>
{% endif %}
<section class="slide slide--big bg-dark-bg content-block js-fade-in mt-5"
{{ not pimcore_input('anchorTitle').empty ? ('data-anchor-nav-title="' ~ pimcore_input('anchorTitle').frontend ~ '"') : '' }}
>
{# no container as styleModifier! #}
<div class="container container-sm">
{{ include('Includes/title-block-editable.html.twig', {
isCentered: true,
isWhite: true,
styleModifier: 'js-fade-in',
suffix: 'arrival-slide'
}) }}
<form action="https://www.google.com/maps/dir/" target="_blank">
<input type="hidden" name="api" value="1">
<input type="hidden" name="travelmode" value="car">
<div class="row justify-content-center">
<div class="col-md-4">
{{ include('Form/Includes/form-control.html.twig', {
'id': 'origin',
'name': 'origin',
'label': 'arrival.Startadresse'|trans,
"type": 'text',
"required": true,
"labelModifier": "floating-label",
"inputModifier": "js-floating-label",
"inputWrapperModifier": "form-group__search position-relative"
}) }}
</div>
<div class="col-md-4">
{{ include('Form/Includes/select.html.twig', {
inputModifier: "js-floating-label",
labelModifier: "floating-label",
inputWrapperModifier: "select__input-wrapper position-relative",
name: "destination",
id: "destination",
required: true,
label: 'arrival.Zieladresse auswählen'|trans,
styleModifier: arrivaladdresses|length <= 2 ? 'select--hide-arrow': '',
readonly: arrivaladdresses|length <= 2,
options: arrivaladdresses
}) }}
</div>
<div class="col-md-4">
<button type="submit" class="btn btn-primary-light btn-block">
{{ 'arrival.Route planen'|trans }}
</button>
</div>
</div>
</form>
</div>
</section>