diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Address/_insert_vue_address.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Address/_insert_vue_address.html.twig index bb70a976a..17c111e06 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Address/_insert_vue_address.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Address/_insert_vue_address.html.twig @@ -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 %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/view.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/view.html.twig index 5e5169575..53166ab9e 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/view.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/view.html.twig @@ -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',