vendor/shopware/storefront/Resources/views/storefront/layout/header/actions/currency-widget.html.twig line 1

Open in your IDE?
  1. {% block layout_header_actions_currency_widget %}
  2.     {% if position is empty %}
  3.         {% set position = 'top-bar' %}
  4.     {% endif %}
  5.     {% if page.header.currencies.count > 1 %}
  6.         <div class="top-bar-nav-item top-bar-currency">
  7.             {% block layout_header_actions_currency_widget_form %}
  8.                 <form method="post"
  9.                       action="{{ path('frontend.checkout.configure') }}"
  10.                       class="currency-form"
  11.                       data-form-auto-submit="true">
  12.                     {# @deprecated tag:v6.5.0 - Block layout_header_actions_currency_widget_form_csrf will be removed. #}
  13.                     {% block layout_header_actions_currency_widget_form_csrf %}
  14.                         {{ sw_csrf('frontend.checkout.configure') }}
  15.                     {% endblock %}
  16.                     {% block layout_header_actions_currency_widget_content %}
  17.                         <div class="currencies-menu dropdown">
  18.                             {% block layout_header_actions_currency_widget_dropdown_toggle %}
  19.                                 <button class="btn dropdown-toggle top-bar-nav-btn"
  20.                                         type="button"
  21.                                         id="currenciesDropdown-{{ position }}"
  22.                                         {{ dataBsToggleAttr }}="dropdown"
  23.                                         aria-haspopup="true"
  24.                                         aria-expanded="false">
  25.                                     {% block layout_header_actions_currency_widget_dropdown_toggle_name %}
  26.                                         {{ page.header.activeCurrency.symbol }}
  27.                                         <span class="top-bar-nav-text">{{ page.header.activeCurrency.translated.name }}</span>
  28.                                     {% endblock %}
  29.                                 </button>
  30.                             {% endblock %}
  31.                             {% block layout_header_actions_currency_widget_form_items %}
  32.                                 <div class="top-bar-list dropdown-menu dropdown-menu-right"
  33.                                     aria-labelledby="currenciesDropdown-{{ position }}">
  34.                                     {% for currency in page.header.currencies %}
  35.                                         {% block layout_header_actions_currency_widget_form_items_element %}
  36.                                             <div class="top-bar-list-item dropdown-item{% if currency.id is same as(page.header.activeCurrency.id) %} item-checked{% endif %}"
  37.                                                  title="{{ currency.translated.shortName }}">
  38.                                                 {% block layout_header_actions_currency_widget_form_items_element_label %}
  39.                                                     <label class="top-bar-list-label"
  40.                                                            for="{{ position }}-{{ currency.id }}">
  41.                                                         {% block layout_header_actions_currency_widget_form_items_element_input %}
  42.                                                             <input class="top-bar-list-radio"
  43.                                                                    id="{{ position }}-{{ currency.id }}"
  44.                                                                    value="{{ currency.id }}"
  45.                                                                    name="currencyId"
  46.                                                                    type="radio"
  47.                                                                 {% if currency.id is same as(page.header.activeCurrency.id) %} checked{% endif %}>
  48.                                                             {{ currency.symbol }} {{ currency.translated.shortName }}
  49.                                                         {% endblock %}
  50.                                                     </label>
  51.                                                 {% endblock %}
  52.                                             </div>
  53.                                         {% endblock %}
  54.                                     {% endfor %}
  55.                                 </div>
  56.                             {% endblock %}
  57.                             {% block layout_header_actions_currency_widget_form_redirect %}
  58.                                 <input name="redirectTo"
  59.                                        type="hidden"
  60.                                        value="{{ app.request.get('_route') }}"/>
  61.                                 {% for key, value in app.request.attributes.get('_route_params') %}
  62.                                     <input name="redirectParameters[{{ key }}]"
  63.                                            type="hidden"
  64.                                            value="{{ value }}">
  65.                                 {% endfor %}
  66.                             {% endblock %}
  67.                         </div>
  68.                     {% endblock %}
  69.                 </form>
  70.             {% endblock %}
  71.         </div>
  72.     {% endif %}
  73. {% endblock %}