{% extends app.request.xmlHttpRequest ? 'form.html.twig' : 'base.html.twig' %} {% block page_title %}{{ 'admin_invoice_template.title'|trans }}{% endblock %} {% block main %} {% set formEditTemplate = app.request.xmlHttpRequest ? 'default/_form_modal.html.twig' : 'default/_form.html.twig' %} {% set formOptions = { 'title': template.name|default('create'|trans), 'form': form, 'back': path('admin_invoice_template') } %} {% embed formEditTemplate with formOptions %} {% block form_body %} {{ form_row(form.name) }} {{ form_row(form.title) }}