From 74b71ae1fba99dbd12b8536c06c1da17d9ee8fec Mon Sep 17 00:00:00 2001 From: vAugagneur Date: Thu, 5 Jul 2012 12:42:15 +0000 Subject: [PATCH] [-] MO : fixed #PSCFV-2978 - Block reinsurance shows incorrect when its text is changed to work with other language than English git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16236 b9a71923-0436-4b27-9f14-aed3839534dd --- modules/blockreinsurance/blockreinsurance.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/blockreinsurance/blockreinsurance.php b/modules/blockreinsurance/blockreinsurance.php index 6c98d74bb..7d937d2b1 100644 --- a/modules/blockreinsurance/blockreinsurance.php +++ b/modules/blockreinsurance/blockreinsurance.php @@ -136,7 +136,10 @@ class Blockreinsurance extends Module $id_reinsurance = (int)Tools::getValue('id_reinsurance'); if (Tools::isSubmit('saveblockreinsurance')) { - $reinsurance = new reinsuranceClass(); + if ($id_reinsurance = Tools::getValue('id_reinsurance')) + $reinsurance = new reinsuranceClass((int)$id_reinsurance); + else + $reinsurance = new reinsuranceClass(); $reinsurance->copyFromPost(); $reinsurance->id_shop = $this->context->shop->id; @@ -171,7 +174,12 @@ class Blockreinsurance extends Module } else $helper->fields_value['text'][(int)$lang['id_lang']] = Tools::getValue('text_'.(int)$lang['id_lang'], ''); - + if ($id_reinsurance = Tools::getValue('id_reinsurance')) + { + $this->fields_form[0]['form']['input'][] = array('type' => 'hidden', 'name' => 'id_reinsurance'); + $helper->fields_value['id_reinsurance'] = (int)$id_reinsurance; + } + return $html.$helper->generateForm($this->fields_form); } else if (Tools::isSubmit('deleteblockreinsurance'))