open create form for activity/project/customer in modals (#2025)
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
{% endif %}
|
||||
|
||||
{% if is_granted('create_user') %}
|
||||
{% set actions = actions|merge({'create': path('admin_user_create')}) %}
|
||||
{% set actions = actions|merge({'create': {'url': path('admin_user_create')}}) %}
|
||||
{% endif %}
|
||||
|
||||
{% if view == 'index' %}
|
||||
|
||||
@@ -3,9 +3,15 @@
|
||||
{% block page_title %}{{ 'admin_user.title'|trans }}{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
{{ include('default/_form.html.twig', {
|
||||
{% 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 %}
|
||||
|
||||
Reference in New Issue
Block a user