Pārlūkot izejas kodu

Add two custom empty blocks to the base_edit, allowing to add content before and after a form just by extending the template

Damien Alexandre 13 gadi atpakaļ
vecāks
revīzija
32a71bb81f
1 mainītis faili ar 4 papildinājumiem un 0 dzēšanām
  1. 4 0
      Resources/views/CRUD/base_edit.html.twig

+ 4 - 0
Resources/views/CRUD/base_edit.html.twig

@@ -57,6 +57,8 @@ file that was distributed with this source code.
                 </div>
             {% endif %}
 
+            {% block pre_fieldsets %}{% endblock %}
+
             {% for name, form_group in admin.formgroups %}
                 <fieldset {% if form_group.collapsed %}class="sonata-ba-fielset-collapsed"{% endif %}>
                     <legend>
@@ -77,6 +79,8 @@ file that was distributed with this source code.
                 </fieldset>
             {% endfor %}
 
+            {% block post_fieldsets %}{% endblock %}
+
             {{ form_rest(form) }}
 
             <div class="actions">