[-] BO : #PSTEST-250 : Fix bug adding manufacturer address

This commit is contained in:
lLefevre committed 2011-12-30 10:01:58 +00:00
1 parent cd01f72e7c
commit 108e0157ae
2 files changed
+4 -5

No files matched your search

@@ -360,7 +360,7 @@ class AdminManufacturersControllerCore extends AdminController
return parent::renderForm(); return parent::renderForm();
} }
public function initFormAddress() public function renderFormAddress()
{ {
// Change table and className for addresses // Change table and className for addresses
$this->table = 'address'; $this->table = 'address';
@@ -617,7 +617,7 @@ class AdminManufacturersControllerCore extends AdminController
// toolbar (save, cancel, new, ..) // toolbar (save, cancel, new, ..)
$this->initToolbar(); $this->initToolbar();
if ($this->display == 'editaddresses' || $this->display == 'addaddress') if ($this->display == 'editaddresses' || $this->display == 'addaddress')
$this->content .= $this->initFormAddress(); $this->content .= $this->renderFormAddress();
else if ($this->display == 'edit' || $this->display == 'add') else if ($this->display == 'edit' || $this->display == 'add')
{ {
if (!$this->loadObject(true)) if (!$this->loadObject(true))
@@ -661,7 +661,7 @@ class AdminManufacturersControllerCore extends AdminController
$this->action = 'delete'; $this->action = 'delete';
} }
public function postProcess() public function initProcess()
{ {
if (Tools::getValue('submitAddaddress') || Tools::isSubmit('deleteaddress')) if (Tools::getValue('submitAddaddress') || Tools::isSubmit('deleteaddress'))
{ {
@@ -670,7 +670,7 @@ class AdminManufacturersControllerCore extends AdminController
$this->identifier = 'id_address'; $this->identifier = 'id_address';
$this->deleted = true; $this->deleted = true;
} }
parent::postProcess(); parent::initProcess();
} }
public function afterImageUpload() public function afterImageUpload()
@@ -978,7 +978,6 @@ class AdminTranslationsControllerCore extends AdminController
foreach ($templates as $template) foreach ($templates as $template)
if (preg_match('/^(.*).tpl$/', $template)) if (preg_match('/^(.*).tpl$/', $template))
{ {
//$tpl = _PS_ADMIN_DIR_.'/themes/template/'.$template;
$tpl = $template; $tpl = $template;
// get controller name instead of file name // get controller name instead of file name