[-] BO : Fixed bug #PSTEST-937. Add new attributes to the forbidden list and fix the layout during the creation of a new country
This commit is contained in:
1 parent
c936abbf8b
commit
643b214536
2 files changed
+20
-4
No files matched your search
@@ -88,7 +88,19 @@ class AddressFormatCore extends ObjectModel
|
|||||||
'need_zip_code',
|
'need_zip_code',
|
||||||
'contains_states',
|
'contains_states',
|
||||||
'call_prefixes',
|
'call_prefixes',
|
||||||
'call_prefix');
|
'show_public_prices',
|
||||||
|
'max_payment',
|
||||||
|
'max_payment_days',
|
||||||
|
'geoloc_postcode',
|
||||||
|
'logged',
|
||||||
|
'account_number',
|
||||||
|
'groupBox',
|
||||||
|
'ape',
|
||||||
|
'max_payment',
|
||||||
|
'outstanding_allow_amount',
|
||||||
|
'call_prefix',
|
||||||
|
'definition',
|
||||||
|
);
|
||||||
|
|
||||||
public static $forbiddenClassList = array(
|
public static $forbiddenClassList = array(
|
||||||
'Manufacturer',
|
'Manufacturer',
|
||||||
@@ -174,6 +186,8 @@ class AddressFormatCore extends ObjectModel
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Check if the id field name exist in the Address class
|
// Check if the id field name exist in the Address class
|
||||||
|
// Don't check this attribute on Address (no sense)
|
||||||
|
if ($associationName[0] != 'Address')
|
||||||
$this->_checkValidateClassField('Address', 'id_'.strtolower($associationName[0]), true);
|
$this->_checkValidateClassField('Address', 'id_'.strtolower($associationName[0]), true);
|
||||||
|
|
||||||
// Check if the field name exist in the class write by the user
|
// Check if the field name exist in the class write by the user
|
||||||
|
|||||||
@@ -353,9 +353,11 @@ class AdminCountriesControllerCore extends AdminController
|
|||||||
|
|
||||||
public function postProcess()
|
public function postProcess()
|
||||||
{
|
{
|
||||||
if (Tools::getValue('submitAdd'.$this->table))
|
$res = parent::postProcess();
|
||||||
|
|
||||||
|
if (Tools::getValue('submitAdd'.$this->table) && $res)
|
||||||
{
|
{
|
||||||
$id_country = Tools::getValue('id_country');
|
$id_country = ($id_country = Tools::getValue('id_country')) ? $id_country : $res['id'];
|
||||||
$tmp_addr_format = new AddressFormat($id_country);
|
$tmp_addr_format = new AddressFormat($id_country);
|
||||||
|
|
||||||
$save_status = false;
|
$save_status = false;
|
||||||
@@ -389,7 +391,7 @@ class AdminCountriesControllerCore extends AdminController
|
|||||||
unset($tmp_addr_format);
|
unset($tmp_addr_format);
|
||||||
}
|
}
|
||||||
|
|
||||||
return parent::postProcess();
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function displayValidFields()
|
protected function displayValidFields()
|
||||||
|
|||||||
Reference in new issue
Block a user