{% set geolocBlockAvailableCountry = app_get_blocks('popup_geoloc', sylius.channel.code) %}
{% set geolocBlockNotAvailableCountry = app_get_blocks('popup_geoloc_not_available_country', sylius.channel.code) %}
{% set geolocBlock = geolocBlockNotAvailableCountry %}
{% for country in countries %}
{% if countryCode == country.code %}
{% set geolocBlock = geolocBlockAvailableCountry %}
{% endif %}
{% endfor %}
{% set france = null %}
{% set others = [] %}
{% for country in countries %}
{% if country.code == 'FR' %}
{% set france = country %}
{% else %}
{% set others = others|merge([country]) %}
{% endif %}
{% endfor %}
<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">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<p class="modal-title title-medium">{{ geolocBlock.name }} <span class="text-danger">{{ countryName }}</span></p>
</div>
{% set countryAvailable = false %}
<div class="modal-body font-18">
{{ geolocBlock.content|raw }}
<select id="country" name="country">
{% if france %}
<option value="{{ france.code }}" {% if france.code == countryCode %}selected{% endif %}>
{{ france.name }}
</option>
{% endif %}
{% for country in others|sort_by('name') %}
<option value="{{ country.code }}" {% if country.code == countryCode %}selected{% endif %}>
{{ country.name }}
</option>
{% endfor %}
</select>
</div>
<div class="modal-footer">
<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>
</div>
</div>
</div>
</div>