From bd3b4657f4ea6d513e6a6dac459bf076c2ea40fc Mon Sep 17 00:00:00 2001 From: vAugagneur Date: Thu, 5 Jul 2012 09:43:52 +0000 Subject: [PATCH] [-] BO : fixed #PSCFV-3005 - problems to create a shop for contact with multishop git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16229 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/admin/AdminStoresController.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/controllers/admin/AdminStoresController.php b/controllers/admin/AdminStoresController.php index 7fcf70ee8..67e9e694a 100644 --- a/controllers/admin/AdminStoresController.php +++ b/controllers/admin/AdminStoresController.php @@ -286,6 +286,15 @@ class AdminStoresControllerCore extends AdminController 'class' => 'button' ) ); + + if (Shop::isFeatureActive()) + { + $this->fields_form['input'][] = array( + 'type' => 'shop', + 'label' => $this->l('Shop association:'), + 'name' => 'checkBoxShopAsso', + ); + } if (!($obj = $this->loadObject(true))) return; @@ -324,7 +333,8 @@ class AdminStoresControllerCore extends AdminController { /* Cleaning fields */ foreach ($_POST as $kp => $vp) - $_POST[$kp] = trim($vp); + if ($kp != 'checkBoxShopAsso_store') + $_POST[$kp] = trim($vp); /* If the selected country does not contain states */ $id_state = (int)Tools::getValue('id_state'); @@ -387,8 +397,8 @@ class AdminStoresControllerCore extends AdminController if (!count($this->errors)) parent::postProcess(); - else - $this->display = 'add'; + else + $this->display = 'add'; } protected function postImage($id)