custom/plugins/TcinnThemeWareLiving/src/Resources/views/storefront/themeware/widgets/twt-newsletter-include.html.twig line 1

Open in your IDE?
  1. {# ThemeWare "Newsletter" widget #}
  2. {#
  3.     Create "Newsletter" widget and add content
  4.     @Storefront/storefront/themeware/widgets/twt-newsletter-include.html.twig
  5. #}
  6. {# TODO: Blöcke prüfen... #}
  7. {# ---------------- START: SET TEMPLATE VARS ---------------- #}
  8. {# ThemeWare: Set theme variables #}
  9. {% set twtIconNewsletterSubmit = theme_config('twt-icon-newsletter-submit') %}
  10. {% set twtIconset = theme_config('twt-iconset') %}
  11. {# ---------------- END: SET TEMPLATE VARS ---------------- #}
  12. {% block twt_widget_newsletter %}
  13.     <div class="twt-widget-newsletter twt-newsletter">
  14.         {% block twt_widget_newsletter_content %}
  15.             <p class="newsletter-inner-text">
  16.                 {{ "twt.widget.newsletter.content"|trans }}
  17.             </p>
  18.             <div class="cms-block cms-block-form">
  19.                 <div class="cms-element-form">
  20.                     {% block element_form_newsletter_form_form %}
  21.                         <form action="{{ path(action) }}"
  22.                               method="post"
  23.                               data-form-csrf-handler="true"
  24.                               data-form-validation="true">
  25.                             <div class="form-content">
  26.                                 <div class="row mb-2 ml-0 mr-0">
  27.                                     {% block cms_form_newsletter_input_email %}
  28.                                         <div class="twt-footer-column-newsletter-input-email">
  29.                                             {% sw_include '@Storefront/storefront/element/cms-element-form/form-components/cms-element-form-input.html.twig'
  30.                                                 with {
  31.                                                 fieldName: 'email',
  32.                                                 type: 'email',
  33.                                                 required: true,
  34.                                                 label: 'newsletter.labelMail',
  35.                                                 placeholder: 'newsletter.placeholderMail'
  36.                                             }
  37.                                             %}
  38.                                         </div>
  39.                                     {% endblock %}
  40.                                     {# @Storefront/storefront/element/cms-element-form/form-components/cms-element-form-submit.html.twig #}
  41.                                     {% block cms_form_newsletter_submit %}
  42.                                         {% block cms_form_submit %}
  43.                                             <button type="submit" aria-label="Submit" class="btn btn-primary">
  44.                                                 {% if twtIconset != 'default' %}
  45.                                                     {% if twtIconNewsletterSubmit == 'envelope' %}
  46.                                                         {% sw_icon 'envelope' style {'pack':'themeware'} %}
  47.                                                     {% elseif twtIconNewsletterSubmit == 'send' %}
  48.                                                         {% sw_icon 'send' style {'pack':'themeware'} %}
  49.                                                     {% else %}
  50.                                                         {% sw_icon 'arrow-head-right' style {'pack':'themeware'} %}
  51.                                                     {% endif %}
  52.                                                 {% else %}
  53.                                                     {% sw_icon 'arrow-head-right' %}
  54.                                                 {% endif %}
  55.                                             </button>
  56.                                         {% endblock %}
  57.                                     {% endblock %}
  58.                                 </div>
  59.                                 {% block cms_form_newsletter_additional_fields %}{% endblock %}
  60.                                 {% block cms_form_newsletter_captcha %}
  61.                                     {% sw_include '@Storefront/storefront/component/captcha/base.html.twig' with { additionalClass : 'col-md-4' } %}
  62.                                 {% endblock %}
  63.                                 {% block cms_form_newsletter_privacy %}
  64.                                     <div class="twt-footer-column-newsletter-privacy">
  65.                                         {% sw_include '@Storefront/storefront/element/cms-element-form/form-components/cms-element-form-privacy.html.twig'
  66.                                             with { 'requiresTermsOfService': false }
  67.                                         %}
  68.                                     </div>
  69.                                 {% endblock %}
  70.                                 {#% block cms_form_newsletter_required_fields_info %}{% endblock %#}
  71.                             </div>
  72.                             {% block cms_form_newsletter_hidden_fields %}
  73.                                 <div class="form-hidden-fields">
  74.                                     {% block cms_form_newsletter_csrf %}
  75.                                         {{ sw_csrf(action) }}
  76.                                     {% endblock %}
  77.                                     <input type="hidden" name="option" value="{{ constant('Shopware\\Storefront\\Controller\\FormController::SUBSCRIBE') }}">
  78.                                     <input type="submit" class="submit--hidden d-none" />
  79.                                 </div>
  80.                             {% endblock %}
  81.                         </form>
  82.                     {% endblock %}
  83.                 </div>
  84.             </div>
  85.         {% endblock %}
  86.     </div>
  87. {% endblock %}