From 0753d43376a6e5d28a7ad32d95f98afe829e7c02 Mon Sep 17 00:00:00 2001 From: tDidierjean Date: Mon, 20 Feb 2012 16:09:51 +0000 Subject: [PATCH] [-] BO : fix bug #PSFV-535 - AdminAddress : Redirection if errors on add form git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13474 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/admin/AdminAddressesController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/controllers/admin/AdminAddressesController.php b/controllers/admin/AdminAddressesController.php index 28f9cc206..d5ede6efe 100644 --- a/controllers/admin/AdminAddressesController.php +++ b/controllers/admin/AdminAddressesController.php @@ -359,6 +359,9 @@ class AdminAddressesControllerCore extends AdminController if (empty($this->errors)) parent::processSave($token); + else + // if we have errors, we stay on the form instead of going back to the list + $this->display = 'edit'; /* Reassignation of the order's new (invoice or delivery) address */ $address_type = ((int)Tools::getValue('address_type') == 2 ? 'invoice' : ((int)Tools::getValue('address_type') == 1 ? 'delivery' : '')); @@ -375,6 +378,7 @@ class AdminAddressesControllerCore extends AdminController { if (Tools::getValue('submitFormAjax')) $this->redirect_after = false; + return parent::processAdd($token); }