From 680497f1e3f834385e418057da76eb0d613982fd Mon Sep 17 00:00:00 2001 From: Sarah Lorenzini Date: Thu, 1 Aug 2013 16:26:02 +0200 Subject: [PATCH] // update preferences tab --- .../controllers/cms/helpers/form/form.tpl | 9 +-- .../controllers/stores/helpers/form/form.tpl | 64 ++++++++++--------- .../admin/AdminCmsCategoriesController.php | 19 +++--- controllers/admin/AdminCmsController.php | 22 +++---- .../admin/AdminGeolocationController.php | 3 +- controllers/admin/AdminImagesController.php | 52 +++++++-------- .../admin/AdminMaintenanceController.php | 8 +-- .../admin/AdminSearchConfController.php | 46 ++++++------- controllers/admin/AdminStoresController.php | 62 +++++++----------- 9 files changed, 129 insertions(+), 156 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/cms/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/cms/helpers/form/form.tpl index 225f3b30e..564d4d453 100644 --- a/admin-dev/themes/default/template/controllers/cms/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/cms/helpers/form/form.tpl @@ -68,12 +68,9 @@ {/block} {block name="leadin"} -
-

- - {l s='Your CMS page will be saved as a draft'} - -
+

+

+ {l s='Your CMS page will be saved as a draft'}

{/block} diff --git a/admin-dev/themes/default/template/controllers/stores/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/stores/helpers/form/form.tpl index 79b0fb9e1..6d1f2cedf 100644 --- a/admin-dev/themes/default/template/controllers/stores/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/stores/helpers/form/form.tpl @@ -55,38 +55,42 @@ {if $key == 'rightCols'} {foreach $field as $input} {if $input.type == 'file'} - -
- -

{$input.desc}

- {if isset($fields_value.image) && $fields_value.image} -
- {$fields_value.image} -

{l s='File size'} {$fields_value.size}kb

- - {l s='Delete'} {l s='Delete'} - -
- {/if} +
+ +
+ +

{$input.desc}

+ {if isset($fields_value.image) && $fields_value.image} +
+ {$fields_value.image} +

{l s='File size'} {$fields_value.size}kb

+ + + {l s='Delete'} + +
+ {/if} +
{/if} - - - - - - - - - - {foreach $fields_value.days as $k => $value} - - - - - {/foreach} -
{l s='Hours:'}
 {l s='e.g. 10:00AM - 9:30PM'}
{$value}
-
+
+ + + + + + + + + {foreach $fields_value.days as $k => $value} + + + + + {/foreach} + +
{l s='Hours:'}{l s='e.g. 10:00AM - 9:30PM'}
{$value}
+
{/foreach} {/if} {/block} diff --git a/controllers/admin/AdminCmsCategoriesController.php b/controllers/admin/AdminCmsCategoriesController.php index d973f22be..16ee2b991 100644 --- a/controllers/admin/AdminCmsCategoriesController.php +++ b/controllers/admin/AdminCmsCategoriesController.php @@ -33,6 +33,7 @@ class AdminCmsCategoriesControllerCore extends AdminController public function __construct() { + $this->bootstrap = true; $this->is_cms = true; $this->table = 'cms_category'; $this->className = 'CMSCategory'; @@ -221,7 +222,7 @@ class AdminCmsCategoriesControllerCore extends AdminController $this->fields_form = array( 'legend' => array( 'title' => $this->l('CMS Category'), - 'image' => '../img/admin/tab-categories.gif' + 'icon' => 'icon-folder-close' ), 'input' => array( array( @@ -230,15 +231,13 @@ class AdminCmsCategoriesControllerCore extends AdminController 'name' => 'name', 'required' => true, 'lang' => true, - 'class' => 'copy2friendlyUrl', - 'hint' => $this->l('Invalid characters:').' <>;=#{}' + 'hint' => $this->l('Invalid characters:').' <>;=#{}' ), array( - 'type' => 'radio', + 'type' => 'switch', 'label' => $this->l('Displayed:'), 'name' => 'active', 'required' => false, - 'class' => 't', 'is_bool' => true, 'values' => array( array( @@ -269,28 +268,28 @@ class AdminCmsCategoriesControllerCore extends AdminController 'lang' => true, 'rows' => 5, 'cols' => 40, - 'hint' => $this->l('Invalid characters:').' <>;=#{}' + 'hint' => $this->l('Invalid characters:').' <>;=#{}' ), array( 'type' => 'text', 'label' => $this->l('Meta title:'), 'name' => 'meta_title', 'lang' => true, - 'hint' => $this->l('Invalid characters:').' <>;=#{}' + 'hint' => $this->l('Invalid characters:').' <>;=#{}' ), array( 'type' => 'text', 'label' => $this->l('Meta description:'), 'name' => 'meta_description', 'lang' => true, - 'hint' => $this->l('Invalid characters:').' <>;=#{}' + 'hint' => $this->l('Invalid characters:').' <>;=#{}' ), array( 'type' => 'text', 'label' => $this->l('Meta keywords:'), 'name' => 'meta_keywords', 'lang' => true, - 'hint' => $this->l('Invalid characters:').' <>;=#{}' + 'hint' => $this->l('Invalid characters:').' <>;=#{}' ), array( 'type' => 'text', @@ -303,7 +302,7 @@ class AdminCmsCategoriesControllerCore extends AdminController ), 'submit' => array( 'title' => $this->l('Save'), - 'class' => 'button' + 'class' => 'btn btn-primary' ) ); $this->tpl_form_vars['PS_ALLOW_ACCENTED_CHARS_URL'] = (int)Configuration::get('PS_ALLOW_ACCENTED_CHARS_URL'); diff --git a/controllers/admin/AdminCmsController.php b/controllers/admin/AdminCmsController.php index c46c61b88..e34e1cda0 100644 --- a/controllers/admin/AdminCmsController.php +++ b/controllers/admin/AdminCmsController.php @@ -34,6 +34,7 @@ class AdminCmsControllerCore extends AdminController public function __construct() { + $this->bootstrap = true; $this->table = 'cms'; $this->className = 'CMS'; $this->lang = true; @@ -94,7 +95,7 @@ class AdminCmsControllerCore extends AdminController 'tinymce' => true, 'legend' => array( 'title' => $this->l('CMS Page'), - 'image' => '../img/admin/tab-categories.gif' + 'icon' => 'icon-folder-close' ), 'input' => array( // custom template @@ -113,26 +114,24 @@ class AdminCmsControllerCore extends AdminController 'id' => 'name', // for copy2friendlyUrl compatibility 'lang' => true, 'required' => true, - 'class' => 'copy2friendlyUrl', - 'hint' => $this->l('Invalid characters:').' <>;=#{}', - 'size' => 50 + 'hint' => $this->l('Invalid characters:').' <>;=#{}' ), array( 'type' => 'text', 'label' => $this->l('Meta description'), 'name' => 'meta_description', 'lang' => true, - 'hint' => $this->l('Invalid characters:').' <>;=#{}', - 'size' => 70 + 'hint' => $this->l('Invalid characters:').' <>;=#{}' ), array( 'type' => 'tags', 'label' => $this->l('Meta keywords'), 'name' => 'meta_keywords', 'lang' => true, - 'hint' => $this->l('Invalid characters:').' <>;=#{}', - 'size' => 70, - 'desc' => $this->l('To add "tags" click in the field, write something, and then press "Enter."') + 'hint' => array( + $this->l('Invalid characters:').' <>;=#{}', + $this->l('To add "tags" click in the field, write something, and then press "Enter."') + ) ), array( 'type' => 'text', @@ -153,11 +152,10 @@ class AdminCmsControllerCore extends AdminController 'hint' => $this->l('Invalid characters:').' <>;=#{}' ), array( - 'type' => 'radio', + 'type' => 'switch', 'label' => $this->l('Displayed:'), 'name' => 'active', 'required' => false, - 'class' => 't', 'is_bool' => true, 'values' => array( array( @@ -175,7 +173,7 @@ class AdminCmsControllerCore extends AdminController ), 'submit' => array( 'title' => $this->l('Save'), - 'class' => 'button' + 'class' => 'btn btn-primary' ) ); diff --git a/controllers/admin/AdminGeolocationController.php b/controllers/admin/AdminGeolocationController.php index b85e2481b..edb6bb68b 100755 --- a/controllers/admin/AdminGeolocationController.php +++ b/controllers/admin/AdminGeolocationController.php @@ -30,6 +30,7 @@ class AdminGeolocationControllerCore extends AdminController { parent::__construct(); + $this->bootstrap = true; $this->fields_options = array( 'geolocationConfiguration' => array( 'title' => $this->l('Geolocation by IP address'), @@ -37,7 +38,7 @@ class AdminGeolocationControllerCore extends AdminController 'fields' => array( 'PS_GEOLOCATION_ENABLED' => array( 'title' => $this->l('Geolocation by IP address'), - 'desc' => $this->l('This option allows you, among other things, to restrict access to your shop for certain countries. See below.'), + 'hint' => $this->l('This option allows you, among other things, to restrict access to your shop for certain countries. See below.'), 'validation' => 'isUnsignedId', 'cast' => 'intval', 'type' => 'bool' diff --git a/controllers/admin/AdminImagesController.php b/controllers/admin/AdminImagesController.php index ebfbf5899..d9ca7a8c1 100644 --- a/controllers/admin/AdminImagesController.php +++ b/controllers/admin/AdminImagesController.php @@ -74,7 +74,7 @@ class AdminImagesControllerCore extends AdminController ), 'PS_JPEG_QUALITY' => array( 'title' => $this->l('JPEG quality'), - 'desc' => $this->l('Ranges from 0 (worst quality, smallest file) to 100 (best quality, biggest file).'), + 'hint' => $this->l('Ranges from 0 (worst quality, smallest file) to 100 (best quality, biggest file).'), 'validation' => 'isUnsignedId', 'required' => true, 'cast' => 'intval', @@ -82,7 +82,7 @@ class AdminImagesControllerCore extends AdminController ), 'PS_PNG_QUALITY' => array( 'title' => $this->l('PNG quality'), - 'desc' => $this->l('Ranges from 9 (worst quality, smallest file) to 0 (best quality, biggest file).'), + 'hint' => $this->l('Ranges from 9 (worst quality, smallest file) to 0 (best quality, biggest file).'), 'validation' => 'isUnsignedId', 'required' => true, 'cast' => 'intval', @@ -119,7 +119,7 @@ class AdminImagesControllerCore extends AdminController ), 'PS_PRODUCT_PICTURE_MAX_SIZE' => array( 'title' => $this->l('Maximum size of product pictures'), - 'desc' => $this->l('The maximum size of pictures uploadable by customers (in Bytes).'), + 'hint' => $this->l('The maximum size of pictures uploadable by customers (in Bytes).'), 'validation' => 'isUnsignedInt', 'required' => true, 'cast' => 'intval', @@ -129,7 +129,7 @@ class AdminImagesControllerCore extends AdminController ), 'PS_PRODUCT_PICTURE_WIDTH' => array( 'title' => $this->l('Product picture width'), - 'desc' => $this->l('The maximum width of pictures uploadable by customers.'), + 'hint' => $this->l('The maximum width of pictures uploadable by customers.'), 'validation' => 'isUnsignedInt', 'required' => true, 'cast' => 'intval', @@ -139,7 +139,7 @@ class AdminImagesControllerCore extends AdminController ), 'PS_PRODUCT_PICTURE_HEIGHT' => array( 'title' => $this->l('Product picture height'), - 'desc' => $this->l('The maximum height of pictures uploadable by customers.'), + 'hint' => $this->l('The maximum height of pictures uploadable by customers.'), 'validation' => 'isUnsignedInt', 'required' => true, 'cast' => 'intval', @@ -155,7 +155,7 @@ class AdminImagesControllerCore extends AdminController if ($this->display_move) $this->fields_options['product_images']['fields']['PS_LEGACY_IMAGES'] = array( 'title' => $this->l('Use the legacy image filesystem'), - 'desc' => $this->l('This should be set to yes unless you successfully moved images in "Images" page under the "Preferences" menu.'), + 'hint' => $this->l('This should be set to yes unless you successfully moved images in "Images" page under the "Preferences" menu.'), 'validation' => 'isBool', 'cast' => 'intval', 'required' => false, @@ -166,7 +166,7 @@ class AdminImagesControllerCore extends AdminController $this->fields_form = array( 'legend' => array( 'title' => $this->l('images'), - 'image' => '../img/admin/picture.gif' + 'icon' => 'icon-picture' ), 'input' => array( array( @@ -174,7 +174,7 @@ class AdminImagesControllerCore extends AdminController 'label' => $this->l('Type name'), 'name' => 'name', 'required' => true, - 'desc' => $this->l('Letters and hyphens only (e.g. small, medium, large, extra-large)') + 'hint' => $this->l('Letters and hyphens only (e.g. small, medium, large, extra-large)') ), array( 'type' => 'text', @@ -182,7 +182,7 @@ class AdminImagesControllerCore extends AdminController 'name' => 'width', 'required' => true, 'maxlength' => 5, - 'desc' => $this->l('Maximum image width in pixels') + 'hint' => $this->l('Maximum image width in pixels') ), array( 'type' => 'text', @@ -190,16 +190,15 @@ class AdminImagesControllerCore extends AdminController 'name' => 'height', 'required' => true, 'maxlength' => 5, - 'desc' => $this->l('Maximum image height in pixels') + 'hint' => $this->l('Maximum image height in pixels') ), array( - 'type' => 'radio', + 'type' => 'switch', 'label' => $this->l('Products'), 'name' => 'products', 'required' => false, - 'class' => 't', 'is_bool' => true, - 'desc' => $this->l('This type will be used for Product images'), + 'hint' => $this->l('This type will be used for Product images'), 'values' => array( array( 'id' => 'products_on', @@ -214,13 +213,13 @@ class AdminImagesControllerCore extends AdminController ) ), array( - 'type' => 'radio', + 'type' => 'switch', 'label' => $this->l('Categories'), 'name' => 'categories', 'required' => false, 'class' => 't', 'is_bool' => true, - 'desc' => $this->l('This type will be applied to Category images.'), + 'hint' => $this->l('This type will be applied to Category images.'), 'values' => array( array( 'id' => 'categories_on', @@ -235,13 +234,12 @@ class AdminImagesControllerCore extends AdminController ) ), array( - 'type' => 'radio', + 'type' => 'switch', 'label' => $this->l('Manufacturers'), 'name' => 'manufacturers', 'required' => false, - 'class' => 't', 'is_bool' => true, - 'desc' => $this->l('This type will be applied to Manufacturer images.'), + 'hint' => $this->l('This type will be applied to Manufacturer images.'), 'values' => array( array( 'id' => 'manufacturers_on', @@ -256,13 +254,12 @@ class AdminImagesControllerCore extends AdminController ) ), array( - 'type' => 'radio', + 'type' => 'switch', 'label' => $this->l('Suppliers'), 'name' => 'suppliers', 'required' => false, - 'class' => 't', 'is_bool' => true, - 'desc' => $this->l('This type will be used for Supplier images.'), + 'hint' => $this->l('This type will be used for Supplier images.'), 'values' => array( array( 'id' => 'suppliers_on', @@ -277,13 +274,13 @@ class AdminImagesControllerCore extends AdminController ) ), array( - 'type' => 'radio', + 'type' => 'switch', 'label' => $this->l('Scenes'), 'name' => 'scenes', 'required' => false, 'class' => 't', 'is_bool' => true, - 'desc' => $this->l('This type will be used for Scene images.'), + 'hint' => $this->l('This type will be used for Scene images.'), 'values' => array( array( 'id' => 'scenes_on', @@ -298,13 +295,12 @@ class AdminImagesControllerCore extends AdminController ) ), array( - 'type' => 'radio', + 'type' => 'switch', 'label' => $this->l('Stores'), 'name' => 'stores', 'required' => false, - 'class' => 't', 'is_bool' => true, - 'desc' => $this->l('This type will be used for Store images.'), + 'hint' => $this->l('This type will be used for Store images.'), 'values' => array( array( 'id' => 'stores_on', @@ -320,8 +316,8 @@ class AdminImagesControllerCore extends AdminController ), ), 'submit' => array( - 'title' => $this->l('Save '), - 'class' => 'button' + 'title' => $this->l('Save'), + 'class' => 'btn btn-primary' ) ); diff --git a/controllers/admin/AdminMaintenanceController.php b/controllers/admin/AdminMaintenanceController.php index 687880ebd..cf4208b40 100644 --- a/controllers/admin/AdminMaintenanceController.php +++ b/controllers/admin/AdminMaintenanceController.php @@ -28,6 +28,7 @@ class AdminMaintenanceControllerCore extends AdminController { public function __construct() { + $this->bootstrap = true; $this->className = 'Configuration'; $this->table = 'configuration'; @@ -40,21 +41,20 @@ class AdminMaintenanceControllerCore extends AdminController 'fields' => array( 'PS_SHOP_ENABLE' => array( 'title' => $this->l('Enable Shop'), - 'desc' => $this->l('Activate or deactivate your shop (It is a good idea to deactivate your shop while you perform maintenance. Please note that the webservice will not be disabled).'), + 'hint' => $this->l('Activate or deactivate your shop (It is a good idea to deactivate your shop while you perform maintenance. Please note that the webservice will not be disabled).'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool' ), 'PS_MAINTENANCE_IP' => array( 'title' => $this->l('Maintenance IP'), - 'desc' => $this->l('IP addresses allowed to access the Front Office even if the shop is disabled. Please use a comma to separate them (e.g. 42.24.4.2,127.0.0.1,99.98.97.96)'), + 'hint' => $this->l('IP addresses allowed to access the Front Office even if the shop is disabled. Please use a comma to separate them (e.g. 42.24.4.2,127.0.0.1,99.98.97.96)'), 'validation' => 'isGenericName', 'type' => 'maintenance_ip', - 'size' => 30, 'default' => '' ), ), - 'submit' => array('title' => $this->l('Save'), 'class' => 'button'), + 'submit' => array('title' => $this->l('Save'), 'class' => 'btn btn-default'), ), ); } diff --git a/controllers/admin/AdminSearchConfController.php b/controllers/admin/AdminSearchConfController.php index fa63f3b4c..753d44311 100644 --- a/controllers/admin/AdminSearchConfController.php +++ b/controllers/admin/AdminSearchConfController.php @@ -30,6 +30,7 @@ class AdminSearchConfControllerCore extends AdminController public function __construct() { + $this->bootstrap = true; $this->table = 'alias'; $this->className = 'Alias'; $this->lang = false; @@ -64,13 +65,13 @@ class AdminSearchConfControllerCore extends AdminController 'icon' => 'search', 'info' => $this->l('The "indexed" products have been analyzed by PrestaShop and will appear in the results of a Front Office search.').'
- '.$this->l('Indexed products').' '.(int)$indexed.' / '.(int)$total.'. + '.$this->l('Indexed products').' '.(int)$indexed.' / '.(int)$total.'.

'.$this->l('Building the product index may take a few minutes.') .$this->l('If your server stops before the process ends, you can resume the indexation by clicking "Add missing products."').'

-> '. $this->l('Add missing products to the index.').'
- -> '. + -> '. $this->l('Re-build the entire index.').'

'.$this->l('You can set a cron job that will rebuild your index using the following URL:').' '.$cron_url.'', 'fields' => array( @@ -92,28 +93,32 @@ class AdminSearchConfControllerCore extends AdminController 'validation' => 'isBool', 'type' => 'bool', 'cast' => 'intval', - 'desc' => $this->l('Enable ajax search for your visitors.').'
'. - $this->l('With ajax search, the first 10 products matching the user query will appear in real time below the input field.')), + 'hint' => array( + $this->l('Enable ajax search for your visitors.'), + $this->l('With ajax search, the first 10 products matching the user query will appear in real time below the input field.') + ) + ), 'PS_INSTANT_SEARCH' => array( 'title' => $this->l('Instant search'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool', - 'desc' => $this->l('Enable instant search for your visitors?').'
'. - $this->l('With instant search, the results will appear immediately as the user writes a query.')), + 'hint' => array( + $this->l('Enable instant search for your visitors?'), + $this->l('With instant search, the results will appear immediately as the user writes a query.') + ) + ), 'PS_SEARCH_MINWORDLEN' => array( 'title' => $this->l('Minimum word length (in characters)'), - 'desc' => $this->l('Only words this size or larger will be indexed.'), - 'size' => 4, + 'hint' => $this->l('Only words this size or larger will be indexed.'), 'validation' => 'isUnsignedInt', 'type' => 'text', 'cast' => 'intval' ), 'PS_SEARCH_BLACKLIST' => array( 'title' => $this->l('Blacklisted words'), - 'size' => 35, 'validation' => 'isGenericName', - 'desc' => $this->l('Please enter the index words separated by a "|".'), + 'hint' => $this->l('Please enter the index words separated by a "|".'), 'type' => 'textLang' ) ), @@ -129,63 +134,54 @@ class AdminSearchConfControllerCore extends AdminController 'fields' => array( 'PS_SEARCH_WEIGHT_PNAME' => array( 'title' => $this->l('Product name weight'), - 'size' => 4, 'validation' => 'isUnsignedInt', 'type' => 'text', 'cast' => 'intval' ), 'PS_SEARCH_WEIGHT_REF' => array( 'title' => $this->l('Reference weight'), - 'size' => 4, 'validation' => 'isUnsignedInt', 'type' => 'text', 'cast' => 'intval' ), 'PS_SEARCH_WEIGHT_SHORTDESC' => array( 'title' => $this->l('Short description weight'), - 'size' => 4, 'validation' => 'isUnsignedInt', 'type' => 'text', 'cast' => 'intval' ), 'PS_SEARCH_WEIGHT_DESC' => array( 'title' => $this->l('Description weight'), - 'size' => 4, 'validation' => 'isUnsignedInt', 'type' => 'text', 'cast' => 'intval' ), 'PS_SEARCH_WEIGHT_CNAME' => array( 'title' => $this->l('Category weight'), - 'size' => 4, 'validation' => 'isUnsignedInt', 'type' => 'text', 'cast' => 'intval' ), 'PS_SEARCH_WEIGHT_MNAME' => array( 'title' => $this->l('Manufacturer weight'), - 'size' => 4, 'validation' => 'isUnsignedInt', 'type' => 'text', 'cast' => 'intval' ), 'PS_SEARCH_WEIGHT_TAG' => array( 'title' => $this->l('Tags weight'), - 'size' => 4, 'validation' => 'isUnsignedInt', 'type' => 'text', 'cast' => 'intval' ), 'PS_SEARCH_WEIGHT_ATTRIBUTE' => array( 'title' => $this->l('Attributes weight'), - 'size' => 4, 'validation' => 'isUnsignedInt', 'type' => 'text', 'cast' => 'intval' ), 'PS_SEARCH_WEIGHT_FEATURE' => array( 'title' => $this->l('Features weight'), - 'size' => 4, 'validation' => 'isUnsignedInt', 'type' => 'text', 'cast' => 'intval' @@ -230,32 +226,30 @@ class AdminSearchConfControllerCore extends AdminController $this->fields_form = array( 'legend' => array( 'title' => $this->l('Aliases'), - 'image' => '../img/admin/search.gif' + 'icon' => 'icon-search' ), 'input' => array( array( 'type' => 'text', 'label' => $this->l('Alias:'), 'name' => 'alias', - 'size' => 40, 'required' => true, - 'desc' => array( + 'hint' => array( $this->l('Enter each alias separated by a comma (e.g. \'prestshop,preztashop,prestasohp\')'), - $this->l('Forbidden characters: <>;=#{}') + $this->l('Forbidden characters: <>;=#{}') ) ), array( 'type' => 'text', 'label' => $this->l('Result:'), 'name' => 'search', - 'size' => 15, 'required' => true, - 'desc' => $this->l('Search this word instead.') + 'hint' => $this->l('Search this word instead.') ) ), 'submit' => array( 'title' => $this->l('Save'), - 'class' => 'button' + 'class' => 'btn btn-default' ) ); diff --git a/controllers/admin/AdminStoresController.php b/controllers/admin/AdminStoresController.php index ec9175901..4e7092bfb 100644 --- a/controllers/admin/AdminStoresController.php +++ b/controllers/admin/AdminStoresController.php @@ -28,6 +28,7 @@ class AdminStoresControllerCore extends AdminController { public function __construct() { + $this->bootstrap = true; $this->table = 'store'; $this->className = 'Store'; $this->lang = false; @@ -68,32 +69,32 @@ class AdminStoresControllerCore extends AdminController 'fields' => array( 'PS_STORES_DISPLAY_FOOTER' => array( 'title' => $this->l('Display in the footer'), - 'desc' => $this->l('Display a link to the store locator in the footer'), + 'hint' => $this->l('Display a link to the store locator in the footer'), 'cast' => 'intval', 'type' => 'bool' ), 'PS_STORES_DISPLAY_SITEMAP' => array( 'title' => $this->l('Display in the sitemap page'), - 'desc' => $this->l('Display a link to the store locator in the sitemap page'), + 'hint' => $this->l('Display a link to the store locator in the sitemap page'), 'cast' => 'intval', 'type' => 'bool' ), 'PS_STORES_SIMPLIFIED' => array( 'title' => $this->l('Show a simplified store locator'), - 'desc' => $this->l('No map, no search, only a store directory'), + 'hint' => $this->l('No map, no search, only a store directory'), 'cast' => 'intval', 'type' => 'bool' ), 'PS_STORES_CENTER_LAT' => array( 'title' => $this->l('Latitude by default'), - 'desc' => $this->l('Used for the position by default of the map'), + 'hint' => $this->l('Used for the position by default of the map'), 'cast' => 'floatval', 'type' => 'text', 'size' => '10' ), 'PS_STORES_CENTER_LONG' => array( 'title' => $this->l('Longitude by default'), - 'desc' => $this->l('Used for the position by default of the map'), + 'hint' => $this->l('Used for the position by default of the map'), 'cast' => 'floatval', 'type' => 'text', 'size' => '10' @@ -153,43 +154,40 @@ class AdminStoresControllerCore extends AdminController $this->fields_form = array( 'legend' => array( 'title' => $this->l('Stores'), - 'image' => '../img/admin/home.gif' + 'icon' => 'icon-home' ), 'input' => array( array( 'type' => 'text', 'label' => $this->l('Name'), 'name' => 'name', - 'size' => 33, 'required' => false, - 'hint' => sprintf($this->l('Allowed characters: letters, spaces and %s'), '().-'), - 'desc' => $this->l('Store name (e.g. City Center Mall Store)') + 'hint' => array( + $this->l('Allowed characters: letters, spaces and %s'), '().-', + $this->l('Store name (e.g. City Center Mall Store)') + ) ), array( 'type' => 'text', 'label' => $this->l('Address'), 'name' => 'address1', - 'size' => 33, 'required' => true ), array( 'type' => 'text', 'label' => $this->l('Address (2)'), - 'name' => 'address2', - 'size' => 33 + 'name' => 'address2' ), array( 'type' => 'text', 'label' => $this->l('Postal Code/Zip Code'), 'name' => 'postcode', - 'size' => 6, 'required' => true ), array( 'type' => 'text', 'label' => $this->l('City'), 'name' => 'city', - 'size' => 33, 'required' => true ), array( @@ -220,27 +218,23 @@ class AdminStoresControllerCore extends AdminController 'label' => $this->l('Latitude / Longitude'), 'name' => 'latitude', 'required' => true, - 'size' => 11, 'maxlength' => 12, - 'desc' => $this->l('Store coordinates (e.g. 45.265469/-47.226478)') + 'hint' => $this->l('Store coordinates (e.g. 45.265469/-47.226478)') ), array( 'type' => 'text', 'label' => $this->l('Phone'), - 'name' => 'phone', - 'size' => 33 + 'name' => 'phone' ), array( 'type' => 'text', 'label' => $this->l('Fax'), - 'name' => 'fax', - 'size' => 33 + 'name' => 'fax' ), array( 'type' => 'text', 'label' => $this->l('Email address'), - 'name' => 'email', - 'size' => 33 + 'name' => 'email' ), array( 'type' => 'textarea', @@ -250,11 +244,10 @@ class AdminStoresControllerCore extends AdminController 'rows' => 4 ), array( - 'type' => 'radio', + 'type' => 'switch', 'label' => $this->l('Status'), 'name' => 'active', 'required' => false, - 'class' => 't', 'is_bool' => true, 'values' => array( array( @@ -268,7 +261,7 @@ class AdminStoresControllerCore extends AdminController 'label' => $this->l('Disabled') ) ), - 'desc' => $this->l('Whether or not to display this store') + 'hint' => $this->l('Whether or not to display this store') ) ), 'rightCols' => array ( @@ -276,12 +269,12 @@ class AdminStoresControllerCore extends AdminController 'type' => 'file', 'label' => $this->l('Picture'), 'name' => 'image', - 'desc' => $this->l('Storefront picture') + 'hint' => $this->l('Storefront picture') ) ), 'submit' => array( 'title' => $this->l(' Save '), - 'class' => 'button' + 'class' => 'btn btn-default' ) ); @@ -413,24 +406,21 @@ class AdminStoresControllerCore extends AdminController $formFields = array( 'PS_SHOP_NAME' => array( 'title' => $this->l('Shop name'), - 'desc' => $this->l('Displayed in emails and page titles'), + 'hint' => $this->l('Displayed in emails and page titles'), 'validation' => 'isGenericName', 'required' => true, - 'size' => 30, 'type' => 'text' ), 'PS_SHOP_EMAIL' => array('title' => $this->l('Shop email'), - 'desc' => $this->l('Displayed in emails sent to customers'), + 'hint' => $this->l('Displayed in emails 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)'), + 'hint' => $this->l('Shop registration information (e.g. SIRET or RCS)'), 'validation' => 'isGenericName', - 'size' => 30, 'type' => 'textarea', 'cols' => 30, 'rows' => 5 @@ -438,25 +428,21 @@ class AdminStoresControllerCore extends AdminController 'PS_SHOP_ADDR1' => array( 'title' => $this->l('Shop address line 1'), 'validation' => 'isAddress', - 'size' => 30, 'type' => 'text' ), 'PS_SHOP_ADDR2' => array( 'title' => $this->l('Shop address line 2'), 'validation' => 'isAddress', - 'size' => 30, 'type' => 'text' ), 'PS_SHOP_CODE' => array( 'title' => $this->l('Postal Code/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( @@ -479,13 +465,11 @@ class AdminStoresControllerCore extends AdminController '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' ), );