templates/pages/search_form.html.twig line 1

Open in your IDE?
  1. <!-- Booking from START -->
  2. <form class="bg-mode shadow rounded-3 position-relative p-4 pe-md-5 pb-5 pb-md-4 mb-4" action="{{ path('home_search') }}" method="get">
  3.     <div class="row g-4 align-items-center">
  4.         <!-- Location -->
  5.         <div class="col-lg-3">
  6.             <div class="form-control-border form-control-transparent form-fs-md d-flex">
  7.                 <!-- Icon -->
  8.                 <i class="bi bi-geo-alt fs-5 me-2 mt-4"></i>
  9.                 <!-- Select input -->
  10.                 <div class="flex-grow-1">
  11.                     <label class="form-label">{% trans %}Location{% endtrans %}</label>
  12.                     <select id="search-location" class="form-select" data-search-enabled="true" data-url="{{ path('region_list_ajax') }}" data-lang="{{ currentLocale.key }}" name="search[location]">
  13.                         {% if region is defined and region is not empty %}
  14.                         <option value="{% if params.search is defined %}{{ region.id }} {% else %}{% trans %}2395{% endtrans %}{% endif %}">{% if params.search is defined %}{{ region.name }} {% else %}{% trans %}Moscow{% endtrans %}{% endif %}</option>
  15.                         {% endif %}
  16.                         {% if region is defined and region is not empty %}
  17.                             <option value="2395">{% if currentLocale.key == 'ru' %}Москва{% else %}Moskow{% endif %}</option>
  18.                             <option value="{{ region.id }}">{{ region.name }}</option>
  19.                             {% else %}
  20.                             <option value="2395">{% if currentLocale.key == 'ru' %}Москва{% else %}Moskow{% endif %}</option>
  21.                         {% endif %}
  22.                     </select>
  23.                 </div>
  24.             </div>
  25.         </div>
  26.         <!-- Check in -->
  27.         <div class="col-lg-3">
  28.             <div class="d-flex">
  29.                 <!-- Icon -->
  30.                 <i class="bi bi-calendar2-check fs-5 me-2 mt-4"></i>
  31.                 <!-- Date input -->
  32.                 <div class="form-control-border form-control-transparent form-fs-md">
  33.                     <label class="form-label">{% trans %}Check in - out{% endtrans %}</label>
  34.                     <input type="text" class="form-control flatpickr" data-mode="range" data-locale="{{ currentLocale.key }}" placeholder="Select date" value="19 Sep to 28 Sep">
  35.                     <input type="hidden" id="search-checkin" name="search[checkin]" {% if params.search is defined %} value="{{ params.search.checkin }}" {% endif %}>
  36.                     <input type="hidden" id="search-checkout" name="search[checkout]" {% if params.search is defined %} value="{{ params.search.checkout }}" {% endif %}>
  37.                 </div>
  38.             </div>
  39.         </div>
  40.         <!-- Guest -->
  41.         <div class="col-lg-3">
  42.             <div class="form-control-border form-control-transparent form-fs-md d-flex">
  43.                 <!-- Icon -->
  44.                 <i class="bi bi-people fs-5 me-2 mt-4"></i>
  45.                 <!-- Dropdown input -->
  46.                 <div class="w-100">
  47.                     <label class="form-label">{% trans %}Guests & rooms{% endtrans %}</label>
  48.                     <div class="dropdown guest-selector me-2">
  49.                             <input type="text" class="form-guest-selector form-control selection-result" value="1 Guests 1 Room" id="dropdownGuest" data-bs-auto-close="outside" data-bs-toggle="dropdown">
  50.                             <!-- dropdown items -->
  51.                             <ul class="dropdown-menu guest-selector-dropdown" aria-labelledby="dropdownGuest">
  52.                                 <!-- Adult -->
  53.                                 <div class="rooms-body"></div>
  54.                                 <li class="dropdown-divider"></li>
  55.                                 <div class="rooms-footer">
  56.                                     <li class="d-flex justify-content-between">
  57.                                         <input type="button" class="btn btn-primary" id="add-room" value="{{ 'addroom'|trans }}">
  58.                                         <input type="button" class="btn btn-primary" id="ready-room" value="{{ 'ready'|trans }}">
  59.                                     </li>
  60.                                 </div>
  61.                             </ul>
  62.                         {% if params is defined and params.search is defined and params.search.guests is defined %}
  63.                             <input type="hidden" data-guests="{{ params.search.guests|json_encode }}" id="guests-data">
  64.                         {% endif %}
  65.                     </div>
  66.                     <input type="hidden" id="rooms-translation"
  67.                            data-adults="{{ 'Adults'|trans }}"
  68.                            data-adults-title="{{ 'adults'|trans }}"
  69.                            data-adult="{{ 'Adult'|trans }}"
  70.                            data-ageAbove="{{ 'ageAbove'|trans }}"
  71.                            data-child="{{ 'Child'|trans }}"
  72.                            data-child-en="{{ 'Children'|trans }}"
  73.                            data-children="{{ 'Children'|trans }}"
  74.                            data-children-title="{{ 'children'|trans }}"
  75.                            data-agebelow="{{ 'ageBelow'|trans }}"
  76.                            data-addChildButton="{{ 'addChildButton'|trans }}"
  77.                            data-year="{{ 'year'|trans }}"
  78.                            data-years="{{ 'years'|trans }}"
  79.                            data-years1="{{ 'years1'|trans }}"
  80.                            data-addroom="{{ 'addroom'|trans }}"
  81.                            data-guests="{{ 'guests'|trans }}"
  82.                            data-guest="{{ 'guest'|trans }}"
  83.                            data-rooms="{{ 'Rooms'|trans }}"
  84.                            data-more-room="{{ 'MoreRoom'|trans }}"
  85.                            data-room="{{ 'Room'|trans }}"
  86.                            data-lang="{{ currentLocale.key }}"
  87.                     >
  88.                 </div>
  89.             </div>
  90.         </div>
  91.         <div class="col-lg-3">
  92.             <!-- Icon -->
  93. {#            {{ dump(params.search) }}#}
  94.             <div class="form-control-border form-control-transparent form-fs-md d-flex">
  95.                 <i class="bi bi bi-globe fs-5 me-2 mt-4"></i>
  96.                 <div class="flex-grow-1">
  97.                     <label class="form-label">{% trans %}nationality{% endtrans %}</label>
  98.                     <select id="search-residency" class="form-select"  data-search-enabled="true" data-url="{{ path('home_search_countries_ajax', {'_locale': currentLocale.key}) }}" name="search[residency]">
  99.                         <option value="{% if params.search is defined and params.search.residency is defined %}{{ params.search.residency }}{% else %}{{ country.cca2 }}{% endif %}">{{ country[currentLocale.key] }}</option>
  100.                     </select>
  101.                 </div>
  102.             </div>
  103.         </div>
  104.     </div>
  105.     <!-- Button -->
  106.     <div class="btn-position-md-middle" style="left: 99%">
  107.         <button id="search-button" class="icon-lg btn btn-round btn-primary mb-0" name="search[button]"><i class="bi bi-search fa-fw"></i></button>
  108.     </div>
  109.     <input type="hidden" name="search[currency]" value='RUB' id="search-currency">
  110.     <input type="hidden" name="search[language]" value='{{ currentLocale.key }}' id="search-language">
  111.     <div id="search-form-filters">
  112.     </div>
  113. </form>