templates/Arrival/Includes/arrival-slide.html.twig line 1

Open in your IDE?
  1. {% set arrivaladdresses = [{
  2.     "label": "",
  3.     "value": "",
  4.     "disabled": true,
  5.     "selected": true,
  6.     "class": "sr-only"
  7. }] %}
  8. {% if editmode %}
  9. <div class="editmode-box editmode-box--info mb-5 text-left">
  10.     <div class="editmode-box__header">Settings</div>
  11.     <div>
  12. {% endif %}
  13. {% for i in pimcore_iterate_block(pimcore_block('arrivale_addresses_block')) %}
  14.     {% if editmode %}
  15.         <label><strong>Arrivaladdress label</strong></label>
  16.         {{ pimcore_input('arrivaladress_label') }}
  17.         <label><strong>Arriavaladdress value </strong>(e.g. Am Schlossberg, 8010 Graz): </label>
  18.         {{ pimcore_input('arrivaladress_value') }}
  19.     {% endif %}
  20.     {%  set arrivaladdresses = arrivaladdresses|merge([{
  21.         "label": pimcore_input('arrivaladress_label').data,
  22.         "value": pimcore_input('arrivaladress_value').data,
  23.         "class": "",
  24.         "selected": i == 1 and pimcore_block('arrivale_addresses_block').count <= 1
  25.     }]) %}
  26. {% endfor %}
  27. {% if editmode %}
  28.     </div>
  29. </div>
  30. {% endif %}
  31. <section class="slide slide--big bg-dark-bg content-block js-fade-in mt-5"
  32.     {{ not pimcore_input('anchorTitle').empty ? ('data-anchor-nav-title="' ~ pimcore_input('anchorTitle').frontend ~ '"') : '' }}
  33.     >
  34.     {# no container as styleModifier!   #}
  35.     <div class="container container-sm">
  36.         {{ include('Includes/title-block-editable.html.twig', {
  37.             isCentered: true,
  38.             isWhite:  true,
  39.             styleModifier: 'js-fade-in',
  40.             suffix: 'arrival-slide'
  41.         }) }}
  42.         <form action="https://www.google.com/maps/dir/" target="_blank">
  43.             <input type="hidden" name="api" value="1">
  44.             <input type="hidden" name="travelmode" value="car">
  45.             <div class="row justify-content-center">
  46.                 <div class="col-md-4">
  47.                     {{ include('Form/Includes/form-control.html.twig', {
  48.                         'id': 'origin',
  49.                         'name': 'origin',
  50.                         'label': 'arrival.Startadresse'|trans,
  51.                         "type": 'text',
  52.                         "required": true,
  53.                         "labelModifier": "floating-label",
  54.                         "inputModifier": "js-floating-label",
  55.                         "inputWrapperModifier": "form-group__search position-relative"
  56.                     }) }}
  57.                 </div>
  58.                 <div class="col-md-4">
  59.                     {{ include('Form/Includes/select.html.twig', {
  60.                         inputModifier: "js-floating-label",
  61.                         labelModifier: "floating-label",
  62.                         inputWrapperModifier: "select__input-wrapper position-relative",
  63.                         name: "destination",
  64.                         id: "destination",
  65.                         required: true,
  66.                         label: 'arrival.Zieladresse auswählen'|trans,
  67.                         styleModifier: arrivaladdresses|length <= 2 ? 'select--hide-arrow': '',
  68.                         readonly: arrivaladdresses|length <= 2,
  69.                         options: arrivaladdresses
  70.                     }) }}
  71.                 </div>
  72.                 <div class="col-md-4">
  73.                     <button type="submit" class="btn btn-primary-light btn-block">
  74.                         {{ 'arrival.Route planen'|trans }}
  75.                     </button>
  76.                 </div>
  77.             </div>
  78.         </form>
  79.     </div>
  80. </section>