custom/plugins/TmmsAdditionalNewsletterRegistrationOptions/src/Resources/views/storefront/base.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/base.html.twig' %}
  2. {% block base_footer %}
  3.     {% block base_footer_newsletter %}
  4.         {% set showNewsletter = 0 %}
  5.         {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterShowNewsletter') %}
  6.             {% set showNewsletter = 1 %}
  7.         {% endif %}
  8.         {% if not(config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterShowNewsletterOnLoginPage')) and (controllerName|lower == "auth") %}
  9.             {% set showNewsletter = 0 %}
  10.         {% endif %}
  11.         {% if not(config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterShowNewsletterOnShoppingCartPage')) and (controllerAction|lower == "cartpage") %}
  12.             {% set showNewsletter = 0 %}
  13.         {% endif %}
  14.         {% if not(config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterShowNewsletterOnAccountPage')) and ((controllerName|lower == "accountprofile") or (controllerName|lower == "address") or (controllerName|lower == "accountpayment") or (controllerName|lower == "accountorder")) %}
  15.             {% set showNewsletter = 0 %}
  16.         {% endif %}
  17.         {% if showNewsletter == 1 %}
  18.             {% set action = 'frontend.form.newsletter.register.handle' %}
  19.             {% block base_footer_newsletter_inner %}
  20.                 <div class="footer-main-newsletter">
  21.                     <div class="container">
  22.                         {% block base_footer_newsletter_inner_content %}
  23.                             <div class="cms-block">
  24.                                 <div class="cms-element-form">
  25.                                     <form action="{{ path(action) }}"
  26.                                           method="post"
  27.                                           data-form-csrf-handler="true"
  28.                                           data-form-validation="true">
  29.                                         <div class="form-content{% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterAlignContentMiddle') %} center{% endif %}{% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterLeftRightSplitting') %} left-right-splitting{% endif %}">
  30.                                             {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterLeftRightSplitting') %}<div class="form-content-left">{% endif %}
  31.                                             <div class="footer-main-newsletter-headline">
  32.                                                 {% if (config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterNewsletterHeadlineContentType')  == "texteditor") %}
  33.                                                     {{ "tmms.additionalnewsletterregistrationoptions.aboveFooter.newsletter.aboveFooterNewsletterHeadlineTextEditor"|trans({"%newsletterheadline%": config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterNewsletterHeadlineContent')})|raw }}
  34.                                                 {% elseif (config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterNewsletterHeadlineContentType')  == "snippet") %}
  35.                                                     {{ "tmms.additionalnewsletterregistrationoptions.aboveFooter.newsletter.aboveFooterNewsletterHeadline"|trans|raw }}
  36.                                                 {% endif %}
  37.                                             </div>
  38.                                             {% block base_footer_newsletter_inner_content_newslettertext_before %}
  39.                                                 {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterPositionNewsletterText') == "beforeEmailAddressField" %}
  40.                                                     {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterShowNewsletterText') %}
  41.                                                         <p>
  42.                                                             {% if (config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterNewsletterTextContentType')  == "texteditor") %}
  43.                                                                 {{ "tmms.additionalnewsletterregistrationoptions.aboveFooter.newsletter.aboveFooterFirstNewsletterTextTextEditor"|trans({"%firstnewslettertext%": config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterNewsletterTextContent')})|raw }}
  44.                                                             {% elseif (config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterNewsletterTextContentType')  == "snippet") %}
  45.                                                                 {{ "tmms.additionalnewsletterregistrationoptions.aboveFooter.newsletter.aboveFooterFirstNewsletterText"|trans|raw }}
  46.                                                             {% endif %}
  47.                                                         </p>
  48.                                                     {% endif %}
  49.                                                 {% endif %}
  50.                                             {% endblock %}
  51.                                             {% block base_footer_newsletter_inner_content_secondnewslettertext_before %}
  52.                                                 {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterPositionSecondNewsletterText') == "beforeEmailAddressField" %}
  53.                                                     {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterShowSecondNewsletterText') %}
  54.                                                         <p>
  55.                                                             {% if (config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterSecondNewsletterTextContentType')  == "texteditor") %}
  56.                                                                 {{ "tmms.additionalnewsletterregistrationoptions.aboveFooter.newsletter.aboveFooterSecondNewsletterTextTextEditor"|trans({"%secondnewslettertext%": config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterSecondNewsletterTextContent')})|raw }}
  57.                                                             {% elseif (config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterSecondNewsletterTextContentType')  == "snippet") %}
  58.                                                                 {{ "tmms.additionalnewsletterregistrationoptions.aboveFooter.newsletter.aboveFooterSecondNewsletterText"|trans|raw }}
  59.                                                             {% endif %}
  60.                                                         </p>
  61.                                                     {% endif %}
  62.                                                 {% endif %}
  63.                                             {% endblock %}
  64.                                             {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterLeftRightSplitting') %}</div><div class="form-content-right">{% endif %}
  65.                                             {% block base_footer_newsletter_inner_content_captcha_before %}
  66.                                                 {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterPositionCaptcha') == "beforeEmailAddressField" %}
  67.                                                     {% sw_include '@Storefront/storefront/component/captcha/base.html.twig' with { additionalClass : 'col-md-4'} %}
  68.                                                 {% endif %}
  69.                                             {% endblock %}
  70.                                             {% block base_footer_newsletter_inner_content_privacy_before %}
  71.                                                 {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterPositionDataProtectionInformation') == "beforeEmailAddressField" %}
  72.                                                     {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterShowDataProtectionInformation') %}
  73.                                                         {% sw_include '@TmmsAdditionalNewsletterRegistrationOptions/storefront/additional-newsletter-registration-options-privacy.html.twig' with {
  74.                                                             identifierTemplate: "form-privacy-opt-in-footer-newsletter-registration",
  75.                                                             showHeadline: config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterShowDataProtectionInformationHeadline'),
  76.                                                             showInput: config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterRequireDataProtectionInformationCheckbox')
  77.                                                         } %}
  78.                                                     {% endif %}
  79.                                                 {% endif %}
  80.                                             {% endblock %}
  81.                                             {% block base_footer_newsletter_inner_content_required_fields_info_before %}
  82.                                                 {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterPositionRequiredFieldsInformation') == "beforeEmailAddressField" %}
  83.                                                     {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterShowRequiredFieldsInformation') %}
  84.                                                         <div class="required-fields-info">
  85.                                                             {% sw_include '@Storefront/storefront/element/cms-element-form/form-components/cms-element-form-info-required.html.twig' %}
  86.                                                         </div>
  87.                                                     {% endif %}
  88.                                                 {% endif %}
  89.                                             {% endblock %}
  90.                                             {% block base_footer_newsletter_inner_content_inputs %}
  91.                                                 <div class="form-row input-group">
  92.                                                     {% block base_footer_newsletter_inner_content_inputs_select_action %}
  93.                                                         <label class="form-label d-none" for="footerNewsletterAction">
  94.                                                             {{ "tmms.additionalnewsletterregistrationoptions.aboveFooter.newsletter.labelActionSelect"|trans }} {{ "general.required"|trans }}
  95.                                                         </label>
  96.                                                         <input name="option"
  97.                                                                type="hidden"
  98.                                                                id="footerNewsletterAction"
  99.                                                                value="{{ constant('Shopware\\Storefront\\Controller\\FormController::SUBSCRIBE') }}"/>
  100.                                                     {% endblock %}
  101.                                                     {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterShowNewsletterButtonNextToField') %}
  102.                                                         <div class="footer-newsletter-together{% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterShowTextNewsletterButton') %} show-text-newsletter-button{% endif %}">
  103.                                                         {% set emailPlaceholder = "tmms.additionalnewsletterregistrationoptions.aboveFooter.newsletter.labelMail" %}
  104.                                                     {% else %}
  105.                                                         <div class="footer-newsletter-below-button">
  106.                                                         {% set emailPlaceholder = "tmms.additionalnewsletterregistrationoptions.aboveFooter.newsletter.placeholderMail" %}
  107.                                                     {% endif %}
  108.                                                     {% block base_footer_newsletter_inner_content_inputs_input_email %}
  109.                                                         {% sw_include '@Storefront/storefront/element/cms-element-form/form-components/cms-element-form-input.html.twig'
  110.                                                             with {
  111.                                                             fieldName: 'email',
  112.                                                             type: 'email',
  113.                                                             required: true,
  114.                                                             additionalClass: 'col-12',
  115.                                                             label: 'tmms.additionalnewsletterregistrationoptions.aboveFooter.newsletter.labelMail',
  116.                                                             placeholder: emailPlaceholder
  117.                                                         }
  118.                                                         %}
  119.                                                     {% endblock %}
  120.                                                     {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterShowNewsletterButtonNextToField') %}
  121.                                                         {% block base_footer_newsletter_inner_content_submit_before %}
  122.                                                             <button class="btn btn-primary btn-newsletter w-auto" type="submit">
  123.                                                                 {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterShowTextNewsletterButton') %}
  124.                                                                     <span class="btn-newsletter-txt">
  125.                                                                         {{ "tmms.additionalnewsletterregistrationoptions.aboveFooter.newsletter.aboveFooterNewsletterSubmit"|trans }}
  126.                                                                     </span>
  127.                                                                 {% endif %}
  128.                                                                 {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterShowIconNewsletterButton') %}
  129.                                                                     {% sw_icon 'envelope' %}
  130.                                                                 {% endif %}
  131.                                                             </button>
  132.                                                         {% endblock %}
  133.                                                         </div>
  134.                                                     {% else %}
  135.                                                         </div>
  136.                                                     {% endif %}
  137.                                                 </div>
  138.                                             {% endblock %}
  139.                                             {% block base_footer_newsletter_inner_content_captcha_after %}
  140.                                                 {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterPositionCaptcha') == "afterEmailAddressField" %}
  141.                                                     {% sw_include '@Storefront/storefront/component/captcha/base.html.twig' with { additionalClass : 'col-md-4'} %}
  142.                                                 {% endif %}
  143.                                             {% endblock %}
  144.                                             {% block base_footer_newsletter_inner_content_privacy_after %}
  145.                                                 {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterPositionDataProtectionInformation') == "afterEmailAddressField" %}
  146.                                                     {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterShowDataProtectionInformation') %}
  147.                                                         {% sw_include '@TmmsAdditionalNewsletterRegistrationOptions/storefront/additional-newsletter-registration-options-privacy.html.twig' with {
  148.                                                             identifierTemplate: "form-privacy-opt-in-footer-newsletter-registration",
  149.                                                             showHeadline: config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterShowDataProtectionInformationHeadline'),
  150.                                                             showInput: config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterRequireDataProtectionInformationCheckbox')
  151.                                                         } %}
  152.                                                     {% endif %}
  153.                                                 {% endif %}
  154.                                             {% endblock %}
  155.                                             {% block base_footer_newsletter_inner_content_required_fields_info_after %}
  156.                                                 {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterPositionRequiredFieldsInformation') == "afterEmailAddressField" %}
  157.                                                     {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterShowRequiredFieldsInformation') %}
  158.                                                         <div class="required-fields-info">
  159.                                                             {% sw_include '@Storefront/storefront/element/cms-element-form/form-components/cms-element-form-info-required.html.twig' %}
  160.                                                         </div>
  161.                                                     {% endif %}
  162.                                                 {% endif %}
  163.                                             {% endblock %}
  164.                                             {% block base_footer_newsletter_inner_content_submit_after %}
  165.                                                 {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterShowNewsletterButtonNextToField') == false %}
  166.                                                     <button class="btn btn-primary btn-newsletter w-auto mb-4" type="submit">
  167.                                                         {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterShowTextNewsletterButton') %}
  168.                                                             <span class="btn-newsletter-txt">
  169.                                                                 {{ "tmms.additionalnewsletterregistrationoptions.aboveFooter.newsletter.aboveFooterNewsletterSubmit"|trans }}
  170.                                                             </span>
  171.                                                         {% endif %}
  172.                                                         {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterShowIconNewsletterButton') %}
  173.                                                             {% sw_icon 'envelope' %}
  174.                                                         {% endif %}
  175.                                                     </button>
  176.                                                 {% endif %}
  177.                                             {% endblock %}
  178.                                             {% block base_footer_newsletter_inner_content_newslettertext_after %}
  179.                                                 {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterPositionNewsletterText') == "afterEmailAddressField" %}
  180.                                                     {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterShowNewsletterText') %}
  181.                                                         <p>
  182.                                                             {% if (config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterNewsletterTextContentType')  == "texteditor") %}
  183.                                                                 {{ "tmms.additionalnewsletterregistrationoptions.aboveFooter.newsletter.aboveFooterFirstNewsletterTextTextEditor"|trans({"%firstnewslettertext%": config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterNewsletterTextContent')})|raw }}
  184.                                                             {% elseif (config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterNewsletterTextContentType')  == "snippet") %}
  185.                                                                 {{ "tmms.additionalnewsletterregistrationoptions.aboveFooter.newsletter.aboveFooterFirstNewsletterText"|trans|raw }}
  186.                                                             {% endif %}
  187.                                                         </p>
  188.                                                     {% endif %}
  189.                                                 {% endif %}
  190.                                             {% endblock %}
  191.                                             {% block base_footer_newsletter_inner_content_secondnewslettertext_after %}
  192.                                                 {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterPositionSecondNewsletterText') == "afterEmailAddressField" %}
  193.                                                     {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterShowSecondNewsletterText') %}
  194.                                                         <p>
  195.                                                             {% if (config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterSecondNewsletterTextContentType')  == "texteditor") %}
  196.                                                                 {{ "tmms.additionalnewsletterregistrationoptions.aboveFooter.newsletter.aboveFooterSecondNewsletterTextTextEditor"|trans({"%secondnewslettertext%": config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterSecondNewsletterTextContent')})|raw }}
  197.                                                             {% elseif (config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterSecondNewsletterTextContentType')  == "snippet") %}
  198.                                                                 {{ "tmms.additionalnewsletterregistrationoptions.aboveFooter.newsletter.aboveFooterSecondNewsletterText"|trans|raw }}
  199.                                                             {% endif %}
  200.                                                         </p>
  201.                                                     {% endif %}
  202.                                                 {% endif %}
  203.                                             {% endblock %}
  204.                                             {% if config('TmmsAdditionalNewsletterRegistrationOptions.config.aboveFooterLeftRightSplitting') %}</div>{% endif %}
  205.                                         </div>
  206.                                         {% block base_footer_newsletter_inner_content_hidden_fields %}
  207.                                             <div class="form-hidden-fields">
  208.                                                 {% block base_footer_newsletter_inner_content_csrf %}
  209.                                                     {{ sw_csrf(action) }}
  210.                                                 {% endblock %}
  211.                                                 <input type="submit" class="submit--hidden d-none"/>
  212.                                             </div>
  213.                                         {% endblock %}
  214.                                     </form>
  215.                                 </div>
  216.                             </div>
  217.                         {% endblock %}
  218.                     </div>
  219.                 </div>
  220.             {% endblock %}
  221.         {% endif %}
  222.     {% endblock %}
  223.     {{ parent() }}
  224. {% endblock %}