diff --git a/controllers/admin/AdminContactController.php b/controllers/admin/AdminContactController.php index fa10b5a3b..d190f0757 100644 --- a/controllers/admin/AdminContactController.php +++ b/controllers/admin/AdminContactController.php @@ -51,17 +51,82 @@ class AdminContactControllerCore extends AdminController $stateList[] = array('id' => $state['id_state'], 'name' => $state['name']); $formFields = array( - 'PS_SHOP_NAME' => array('title' => $this->l('Shop name:'), 'desc' => $this->l('Displayed in e-mails and page titles'), 'validation' => 'isGenericName', 'required' => true, 'size' => 30, 'type' => 'text'), - 'PS_SHOP_EMAIL' => array('title' => $this->l('Shop e-mail:'), 'desc' => $this->l('Displayed in e-mails sent to customers'), 'validation' => 'isEmail', 'required' => true, 'size' => 30, 'type' => 'text'), - 'PS_SHOP_DETAILS' => array('title' => $this->l('Registration:'), 'desc' => $this->l('Shop registration information (e.g., SIRET or RCS)'), 'validation' => 'isGenericName', 'size' => 30, 'type' => 'textarea', 'cols' => 30, 'rows' => 5), - 'PS_SHOP_ADDR1' => array('title' => $this->l('Shop address line 1:'), 'validation' => 'isAddress', 'size' => 30, 'type' => 'text'), - 'PS_SHOP_ADDR2' => array('title' => 'Address line 2', 'validation' => 'isAddress', 'size' => 30, 'type' => 'text'), - 'PS_SHOP_CODE' => array('title' => $this->l('Post/Zip code:'), 'validation' => 'isGenericName', 'size' => 6, 'type' => 'text'), - 'PS_SHOP_CITY' => array('title' => $this->l('City:'), 'validation' => 'isGenericName', 'size' => 30, 'type' => 'text'), - 'PS_SHOP_COUNTRY_ID' => array('title' => $this->l('Country:'), 'validation' => 'isInt', 'size' => 30, 'type' => 'select', 'list' => $countryList, 'identifier' => 'id', 'cast' => 'intval'), - 'PS_SHOP_STATE_ID' => array('title' => $this->l('State:'), 'validation' => 'isInt', 'size' => 30, 'type' => 'select', 'list' => $stateList, 'identifier' => 'id', 'cast' => 'intval'), - 'PS_SHOP_PHONE' => array('title' => $this->l('Phone:'), 'validation' => 'isGenericName', 'size' => 30, 'type' => 'text'), - 'PS_SHOP_FAX' => array('title' => $this->l('Fax:'), 'validation' => 'isGenericName', 'size' => 30, 'type' => 'text'), + 'PS_SHOP_NAME' => array( + 'title' => $this->l('Shop name:'), + 'desc' => $this->l('Displayed in e-mails and page titles'), + 'validation' => 'isGenericName', + 'required' => true, + 'size' => 30, + 'type' => 'text' + ), + 'PS_SHOP_EMAIL' => array('title' => $this->l('Shop e-mail:'), + 'desc' => $this->l('Displayed in e-mails sent to customers'), + 'validation' => 'isEmail', + 'required' => true, + 'size' => 30, + 'type' => 'text' + ), + 'PS_SHOP_DETAILS' => array( + 'title' => $this->l('Registration:'), + 'desc' => $this->l('Shop registration information (e.g., SIRET or RCS)'), + 'validation' => 'isGenericName', + 'size' => 30, + 'type' => 'textarea', + 'cols' => 30, + 'rows' => 5 + ), + 'PS_SHOP_ADDR1' => array( + 'title' => $this->l('Shop address line 1:'), + 'validation' => 'isAddress', + 'size' => 30, + 'type' => 'text' + ), + 'PS_SHOP_ADDR2' => array( + 'title' => 'Address line 2', + 'validation' => 'isAddress', + 'size' => 30, + 'type' => 'text' + ), + 'PS_SHOP_CODE' => array( + 'title' => $this->l('Post/Zip code:'), + 'validation' => 'isGenericName', + 'size' => 6, + 'type' => 'text' + ), + 'PS_SHOP_CITY' => array( + 'title' => $this->l('City:'), + 'validation' => 'isGenericName', + 'size' => 30, + 'type' => 'text'), + 'PS_SHOP_COUNTRY_ID' => array( + 'title' => $this->l('Country:'), + 'validation' => 'isInt', + 'type' => 'select', + 'list' => $countryList, + 'identifier' => 'id', + 'cast' => 'intval', + 'defaultValue' => (int)$this->context->country->id + ), + 'PS_SHOP_STATE_ID' => array( + 'title' => $this->l('State:'), + 'validation' => 'isInt', + 'type' => 'select', + 'list' => $stateList, + 'identifier' => 'id', + 'cast' => 'intval' + ), + 'PS_SHOP_PHONE' => array( + 'title' => $this->l('Phone:'), + 'validation' => 'isGenericName', + 'size' => 30, + 'type' => 'text' + ), + 'PS_SHOP_FAX' => array( + 'title' => $this->l('Fax:'), + 'validation' => 'isGenericName', + 'size' => 30, + 'type' => 'text' + ), ); return $formFields; }