open create form for activity/project/customer in modals (#2025)
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
{% set actions = actions|merge({'download': {'url': path('activity_export'), 'class': 'toolbar-action'}}) %}
|
||||
|
||||
{% if is_granted('create_activity') %}
|
||||
{% set actions = actions|merge({'create': path('admin_activity_create')}) %}
|
||||
{% set actions = actions|merge({'create': {'url': path('admin_activity_create'), 'class': 'modal-ajax-form'}}) %}
|
||||
{% endif %}
|
||||
|
||||
{% set actions = actions|merge({'help': {'url': 'activity.html'|docu_link, 'target': '_blank'}}) %}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
{% block main %}
|
||||
{% set formEditTemplate = app.request.xmlHttpRequest ? 'default/_form_modal.html.twig' : 'default/_form.html.twig' %}
|
||||
{% set formOptions = {
|
||||
'title': activity.name|default('create-activity'|trans({}, 'actions')),
|
||||
'title': (activity.id is null ? 'create'|trans : 'edit'|trans({}, 'actions')),
|
||||
'form': form,
|
||||
'back': path('admin_activity')
|
||||
} %}
|
||||
@@ -40,11 +40,6 @@
|
||||
{{ form_row(meta) }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if form.create_more is defined and app.request.xmlHttpRequest %}
|
||||
<div class="hidden">
|
||||
{{ form_row(form.create_more) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ form_widget(form) }}
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
|
||||
Reference in New Issue
Block a user