custom/plugins/TcinnThemeWareClean/src/Resources/views/storefront/themeware/footer-elements/twt-newsletter.html.twig line 1

Open in your IDE?
  1. {# ThemeWare: Footer-Element "Newsletter" container #}
  2. {#
  3.     Create footer column and add newsletter content
  4.     @Storefront/storefront/themeware/widgets/twt-newsletter.html.twig
  5. #}
  6. {# TODO: Blöcke prüfen... #}
  7. {# TODO: Kommentare prüfen, ergänzen... #}
  8. {# TODO: footer-elements zusammenfassen (sh. twt-sidebar-widgets) #}
  9. {% block twt_layout_footer_newsletter %}
  10.     {# ThemeWare: Add column classes #}
  11.     {% if newcol == "2" %}
  12.         {% set blockClasses = ['col-md-12'] %}
  13.     {% elseif newcol == "3" %}
  14.         {% set blockClasses = ['col-md-6'] %}
  15.     {% else %}
  16.         {# ThemeWare: Add column classes for tablet viewports #}
  17.         {% if columns == columnsTablet %}
  18.             {% set blockClasses = ['col-md-' ~ columns] %}
  19.         {% else %}
  20.             {% set blockClasses = ['col-xl-' ~ columns, 'col-md-' ~ columnsTablet] %}
  21.         {% endif %}
  22.     {% endif %}
  23.     {# ThemeWare: Add default classes #}
  24.     {% set blockClasses = ['footer-column', 'footer-column-newsletter']|merge(blockClasses) %}
  25.     {# ThemeWare: Add toggle class #}
  26.     {% if toggle != "4" %}
  27.         {% set blockClasses = ['js-footer-column']|merge(blockClasses) %}
  28.     {% endif %}
  29.     {# ThemeWare: Add element class and element number #}
  30.     {% set blockClasses = ['twt-element-' ~ elementid, 'twt-element-newsletter']|merge(blockClasses) %}
  31.     {# ThemeWare: Permanently expanded #}
  32.     {% if toggle == "4" %}
  33.         {% set blockClasses = ['permanent']|merge(blockClasses) %}
  34.     {% endif %}
  35.     {# ThemeWare: Add class "last" to last element #}
  36.     {% if last == true %}
  37.         {% set blockClasses = ['last']|merge(blockClasses) %}
  38.     {% endif %}
  39.     {# TODO: add block "container" #}
  40.     <div class="{{ blockClasses|reverse|join(' ') }}">
  41.         {% block twt_layout_footer_newsletter_headline %}
  42.             <div class="footer-column-headline footer-headline js-footer-column-headline js-collapse-footer-column-trigger{% if toggle == "2" %} show{% endif %}"
  43.                  id="collapseFooterNewsletterTitle"
  44.                  data-target="#collapseFooterNewsletter"
  45.                  aria-expanded="true"
  46.                  aria-controls="collapseFooterNewsletter"
  47.                  role="listitem">
  48.                 {{ "twt.widget.newsletter.headline"|trans|sw_sanitize }}
  49.                 {% block twt_layout_footer_newsletter_icons %}
  50.                     {% if toggle != "4" %}
  51.                         <div class="footer-column-toggle">
  52.                             <span class="footer-plus-icon">
  53.                                 {% sw_icon 'plus' %}
  54.                             </span>
  55.                             <span class="footer-minus-icon">
  56.                                 {% sw_icon 'minus' %}
  57.                             </span>
  58.                         </div>
  59.                     {% endif %}
  60.                 {% endblock %}
  61.             </div>
  62.         {% endblock %}
  63.         {% block twt_layout_footer_newsletter_content %}
  64.             <div id="collapseFooterNewsletter"
  65.                  class="footer-column-content{% if toggle != "4" %} js-footer-column-content collapse{% endif %}{% if toggle == "2" %} show{% endif %}"
  66.                  aria-labelledby="collapseFooterNewsletterTitle">
  67.                 <div class="footer-column-content-inner">
  68.                     <p class="newsletter-inner-text">{{ "twt.widget.newsletter.content"|trans }}</p>
  69.                     <div class="cms-block cms-block-form">
  70.                         <div class="cms-element-form">
  71.                             {% block element_form_newsletter_form_form %}
  72.                                 <form action="{{ path('frontend.form.newsletter.register.handle') }}" method="post" data-form-csrf-handler="true" data-form-validation="true">
  73.                                     <div class="form-content">
  74.                                         <div class="row mb-2 ml-0 mr-0">
  75.                                             {% block cms_form_newsletter_input_email %}
  76.                                                 <div class="twt-footer-column-newsletter-input-email">
  77.                                                     {% sw_include '@Storefront/storefront/element/cms-element-form/form-components/cms-element-form-input.html.twig' with {
  78.                                                         fieldName: 'email',
  79.                                                         type: 'email',
  80.                                                         required: true,
  81.                                                         label: 'newsletter.labelMail',
  82.                                                         placeholder: 'newsletter.placeholderMail'
  83.                                                     } %}
  84.                                                 </div>
  85.                                             {% endblock %}
  86.                                             {% block cms_form_newsletter_submit %}
  87.                                                 {% block cms_form_submit %}
  88.                                                     <button type="submit" aria-label="Submit" class="btn btn-primary">
  89.                                                         {% sw_icon 'arrow-head-right' %}
  90.                                                     </button>
  91.                                                 {% endblock %}
  92.                                             {% endblock %}
  93.                                         </div>
  94.                                         {# TODO: 6.4.2.0 Check new captcha... #}
  95.                                         {% block cms_form_newsletter_captcha %}
  96.                                             {% sw_include '@Storefront/storefront/component/captcha/base.html.twig' with {
  97.                                                 additionalClass : 'col-md-4'
  98.                                             } %}
  99.                                         {% endblock %}
  100.                                         {% block cms_form_newsletter_privacy %}
  101.                                             <div class="twt-footer-column-newsletter-privacy">
  102.                                                 {% sw_include '@Storefront/storefront/element/cms-element-form/form-components/cms-element-form-privacy.html.twig' %}
  103.                                             </div>
  104.                                         {% endblock %}
  105.                                         {#% block cms_form_newsletter_required_fields_info %}{% endblock %#}
  106.                                     </div>
  107.                                     {% block cms_form_newsletter_hidden_fields %}
  108.                                         <div class="form-hidden-fields">
  109.                                             {% block cms_form_newsletter_csrf %}
  110.                                                 {{ sw_csrf('frontend.form.newsletter.register.handle') }}
  111.                                             {% endblock %}
  112.                                             <input type="hidden" name="option" value="{{ constant('Shopware\\Storefront\\Controller\\FormController::SUBSCRIBE') }}">
  113.                                             <input type="submit" class="submit--hidden d-none" />
  114.                                         </div>
  115.                                     {% endblock %}
  116.                                 </form>
  117.                             {% endblock %}
  118.                         </div>
  119.                     </div>
  120.                 </div>
  121.             </div>
  122.         {% endblock %}
  123.     </div>
  124. {% endblock %}