Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="site-header__icon site-header__currency" data-section-type="footer-section">
- {%- form 'localization', class: 'site-header__currency-form', data-disclosure-form: '' -%}
- <div class="selectors-form__item">
- <h2 class="visually-hidden" id="country-heading">
- {{ 'general.country.dropdown_label' | t }}
- </h2>
- {%- assign current_currency_symbol = localization.country.currency.symbol -%}
- {%- assign current_currency_iso_code = localization.country.currency.iso_code -%}
- <div class="disclosure" data-disclosure-country>
- <button type="button" class="disclosure__toggle" aria-expanded="false" aria-controls="country-list" aria-describedby="country-heading" data-disclosure-toggle>
- {%- if current_currency_symbol -%}
- {{ localization.country.name }} ({{ current_currency_iso_code }} {{ current_currency_symbol }})
- {%- else -%}
- {{ localization.country.name }} ({{ current_currency_iso_code }})
- {%- endif -%}
- </button>
- <ul id="country-list" class="disclosure-list" data-disclosure-list>
- {% for country in form.available_countries %}
- {%- assign currency_symbol = country.currency.symbol -%}
- {%- assign currency_iso_code = country.currency.iso_code -%}
- <li class="disclosure-list__item {% if country.iso_code == localization.country.iso_code %}disclosure-list__item--current{% endif %}">
- <a class="disclosure-list__option" href="#" {% if country.iso_code == localization.country.iso_code %}aria-current="true"{% endif %} data-value="{{ country.iso_code }}" data-disclosure-option>
- {%- if currency_symbol -%}
- {{ country.name }} ({{ currency_iso_code }} {{ currency_symbol }})
- {%- else -%}
- {{ country.name }} ({{ currency_iso_code }})
- {%- endif -%}
- </a>
- </li>
- {%- endfor -%}
- </ul>
- <input type="hidden" name="country_code" id="CountrySelector" value="{{ localization.country.iso_code }}" data-disclosure-input/>
- </div>
- </div>
- {%- endform -%}
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement