vendor/shopware/storefront/Resources/views/storefront/element/cms-element-form.html.twig line 1

Open in your IDE?
  1. {% block element_form %}
  2.     {%  set config = element.fieldConfig.elements %}
  3.     <div class="cms-element-{{ element.type }}">
  4.         <div class="row justify-content-center">
  5.             <div class="col-lg-12">
  6.                 {% set formViolations = app.request.get('errors') %}
  7.                 <div class="card">
  8.                     <div class="card-body">
  9.                         {% block element_form_wrapper %}
  10.                             {% if element.config.type.value is same as('contact') %}
  11.                                 {% block element_form_contact_form_title %}
  12.                                     <div class="card-title mb-4">
  13.                                         {% if element.config.title.value %}
  14.                                             {{ element.config.title.value }}
  15.                                         {%  else %}
  16.                                             {{ "contact.headline"|trans }}
  17.                                         {% endif %}
  18.                                     </div>
  19.                                 {% endblock %}
  20.                                 {% block element_form_contact_form_form %}
  21.                                     {% sw_include '@Storefront/storefront/element/cms-element-form/form-types/contact-form.html.twig'
  22.                                         with {
  23.                                             action: 'frontend.form.contact.send',
  24.                                             submitText: 'contact.formSubmit'
  25.                                         }
  26.                                     %}
  27.                                 {% endblock %}
  28.                             {% elseif element.config.type.value is same as('newsletter') %}
  29.                                 {% block element_form_newsletter_form_title %}
  30.                                     <div class="card-title mb-4">
  31.                                         {% if element.config.title.value %}
  32.                                             {{ element.config.title.value }}
  33.                                         {%  else %}
  34.                                             {{ "newsletter.headline"|trans }}
  35.                                         {% endif %}
  36.                                     </div>
  37.                                 {% endblock %}
  38.                                 {% block element_form_newsletter_form_form %}
  39.                                     {% sw_include '@Storefront/storefront/element/cms-element-form/form-types/newsletter-form.html.twig'
  40.                                         with {
  41.                                             action: 'frontend.form.newsletter.register.handle',
  42.                                             submitText: 'newsletter.formSubmit'
  43.                                         }
  44.                                     %}
  45.                                 {% endblock %}
  46.                             {% endif %}
  47.                         {% endblock %}
  48.                     </div>
  49.                 </div>
  50.             </div>
  51.         </div>
  52.     </div>
  53. {% endblock %}