themes/BootstrapTheme/templates/bundles/SyliusShopBundle/_popupGeolocalisation.html.twig line 1

Open in your IDE?
  1. {% set geolocBlockAvailableCountry = app_get_blocks('popup_geoloc', sylius.channel.code) %}
  2. {% set geolocBlockNotAvailableCountry = app_get_blocks('popup_geoloc_not_available_country', sylius.channel.code) %}
  3. {% set geolocBlock = geolocBlockNotAvailableCountry %}
  4. {% for country in countries %}
  5.     {% if countryCode == country.code %}
  6.         {% set geolocBlock = geolocBlockAvailableCountry %}
  7.     {% endif %}
  8. {% endfor %}
  9. {% set france = null %}
  10. {% set others = [] %}
  11. {% for country in countries %}
  12.     {% if country.code == 'FR' %}
  13.         {% set france = country %}
  14.     {% else %}
  15.         {% set others = others|merge([country]) %}
  16.     {% endif %}
  17. {% endfor %}
  18. <div class="modal fade modal-geolocalisation" data-modal-popup-code="modal-geolocalisation" tabindex="-1" role="dialog" aria-labelledby="modal-geolocalisation" aria-hidden="true" data-backdrop="static" data-keyboard="false">
  19.     <div class="modal-dialog" role="document">
  20.         <div class="modal-content">
  21.             <div class="modal-header">
  22.                 <p class="modal-title title-medium">{{ geolocBlock.name }} <span class="text-danger">{{ countryName }}</span></p>
  23.             </div>
  24.             {% set countryAvailable = false %}
  25.             <div class="modal-body font-18">
  26.                     {{ geolocBlock.content|raw }}
  27.                 <select id="country" name="country">
  28.                     {% if france %}
  29.                         <option value="{{ france.code }}" {% if france.code == countryCode %}selected{% endif %}>
  30.                             {{ france.name }}
  31.                         </option>
  32.                     {% endif %}
  33.                     {% for country in others|sort_by('name') %}
  34.                         <option value="{{ country.code }}" {% if country.code == countryCode %}selected{% endif %}>
  35.                             {{ country.name }}
  36.                         </option>
  37.                     {% endfor %}
  38.                 </select>
  39.             </div>
  40.             <div class="modal-footer">
  41.                 <button type="button" id="validate-country" data-url="{{ path('app_shop_change_cart_country') }}" class="btn btn-secondary font-18">{{ 'app.ui.valid'|trans }}</button>
  42.             </div>
  43.         </div>
  44.     </div>
  45. </div>