[-] 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
This commit is contained in:
vAugagneur
2012-07-05 12:42:15 +00:00
parent a1311dba2d
commit 74b71ae1fb
+10 -2
View File
@@ -136,7 +136,10 @@ class Blockreinsurance extends Module
$id_reinsurance = (int)Tools::getValue('id_reinsurance'); $id_reinsurance = (int)Tools::getValue('id_reinsurance');
if (Tools::isSubmit('saveblockreinsurance')) 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->copyFromPost();
$reinsurance->id_shop = $this->context->shop->id; $reinsurance->id_shop = $this->context->shop->id;
@@ -171,7 +174,12 @@ class Blockreinsurance extends Module
} }
else else
$helper->fields_value['text'][(int)$lang['id_lang']] = Tools::getValue('text_'.(int)$lang['id_lang'], ''); $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); return $html.$helper->generateForm($this->fields_form);
} }
else if (Tools::isSubmit('deleteblockreinsurance')) else if (Tools::isSubmit('deleteblockreinsurance'))