[-] 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
This commit is contained in:
tDidierjean
2012-02-20 16:09:51 +00:00
parent 56f8b70cb9
commit 0753d43376
@@ -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);
}