mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 05:44:24 +00:00
passing option backUrl from include template twig
This commit is contained in:
parent
cdbd97e595
commit
47d704b521
@ -5,7 +5,12 @@
|
|||||||
window.mode = '{{ mode|e('js') }}';
|
window.mode = '{{ mode|e('js') }}';
|
||||||
window.personId = {{ person.id|e('js') }};
|
window.personId = {{ person.id|e('js') }};
|
||||||
window.addressId = {{ address_id|e('js') }};
|
window.addressId = {{ address_id|e('js') }};
|
||||||
window.backUrl = '{{ path('chill_person_view', { 'person_id': person.id })|e('js') }}';
|
{% if backUrl is defined %}
|
||||||
|
window.backUrl = '{{ backUrl|e('js') }}';
|
||||||
|
{% else %}
|
||||||
|
window.backUrl = '{{ path('chill_person_address_list', { 'person_id': person.id })|e('js') }}';
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if modalTitle is defined %}
|
{% if modalTitle is defined %}
|
||||||
window.modalTitle = '{{ modalTitle|trans|e('js') }}';
|
window.modalTitle = '{{ modalTitle|trans|e('js') }}';
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -23,10 +28,10 @@
|
|||||||
window.button.display = false;
|
window.button.display = false;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if binModalStep1 is defined and binModalStep1 == false %}
|
{% if binModalStep1 is defined and binModalStep1 == false %}
|
||||||
window.binModalStep1 = false
|
window.binModalStep1 = false;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if binModalStep2 is defined and binModalStep2 == false %}
|
{% if binModalStep2 is defined and binModalStep2 == false %}
|
||||||
window.binModalStep2 = false
|
window.binModalStep2 = false;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -203,6 +203,7 @@ This view should receive those arguments:
|
|||||||
{# 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 {
|
||||||
address_id: person.lastAddress.id,
|
address_id: person.lastAddress.id,
|
||||||
|
backUrl: path('chill_person_view', { 'person_id': person.id }),
|
||||||
mode: 'edit',
|
mode: 'edit',
|
||||||
modalTitle: 'Edit address',
|
modalTitle: 'Edit address',
|
||||||
buttonText: 'Edit address',
|
buttonText: 'Edit address',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user