mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +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.personId = {{ person.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 %}
|
||||
window.modalTitle = '{{ modalTitle|trans|e('js') }}';
|
||||
{% endif %}
|
||||
@ -23,10 +28,10 @@
|
||||
window.button.display = false;
|
||||
{% endif %}
|
||||
{% if binModalStep1 is defined and binModalStep1 == false %}
|
||||
window.binModalStep1 = false
|
||||
window.binModalStep1 = false;
|
||||
{% endif %}
|
||||
{% if binModalStep2 is defined and binModalStep2 == false %}
|
||||
window.binModalStep2 = false
|
||||
window.binModalStep2 = false;
|
||||
{% endif %}
|
||||
</script>
|
||||
|
||||
|
@ -203,6 +203,7 @@ This view should receive those arguments:
|
||||
{# include vue_address component #}
|
||||
{% include '@ChillPerson/Address/_insert_vue_address.html.twig' with {
|
||||
address_id: person.lastAddress.id,
|
||||
backUrl: path('chill_person_view', { 'person_id': person.id }),
|
||||
mode: 'edit',
|
||||
modalTitle: 'Edit address',
|
||||
buttonText: 'Edit address',
|
||||
|
Loading…
x
Reference in New Issue
Block a user