mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
Twig: test address_id in url and substring 'edit' in route
This commit is contained in:
@@ -25,10 +25,10 @@
|
||||
window.entityId = {{ household.id|e('js') }};
|
||||
{% endif %}
|
||||
|
||||
{% if mode == 'edit' %}
|
||||
window.addressId = {{ address_id|e('js') }};
|
||||
{% if 'edit' in app.request.get('_route') %}
|
||||
window.addressId = {{ app.request.get('address_id')|e('js') }};
|
||||
window.mode = 'edit';
|
||||
{% endif %}
|
||||
window.mode = '{{ mode|e('js') }}';
|
||||
|
||||
{% if backUrl is not defined %}
|
||||
{% if person is defined %}
|
||||
|
@@ -28,8 +28,6 @@
|
||||
|
||||
{# include vue_address component #}
|
||||
{% include '@ChillPerson/Address/_insert_vue_address.html.twig' with {
|
||||
mode: 'edit',
|
||||
address_id: person.lastAddress.id,
|
||||
binModalStep1: false,
|
||||
binModalStep2: false,
|
||||
} %}
|
||||
|
@@ -28,7 +28,6 @@
|
||||
|
||||
{# include vue_address component #}
|
||||
{% include '@ChillPerson/Address/_insert_vue_address.html.twig' with {
|
||||
mode: 'new',
|
||||
binModalStep1: false,
|
||||
binModalStep2: false,
|
||||
} %}
|
||||
|
@@ -8,8 +8,6 @@
|
||||
<div>
|
||||
{# include vue_address component #}
|
||||
{% include '@ChillPerson/Address/_insert_vue_address.html.twig' with {
|
||||
mode: 'edit',
|
||||
address_id: household.lastAddress.id,
|
||||
binModalStep1: false,
|
||||
binModalStep2: false,
|
||||
} %}
|
||||
|
@@ -8,7 +8,6 @@
|
||||
<div>
|
||||
{# include vue_address component #}
|
||||
{% include '@ChillPerson/Address/_insert_vue_address.html.twig' with {
|
||||
mode: 'new',
|
||||
binModalStep1: false,
|
||||
binModalStep2: false,
|
||||
} %}
|
||||
|
Reference in New Issue
Block a user