瀏覽代碼

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 年之前
父節點
當前提交
32a71bb81f
共有 1 個文件被更改,包括 4 次插入0 次删除
  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">