diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue index 47958031c..c0cb45c42 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue @@ -415,18 +415,25 @@ export default { this.flag.datePane = false; this.openShowPane(); }, + + /* + * What happens when submitting last Pane: + * - redirect or reset pane, + * - change context to editing + */ afterLastPaneAction(params) { this.initForm(); - // redirect or reset pane if (this.options.forceRedirect === true) { console.log("redirect to backUrl"); window.location.assign(this.context.backUrl); } else { - console.log("don't redirect, adapt context"); + console.log("don't redirect"); this.resetPane(); - // change to edit context - this.context.edit = true; - this.context.addressId = params.addressId; + if (!this.context.edit) { + this.context.edit = true; + this.context.addressId = params.addressId; + console.log("context is now edit, with address", params.addressId); + } } }, diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Address/new.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Address/new.html.twig index 21e858615..a3149ef38 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Address/new.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Address/new.html.twig @@ -30,11 +30,11 @@ {% include '@ChillMain/Address/_insert_vue_address.html.twig' with { targetEntity: { name: 'person', id: person.id }, backUrl: path('chill_person_address_list', { 'person_id': person.id }), - useValidFrom: true, openPanesInModal: false, stickyActions: true, } %} {# + useValidFrom: true, #} {% endblock %}