custom/plugins/DecomTheme/src/Resources/views/storefront/block/cms-block-newsletter-mini-form.html.twig line 1

Open in your IDE?
  1. {% block block_newsletter_mini_form %}
  2.     <div class="container">
  3.         <div class="newsletter-mini-form-container container">
  4.             {% set badgeElement = block.slots.getSlot('newsletter-badge') %}
  5.             {% set contentElement = block.slots.getSlot('newsletter-content') %}
  6.             {% set imageBadgeElement %}
  7.                 {% block badge_element_image_container %}
  8.                     {% if badgeElement.data.media.url %}
  9.                         <div class="cms-image-newsletter-badge">
  10.                             {% block badge_element_image_media %}
  11.                                 {% set attributes = {
  12.                                     'class': 'cms-image',
  13.                                     'alt': (badgeElement.data.media.translated.alt ?: ''),
  14.                                     'title': (badgeElement.data.media.translated.title ?: '')
  15.                                 } %}
  16.                                 {% sw_thumbnails 'cms-image-thumbnails' with {
  17.                                     media: badgeElement.data.media
  18.                                 } %}
  19.                             {% endblock %}
  20.                         </div>
  21.                     {% endif %}
  22.                 {% endblock %}
  23.             {% endset %}
  24.             {{ imageBadgeElement }}
  25.             {% set contentElementText %}
  26.                 {% block badge_element_content_container %}
  27.                     <div class="newsletter-content-area">
  28.                         {{ contentElement.data.content|raw }}
  29.                     </div>
  30.                 {% endblock %}
  31.             {% endset %}
  32.             <div id="newsletter-thanks-dialog">
  33.                 <h3>Thank you</h3>
  34.                 <div class="newsletter-thanks-container"></div>
  35.             </div>
  36.             {{ contentElementText }}
  37.             <div class="cms-newsletter-form">
  38.                 
  39.                 <form action="{{ path('frontend.form.newsletter.register.handle') }}"
  40.                     method="post"
  41.                     class="newsletter-form"
  42.                     data-form-csrf-handler="true"
  43.                     data-form-validation="true"
  44.                     data-form-ajax-submit="true"
  45.                     id="newsletter-subscribe-form">
  46.                     {{ sw_csrf('frontend.form.newsletter.register.handle') }}
  47.                     {% set formViolations = app.request.get('errors') %}
  48.                     <input type="hidden" name="option" value="subscribe"/>
  49.                     <input type="submit" class="submit--hidden d-none">
  50.                     <input name="email"
  51.                         type="email"
  52.                         id="footerNewsletterMail"
  53.                             placeholder="{{ "account.personalMailPlaceholder"|trans }}{{ "general.required"|trans }}"
  54.                             required="required"
  55.                             value="{{ data.get('email') }}"
  56.                             class="email-field {% if formViolations.getViolations('/email') %} is-invalid{% endif %}"/>
  57.                     <button type="submit" class="btn btn-primary">ANMELDEN</button>
  58.                 </form>
  59.                 
  60.             </div>
  61.         </div>
  62.     </div>
  63. {% endblock %}