src/Elements/Bundle/DemiFrontendBundle/Resources/views/Includes/overlays/date-range.html.twig line 1

Open in your IDE?
  1. <script type="text/javascript" data-cookieconsent="ignore">
  2.     _config.rangeDatepicker = true;
  3.     _config.dateRangeOverlay = true;
  4. </script>
  5. {% if housePackageContainer is defined and tvbPackage is not defined %}
  6.     {% set tvbPackage = housePackageContainer %}
  7. {% endif %}
  8. {% set isTVB = tvbPackage is defined ? true : false %}
  9. <div id="date-overlay" class="overlay js-overlay js-date-range-overlay"
  10.     tabindex="-1"
  11.      role="dialog"
  12.      aria-label="{{ 'demi.search.choose-nights'|trans }}"
  13.     aria-hidden="true">
  14.     <form action="" class="js-booking-form">
  15.         {{ include('@ElementsDemiFrontend/Includes/overlays/sections/header.html.twig') }}
  16.         <div class="overlay__content">
  17.             <div class="ribbon mb-4 row row--gutter-width-1 bg-white">
  18.                 <div class="col">
  19.                     <div class="ribbon__item ribbon__item--date js-range-datepicker__from_container success">
  20.                         <div>
  21.                             {{ "demi.search.arrival"|trans }}
  22.                         </div>
  23.                         <div class="ribbon__title js-date-range-overlay__from-date-text">
  24.                             {% set anreise = carbon().create() %}
  25.                             {{ elements_dateFormat(anreise, 'date-long') }}
  26.                         </div>
  27.                         <div class="js-date-range-overlay__from-day-text">
  28.                             {{ anreise|date('%a') }}
  29.                         </div>
  30.                     </div>
  31.                 </div>
  32.                 {% if not isTVB %}
  33.                 <div class="col col-auto d-flex">
  34.                     <div class="ribbon__item ribbon__item--nights ribbon__item--has-flag text-center js-date-range-overlay__nights-container">
  35.                         <div class="ribbon__title js-date-range-overlay__nights-count">
  36.                             1
  37.                         </div>
  38.                         <div class="js-date-range-overlay__nights-text">
  39.                             {{ "demi.night"|trans }}
  40.                         </div>
  41.                     </div>
  42.                 </div>
  43.                 <div class="col">
  44.                     <div class="ribbon__item ribbon__item--date text-right js-date-range-overlay__to-container">
  45.                         <div>
  46.                             {{ "demi.search.departure"|trans }}
  47.                         </div>
  48.                         <div class="ribbon__title js-date-range-overlay__to-date-text">
  49.                             {% set abreise = carbon().create().addDay(7) %}
  50.                             {{ elements_dateFormat(abreise, 'date-long') }}
  51.                         </div>
  52.                         <div class="js-date-range-overlay__to-day-text">
  53.                             {{ abreise|date('%a') }}
  54.                         </div>
  55.                     </div>
  56.                 </div>
  57.                 {% endif %}
  58.             </div>
  59.             <div class="container">
  60.                 {% if isTVB %}
  61.                     <script type="text/javascript" data-cookieconsent="ignore">
  62.                         _config.datepicker = true;
  63.                     </script>
  64.                     {% set nextArivalDay = demi_getNextPossibleArrivalDay(tvbPackage) %}
  65.                     <div class="js-datepicker">
  66.                         <div class="js-datepicker__input js-date-range-overlay__datepicker" data-available-ranges="jep" data-datepicker-min-date="{{ nextArivalDay ? elements_customDateFormat(nextArivalDay) : '' }}">
  67.                             <input type="hidden" class="js-datepicker__alt-field" name="from" value="{{ elements_customDateFormat(anreise) }}">
  68.                         </div>
  69.                     </div>
  70.                 {% else %}
  71.                     <div class="js-range-datepicker js-date-range-overlay__datepicker datepicker--range">
  72.                         <input type="hidden" class="js-range-datepicker__from" name="from" value="">
  73.                         <input type="hidden" class="js-range-datepicker__to" name="to" value="">
  74.                         <div class="js-range-datepicker__picker"></div>
  75.                     </div>
  76.                 {% endif %}
  77.                 <div class="js-date-range-overlay__range-messages mt-4"></div>
  78.                 <div class="mt-4">
  79.                     <div class="js-date-range-overlay__arrival-msg text-center">
  80.                         <span class="demi-icon icon-in-text demi-icon-info-circle text-muted"></span>
  81.                         {{ "demi.search.select-arrival" | trans }}
  82.                     </div>
  83.                     <div class="js-date-range-overlay__departure-msg text-center" hidden>
  84.                         <span class="demi-icon icon-in-text demi-icon-info-circle text-muted"></span>
  85.                         {{ "demi.search.select-departure" | trans }}
  86.                     </div>
  87.                     <div class="js-date-range-overlay__submit text-right" hidden>
  88.                         <button type="button" class="btn btn-primary js-overlay__commit">
  89.                             {{ "demi.ok" | trans }}
  90.                         </button>
  91.                     </div>
  92.                 </div>
  93.             </div>
  94.         </div>
  95.     </form>
  96. </div>