{# ThemeWare: Footer-Element "Newsletter" container #}
{#
Create footer column and add newsletter content
@Storefront/storefront/themeware/widgets/twt-newsletter.html.twig
#}
{# TODO: Blöcke prüfen... #}
{# TODO: Kommentare prüfen, ergänzen... #}
{# TODO: footer-elements zusammenfassen (sh. twt-sidebar-widgets) #}
{% block twt_layout_footer_newsletter %}
{# ThemeWare: Add column classes #}
{% if newcol == "2" %}
{% set blockClasses = ['col-md-12'] %}
{% elseif newcol == "3" %}
{% set blockClasses = ['col-md-6'] %}
{% else %}
{# ThemeWare: Add column classes for tablet viewports #}
{% if columns == columnsTablet %}
{% set blockClasses = ['col-md-' ~ columns] %}
{% else %}
{% set blockClasses = ['col-xl-' ~ columns, 'col-md-' ~ columnsTablet] %}
{% endif %}
{% endif %}
{# ThemeWare: Add default classes #}
{% set blockClasses = ['footer-column', 'footer-column-newsletter']|merge(blockClasses) %}
{# ThemeWare: Add toggle class #}
{% if toggle != "4" %}
{% set blockClasses = ['js-footer-column']|merge(blockClasses) %}
{% endif %}
{# ThemeWare: Add element class and element number #}
{% set blockClasses = ['twt-element-' ~ elementid, 'twt-element-newsletter']|merge(blockClasses) %}
{# ThemeWare: Permanently expanded #}
{% if toggle == "4" %}
{% set blockClasses = ['permanent']|merge(blockClasses) %}
{% endif %}
{# ThemeWare: Add class "last" to last element #}
{% if last == true %}
{% set blockClasses = ['last']|merge(blockClasses) %}
{% endif %}
{# TODO: add block "container" #}
<div class="{{ blockClasses|reverse|join(' ') }}">
{% block twt_layout_footer_newsletter_headline %}
<div class="footer-column-headline footer-headline js-footer-column-headline js-collapse-footer-column-trigger{% if toggle == "2" %} show{% endif %}"
id="collapseFooterNewsletterTitle"
data-target="#collapseFooterNewsletter"
aria-expanded="true"
aria-controls="collapseFooterNewsletter"
role="listitem">
{{ "twt.widget.newsletter.headline"|trans|sw_sanitize }}
{% block twt_layout_footer_newsletter_icons %}
{% if toggle != "4" %}
<div class="footer-column-toggle">
<span class="footer-plus-icon">
{% sw_icon 'plus' %}
</span>
<span class="footer-minus-icon">
{% sw_icon 'minus' %}
</span>
</div>
{% endif %}
{% endblock %}
</div>
{% endblock %}
{% block twt_layout_footer_newsletter_content %}
<div id="collapseFooterNewsletter"
class="footer-column-content{% if toggle != "4" %} js-footer-column-content collapse{% endif %}{% if toggle == "2" %} show{% endif %}"
aria-labelledby="collapseFooterNewsletterTitle">
<div class="footer-column-content-inner">
<p class="newsletter-inner-text">{{ "twt.widget.newsletter.content"|trans }}</p>
<div class="cms-block cms-block-form">
<div class="cms-element-form">
{% block element_form_newsletter_form_form %}
<form action="{{ path('frontend.form.newsletter.register.handle') }}" method="post" data-form-csrf-handler="true" data-form-validation="true">
<div class="form-content">
<div class="row mb-2 ml-0 mr-0">
{% block cms_form_newsletter_input_email %}
<div class="twt-footer-column-newsletter-input-email">
{% sw_include '@Storefront/storefront/element/cms-element-form/form-components/cms-element-form-input.html.twig' with {
fieldName: 'email',
type: 'email',
required: true,
label: 'newsletter.labelMail',
placeholder: 'newsletter.placeholderMail'
} %}
</div>
{% endblock %}
{% block cms_form_newsletter_submit %}
{% block cms_form_submit %}
<button type="submit" aria-label="Submit" class="btn btn-primary">
{% sw_icon 'arrow-head-right' %}
</button>
{% endblock %}
{% endblock %}
</div>
{# TODO: 6.4.2.0 Check new captcha... #}
{% block cms_form_newsletter_captcha %}
{% sw_include '@Storefront/storefront/component/captcha/base.html.twig' with {
additionalClass : 'col-md-4'
} %}
{% endblock %}
{% block cms_form_newsletter_privacy %}
<div class="twt-footer-column-newsletter-privacy">
{% sw_include '@Storefront/storefront/element/cms-element-form/form-components/cms-element-form-privacy.html.twig' %}
</div>
{% endblock %}
{#% block cms_form_newsletter_required_fields_info %}{% endblock %#}
</div>
{% block cms_form_newsletter_hidden_fields %}
<div class="form-hidden-fields">
{% block cms_form_newsletter_csrf %}
{{ sw_csrf('frontend.form.newsletter.register.handle') }}
{% endblock %}
<input type="hidden" name="option" value="{{ constant('Shopware\\Storefront\\Controller\\FormController::SUBSCRIBE') }}">
<input type="submit" class="submit--hidden d-none" />
</div>
{% endblock %}
</form>
{% endblock %}
</div>
</div>
</div>
</div>
{% endblock %}
</div>
{% endblock %}