replaced delete confirm dialog with modal (#638)

This commit is contained in:
Kevin Papst
2019-03-12 23:24:22 +01:00
committed by GitHub
parent 46655ad462
commit f4d53e9006
43 changed files with 303 additions and 109 deletions

View File

@@ -1,6 +1,4 @@
{% extends 'base.html.twig' %}
{% import "macros/widgets.html.twig" as widgets %}
{% import "macros/datatables.html.twig" as tables %}
{% extends app.request.xmlHttpRequest ? 'form.html.twig' : 'base.html.twig' %}
{% import "macros/actions.html.twig" as actions %}
{% block page_title %}{{ 'admin_customer.title'|trans }}{% endblock %}
@@ -9,6 +7,8 @@
{% block main %}
{% set inUse = (stats.recordAmount > 0) %}
{% set params = {
'%activity%': '<strong>' ~ stats.activityAmount ~ '</strong>',
'%project%': '<strong>' ~ stats.projectAmount ~ '</strong>',
@@ -17,9 +17,10 @@
'%duration%': '<strong>' ~ stats.recordDuration|duration ~ '</strong>'
} %}
{{ include('default/_form_delete.html.twig', {
{{ include(app.request.xmlHttpRequest ? 'default/_form_delete_modal.html.twig' : 'default/_form_delete.html.twig', {
'message': "admin_customer.delete_confirm"|trans(params)|raw,
'form': form,
'used': inUse,
'back': path('admin_customer')
}) }}