diff --git a/admin-dev/themes/default/template/helpers/form/form.tpl b/admin-dev/themes/default/template/helpers/form/form.tpl index 02538c893..f8e6bea7d 100644 --- a/admin-dev/themes/default/template/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/helpers/form/form.tpl @@ -50,7 +50,7 @@ {else} {if $input.name == 'id_state'} -
{if is_array($input.desc)} {foreach $input.desc as $p} diff --git a/controllers/admin/AdminAddressesController.php b/controllers/admin/AdminAddressesController.php index bab4bdfd9..5aeaa332c 100644 --- a/controllers/admin/AdminAddressesController.php +++ b/controllers/admin/AdminAddressesController.php @@ -126,7 +126,7 @@ class AdminAddressesControllerCore extends AdminController 'name' => 'phone_mobile', 'size' => 33, 'required' => false, - 'desc' => sprintf($this->l('You must register at least one phone number %s'), '*') + 'desc' => Configuration::get('PS_ONE_PHONE_AT_LEAST')? sprintf($this->l('You must register at least one phone number %s'), '*') : '' ), array( 'type' => 'textarea', @@ -367,6 +367,9 @@ class AdminAddressesControllerCore extends AdminController $this->errors[] = Tools::displayError('Your Postal Code/Zip Code is incorrect.'); } + if (Configuration::get('PS_ONE_PHONE_AT_LEAST') && !Tools::getValue('phone') && !Tools::getValue('phone_mobile')) + $this->errors[] = Tools::displayError('You must register at least one phone number'); + /* If this address come from order's edition and is the same as the other one (invoice or delivery one) ** we delete its id_address to force the creation of a new one */ if ((int)Tools::getValue('id_order'))