From c69f151487fa1a696b7c5a7227d22f78ec1e8a9d Mon Sep 17 00:00:00 2001 From: mMarinetti Date: Sun, 13 Nov 2011 19:10:41 +0000 Subject: [PATCH] [+] BO : #PSFV-94 - AdminSubdomains is now a Controller // + AdminSubDomains now uses the default form :) --- .../admin/AdminSubDomainsController.php | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) rename admin-dev/tabs/AdminSubDomains.php => controllers/admin/AdminSubDomainsController.php (56%) 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() {