diff --git a/admin-dev/tabs/AdminSubDomains.php b/controllers/admin/AdminSubDomainsController.php similarity index 56% rename from admin-dev/tabs/AdminSubDomains.php rename to controllers/admin/AdminSubDomainsController.php index 193e808a0..dc2a80f2d 100644 --- a/admin-dev/tabs/AdminSubDomains.php +++ b/controllers/admin/AdminSubDomainsController.php @@ -25,7 +25,7 @@ * International Registered Trademark & Property of PrestaShop SA */ -class AdminSubDomains extends AdminTab +class AdminSubDomainsControllerCore extends AdminController { public function __construct() { @@ -38,38 +38,38 @@ class AdminSubDomains extends AdminTab 'id_subdomain' => array('title' => $this->l('ID'), 'width' => 25), 'name' => array('title' => $this->l('Subdomain'), 'width' => 200) ); + + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Subdomains'), + 'image' => '../img/admin/subdomain.gif', + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Subdomains:'), + 'name' => 'name', + 'size' => '33', + 'required' => true, + 'hint' => $this->l('Invalid characters:').' <>;=#{}', + ), + ), + 'submit' => array( + 'title' => $this->l(' Save '), + 'class' => 'button' + ) + ); + + parent::__construct(); } - public function displayList() + public function initList() { - $this->displayWarning($this->l('Cookies are different on each subdomain of your Website. If you want to use the same cookie, please add here the subdomains used by your shop. The most common is "www".')); - return parent::displayList(); + $this->warnings[] = $this->l('Cookies are different on each subdomain of your Website. If you want to use the same cookie, please add here the subdomains used by your shop. The most common is "www".'); + return parent::initList(); } - public function displayForm($isMainTab = true) - { - parent::displayForm(); - - if (!($obj = $this->loadObject(true))) - return; - - echo ' -
- '.($obj->id ? '' : '').' -
'.$this->l('Subdomains').' - -
- * -

'.$this->l('Additional subdomain').'

-
-
- -
-
* '.$this->l('Required field').'
-
-
'; - } public function postProcess() {