mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Twig: test address_id in url and substring 'edit' in route
This commit is contained in:
parent
c075ff199d
commit
62dc94bb14
@ -259,7 +259,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
closeEditPane() {
|
closeEditPane() {
|
||||||
console.log('close the Edit Panel (with validation)');
|
console.log('close the Edit Panel');
|
||||||
this.applyChanges();
|
this.applyChanges();
|
||||||
this.flag.showPane = true;
|
this.flag.showPane = true;
|
||||||
this.flag.editPane = false;
|
this.flag.editPane = false;
|
||||||
|
@ -68,9 +68,7 @@
|
|||||||
aria-describedby="validFrom"
|
aria-describedby="validFrom"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="flag.loading">
|
<!--div v-if="flag.loading">{{ $t('loading') }}</div-->
|
||||||
{{ $t('loading') }}
|
|
||||||
</div>
|
|
||||||
<div v-if="errorMsg && errorMsg.length > 0" class="alert alert-danger">
|
<div v-if="errorMsg && errorMsg.length > 0" class="alert alert-danger">
|
||||||
{{ errors }}
|
{{ errors }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -25,10 +25,10 @@
|
|||||||
window.entityId = {{ household.id|e('js') }};
|
window.entityId = {{ household.id|e('js') }};
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if mode == 'edit' %}
|
{% if 'edit' in app.request.get('_route') %}
|
||||||
window.addressId = {{ address_id|e('js') }};
|
window.addressId = {{ app.request.get('address_id')|e('js') }};
|
||||||
|
window.mode = 'edit';
|
||||||
{% endif %}
|
{% endif %}
|
||||||
window.mode = '{{ mode|e('js') }}';
|
|
||||||
|
|
||||||
{% if backUrl is not defined %}
|
{% if backUrl is not defined %}
|
||||||
{% if person is defined %}
|
{% if person is defined %}
|
||||||
|
@ -28,8 +28,6 @@
|
|||||||
|
|
||||||
{# include vue_address component #}
|
{# include vue_address component #}
|
||||||
{% include '@ChillPerson/Address/_insert_vue_address.html.twig' with {
|
{% include '@ChillPerson/Address/_insert_vue_address.html.twig' with {
|
||||||
mode: 'edit',
|
|
||||||
address_id: person.lastAddress.id,
|
|
||||||
binModalStep1: false,
|
binModalStep1: false,
|
||||||
binModalStep2: false,
|
binModalStep2: false,
|
||||||
} %}
|
} %}
|
||||||
|
@ -28,7 +28,6 @@
|
|||||||
|
|
||||||
{# include vue_address component #}
|
{# include vue_address component #}
|
||||||
{% include '@ChillPerson/Address/_insert_vue_address.html.twig' with {
|
{% include '@ChillPerson/Address/_insert_vue_address.html.twig' with {
|
||||||
mode: 'new',
|
|
||||||
binModalStep1: false,
|
binModalStep1: false,
|
||||||
binModalStep2: false,
|
binModalStep2: false,
|
||||||
} %}
|
} %}
|
||||||
|
@ -8,8 +8,6 @@
|
|||||||
<div>
|
<div>
|
||||||
{# include vue_address component #}
|
{# include vue_address component #}
|
||||||
{% include '@ChillPerson/Address/_insert_vue_address.html.twig' with {
|
{% include '@ChillPerson/Address/_insert_vue_address.html.twig' with {
|
||||||
mode: 'edit',
|
|
||||||
address_id: household.lastAddress.id,
|
|
||||||
binModalStep1: false,
|
binModalStep1: false,
|
||||||
binModalStep2: false,
|
binModalStep2: false,
|
||||||
} %}
|
} %}
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
<div>
|
<div>
|
||||||
{# include vue_address component #}
|
{# include vue_address component #}
|
||||||
{% include '@ChillPerson/Address/_insert_vue_address.html.twig' with {
|
{% include '@ChillPerson/Address/_insert_vue_address.html.twig' with {
|
||||||
mode: 'new',
|
|
||||||
binModalStep1: false,
|
binModalStep1: false,
|
||||||
binModalStep2: false,
|
binModalStep2: false,
|
||||||
} %}
|
} %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user