{% extends 'base.html.twig' %}

{% block page_title %}{{ 'admin_user.title'|trans }}{% endblock %}

{% block main %}
    {% set formEditTemplate = app.request.xmlHttpRequest ? 'default/_form_modal.html.twig' : 'default/_form.html.twig' %}
    {% set formOptions = {
        'title': 'create'|trans,
        'form': form,
        'back': path('admin_user')
    } %}
    {% embed formEditTemplate with formOptions %}
        {% block form_body %}
            {{ form_widget(form) }}
        {% endblock %}
    {% endembed %}
{% endblock %}
