diff --git a/admin-dev/themes/default/template/controllers/localization/content.tpl b/admin-dev/themes/default/template/controllers/localization/content.tpl index 3fefc850d..c4246f870 100644 --- a/admin-dev/themes/default/template/controllers/localization/content.tpl +++ b/admin-dev/themes/default/template/controllers/localization/content.tpl @@ -23,10 +23,7 @@ * International Registered Trademark & Property of PrestaShop SA *} -
- {$localization_form} -
-
-
- {$localization_options} -
\ No newline at end of file + +{$localization_form} + +{$localization_options} diff --git a/admin-dev/themes/default/template/controllers/tax_rules/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/tax_rules/helpers/form/form.tpl index 2d5db9490..0bffd8be6 100644 --- a/admin-dev/themes/default/template/controllers/tax_rules/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/tax_rules/helpers/form/form.tpl @@ -26,9 +26,9 @@ {block name="label"} {if $input.name == 'zipcode' && isset($input.label)} - + {elseif $input.name == 'states[]'} - + {else} {$smarty.block.parent} {/if} diff --git a/admin-dev/themes/default/template/controllers/tax_rules/helpers/list/list_action_edit.tpl b/admin-dev/themes/default/template/controllers/tax_rules/helpers/list/list_action_edit.tpl index fb8803e5a..78623998b 100644 --- a/admin-dev/themes/default/template/controllers/tax_rules/helpers/list/list_action_edit.tpl +++ b/admin-dev/themes/default/template/controllers/tax_rules/helpers/list/list_action_edit.tpl @@ -22,4 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} -{$action} \ No newline at end of file + + + {$action} + \ No newline at end of file diff --git a/admin-dev/themes/default/template/controllers/tax_rules/helpers/list/list_content.tpl b/admin-dev/themes/default/template/controllers/tax_rules/helpers/list/list_content.tpl index 69d61175d..1799c9aaf 100644 --- a/admin-dev/themes/default/template/controllers/tax_rules/helpers/list/list_content.tpl +++ b/admin-dev/themes/default/template/controllers/tax_rules/helpers/list/list_content.tpl @@ -22,110 +22,109 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - -{foreach $list AS $index => $tr} - - - {if $bulk_actions} - {assign var=bulkActionPossible value=true} - {foreach $list_skip_actions as $key => $value} - {if in_array($tr.$identifier, $value) == true} - {assign var=bulkActionPossible value=false} + + {foreach $list AS $index => $tr} + + + {if $bulk_actions} + {assign var=bulkActionPossible value=true} + {foreach $list_skip_actions as $key => $value} + {if in_array($tr.$identifier, $value) == true} + {assign var=bulkActionPossible value=false} + {/if} + {/foreach} + {if $bulkActionPossible == true} + + {/if} {/if} - {/foreach} - {if $bulkActionPossible == true} - - {/if} - {/if} - - {foreach $fields_display AS $key => $params} - + {foreach $fields_display AS $key => $params} + {if isset($params.prefix)}{$params.prefix}{/if} - {else} - > - {/if} - {if isset($params.active)} - {$tr.$key} - {elseif isset($params.activeVisu)} - {if $tr.$key}{l s='Enabled'}{else}{l s='Disabled'}{/if} - {elseif isset($params.position)} - {if $order_by == 'position' && $order_way != 'DESC'} - - {l s='Down'} - - - - {l s='Up'} - - {else} - {$tr.$key.position + 1} - {/if} - {elseif isset($params.image)} - {$tr.$key} - {elseif (isset($params.icon))} - {$tr[$key]} - {elseif isset($params.price)} - {$tr.$key} - {elseif isset($params.float)} - {$tr.$key} - {elseif isset($params.type) && $params.type == 'date'} - {$tr.$key} - {elseif isset($params.type) && $params.type == 'datetime'} - {$tr.$key} - {elseif isset($params.callback)} - {$tr.$key} - {elseif isset($tr.$key)} - {if $key == 'behavior'} - {if $tr.$key == 0} - {l s='This tax only'} - {elseif $tr.$key == 1} - {l s='Compute with others'} - {elseif $tr.$key == 2} - {l s='One after another'} - {/if} - {elseif $key == 'rate'} - {$tr.$key|string_format:"%.2f"}% - {elseif $key == 'zipcode'} - {if $tr.$key == '0 - 0'} - -- + {if (!isset($params.position) && !$no_link)} + onclick="document.location = '{$current_index}&{$identifier}={$tr.$identifier}{if $view}&view{else}&update{/if}{$table}&token={$token}'">{if isset($params.prefix)}{$params.prefix}{/if} {else} - {$tr.$key|escape:'htmlall':'UTF-8'} + > {/if} - {else} - {$tr.$key|escape:'htmlall':'UTF-8'} - {/if} - {else} - -- - {/if} - {if isset($params.suffix)}{$params.suffix}{/if} - - {/foreach} + {if isset($params.active)} + {$tr.$key} + {elseif isset($params.activeVisu)} + {if $tr.$key}{l s='Enabled'}{else}{l s='Disabled'}{/if} + {elseif isset($params.position)} + {if $order_by == 'position' && $order_way != 'DESC'} + + {l s='Down'} + - {if $shop_link_type} - {if isset($tr.shop_short_name)}{$tr.shop_short_name}{else}{$tr.shop_name}{/if} - {/if} - {if $has_actions} - - {foreach $actions AS $action} - {if isset($tr.$action)} - {$tr.$action} - {/if} - {/foreach} - - {/if} - -{/foreach} - \ No newline at end of file + + {l s='Up'} + + {else} + {$tr.$key.position + 1} + {/if} + {elseif isset($params.image)} + {$tr.$key} + {elseif (isset($params.icon))} + {$tr[$key]} + {elseif isset($params.price)} + {$tr.$key} + {elseif isset($params.float)} + {$tr.$key} + {elseif isset($params.type) && $params.type == 'date'} + {$tr.$key} + {elseif isset($params.type) && $params.type == 'datetime'} + {$tr.$key} + {elseif isset($params.callback)} + {$tr.$key} + {elseif isset($tr.$key)} + {if $key == 'behavior'} + {if $tr.$key == 0} + {l s='This tax only'} + {elseif $tr.$key == 1} + {l s='Compute with others'} + {elseif $tr.$key == 2} + {l s='One after another'} + {/if} + {elseif $key == 'rate'} + {$tr.$key|string_format:"%.2f"}% + {elseif $key == 'zipcode'} + {if $tr.$key == '0 - 0'} + -- + {else} + {$tr.$key|escape:'htmlall':'UTF-8'} + {/if} + {else} + {$tr.$key|escape:'htmlall':'UTF-8'} + {/if} + {else} + -- + {/if} + {if isset($params.suffix)}{$params.suffix}{/if} + + {/foreach} + + {if $shop_link_type} + {if isset($tr.shop_short_name)}{$tr.shop_short_name}{else}{$tr.shop_name}{/if} + {/if} + {if $has_actions} + + {foreach $actions AS $action} + {if isset($tr.$action)} + {$tr.$action} + {/if} + {/foreach} + + {/if} + + {/foreach} + diff --git a/admin-dev/themes/default/template/controllers/tax_rules/helpers/list/list_header.tpl b/admin-dev/themes/default/template/controllers/tax_rules/helpers/list/list_header.tpl index a4e817067..c4476d721 100644 --- a/admin-dev/themes/default/template/controllers/tax_rules/helpers/list/list_header.tpl +++ b/admin-dev/themes/default/template/controllers/tax_rules/helpers/list/list_header.tpl @@ -33,81 +33,45 @@ {/if}
- - - - - - -
- - {if $page > 1} -   - - {/if} - {l s='Page'} {$page} / {$total_pages} - {if $page < $total_pages} -   - - {/if} - | {l s='Display'} - - / {$list_total} {l s='result(s)'} - - - - - -
- - +
+ +
+ + {foreach $fields_display AS $key => $params} + + {/foreach} + {if $shop_link_type} + + {/if} + {if $has_actions} + + {/if} + + + {foreach $fields_display AS $key => $params} - + {/foreach} {if $shop_link_type} - + {/if} {if $has_actions} - + {/if} - - - - {foreach $fields_display AS $key => $params} - - {/foreach} - {if $shop_link_type} - - {/if} - {if $has_actions} - - {/if} - - + + diff --git a/admin-dev/themes/default/template/controllers/translations/helpers/view/main.tpl b/admin-dev/themes/default/template/controllers/translations/helpers/view/main.tpl index 7357e7455..97bc4921b 100644 --- a/admin-dev/themes/default/template/controllers/translations/helpers/view/main.tpl +++ b/admin-dev/themes/default/template/controllers/translations/helpers/view/main.tpl @@ -60,39 +60,78 @@ }); -
- {l s='Modify translations'} - {l s='Here you can modify translations for every line of code inside PrestaShop.'}
- {l s='First, select a section (such as Back Office or Installed modules), and then click the flag representing the language you want to edit.'}

- + +
+

+ + {l s='Modify translations'} +

+

+ {l s='Here you can modify translations for every line of code inside PrestaShop.'}
+ {l s='First, select a section (such as Back Office or Installed modules), and then click the flag representing the language you want to edit.'} +

- + {foreach $translations_type as $type => $array} + + {/foreach} + + + +
+ +
+ +
+
+ {* TO DO - ajouter la langue*} + {*
+ {foreach from=$languages item=language} +
+
+ + +
+
{/foreach} - - - {foreach $languages as $language} - - {$language['iso_code']} - - {/foreach} - - -
- -

{l s='Translation exchange'}

+ + +
+
- - {l s='Add / Update a language'} - +

+ + {l s='Add / Update a language'} +

{l s='You can add or update a language directly from the PrestaShop website here:'}

diff --git a/controllers/admin/AdminCountriesController.php b/controllers/admin/AdminCountriesController.php index dcd4f7c0a..46cb65737 100644 --- a/controllers/admin/AdminCountriesController.php +++ b/controllers/admin/AdminCountriesController.php @@ -28,6 +28,7 @@ class AdminCountriesControllerCore extends AdminController { public function __construct() { + $this->bootstrap = true; $this->table = 'country'; $this->className = 'Country'; $this->lang = true; @@ -68,28 +69,23 @@ class AdminCountriesControllerCore extends AdminController $this->fields_list = array( 'id_country' => array( 'title' => $this->l('ID'), - 'align' => 'center', - 'width' => 25 + 'align' => 'center' ), 'name' => array( 'title' => $this->l('Country'), - 'width' => 'auto', 'filter_key' => 'b!name' ), 'iso_code' => array( 'title' => $this->l('ISO code'), - 'width' => 70, 'align' => 'center' ), 'call_prefix' => array( 'title' => $this->l('Call prefix'), - 'width' => 150, 'align' => 'center', 'callback' => 'displayCallPrefix' ), 'zone' => array( 'title' => $this->l('Zone'), - 'width' => 100, 'filter_key' => 'z!name' ), 'active' => array( @@ -98,8 +94,7 @@ class AdminCountriesControllerCore extends AdminController 'active' => 'status', 'type' => 'bool', 'orderby' => false, - 'filter_key' => 'a!active', - 'width' => 25 + 'filter_key' => 'a!active' ) ); @@ -153,7 +148,7 @@ class AdminCountriesControllerCore extends AdminController $this->fields_form = array( 'legend' => array( 'title' => $this->l('Countries'), - 'image' => '../img/admin/world.gif' + 'icon' => 'icon-globe' ), 'input' => array( array( @@ -161,33 +156,31 @@ class AdminCountriesControllerCore extends AdminController 'label' => $this->l('Country:'), 'name' => 'name', 'lang' => true, - 'size' => 30, 'required' => true, - 'hint' => $this->l('Invalid characters:').' <>;=#{}', - 'desc' => $this->l('Country name') + 'hint' => $this->l('Country name').' - '.$this->l('Invalid characters:'). ' <>;=#{} ' ), array( 'type' => 'text', 'label' => $this->l('ISO code:'), 'name' => 'iso_code', - 'size' => 4, 'maxlength' => 3, 'class' => 'uppercase', 'required' => true, - 'desc' => $this->l('Two -- or three -- letter ISO code (e.g. U.S. for United States)').'. + 'hint' => $this->l('Two -- or three -- letter ISO code (e.g. U.S. for United States)') + /* TO DO - ajouter les liens dans le hint ? */ + /*'desc' => $this->l('Two -- or three -- letter ISO code (e.g. U.S. for United States)').'. '. $this->l('Official list here').' - .' + .'*/ ), array( 'type' => 'text', 'label' => $this->l('Call prefix:'), 'name' => 'call_prefix', - 'size' => 4, 'maxlength' => 3, 'class' => 'uppercase', 'required' => true, - 'desc' => $this->l('International call prefix, (e.g. 1 for United States)') + 'hint' => $this->l('International call prefix, (e.g. 1 for United States)') ), array( 'type' => 'select', @@ -212,14 +205,13 @@ class AdminCountriesControllerCore extends AdminController 'id' => 'id_zone', 'name' => 'name' ), - 'desc' => $this->l('Geographical region') + 'hint' => $this->l('Geographical region') ), array( - 'type' => 'radio', + 'type' => 'switch', 'label' => $this->l('Need zip/postal code:'), 'name' => 'need_zip_code', 'required' => false, - 'class' => 't', 'is_bool' => true, 'values' => array( array( @@ -238,9 +230,8 @@ class AdminCountriesControllerCore extends AdminController 'type' => 'text', 'label' => $this->l('Zip/post code format:'), 'name' => 'zip_code_format', - 'class' => 'uppercase', 'required' => true, - 'desc' => $this->l('Zip Code format (L for a letter, N for a number and C for the ISO code). For example, NNNNN for the United States. No verification if undefined.') + 'hint' => $this->l('Zip Code format (L for a letter, N for a number and C for the ISO code). For example, NNNNN for the United States. No verification if undefined.') ), array( 'type' => 'address_layout', @@ -252,11 +243,10 @@ class AdminCountriesControllerCore extends AdminController 'display_valid_fields' => $this->displayValidFields() ), array( - 'type' => 'radio', + 'type' => 'switch', 'label' => $this->l('Address Standardization:'), 'name' => 'standardization', 'required' => false, - 'class' => 't', 'is_bool' => true, 'values' => array( array( @@ -272,11 +262,10 @@ class AdminCountriesControllerCore extends AdminController ), ), array( - 'type' => 'radio', + 'type' => 'switch', 'label' => $this->l('Active:'), 'name' => 'active', 'required' => false, - 'class' => 't', 'is_bool' => true, 'values' => array( array( @@ -290,14 +279,13 @@ class AdminCountriesControllerCore extends AdminController 'label' => $this->l('Disabled') ) ), - 'desc' => $this->l('Display this country to your customers (the selected country will always be displayed in the Back Office)') + 'hint' => $this->l('Display this country to your customers (the selected country will always be displayed in the Back Office)') ), array( - 'type' => 'radio', + 'type' => 'switch', 'label' => $this->l('Contains following states:'), 'name' => 'contains_states', 'required' => false, - 'class' => 't', 'values' => array( array( 'id' => 'contains_states_on', @@ -312,11 +300,10 @@ class AdminCountriesControllerCore extends AdminController ) ), array( - 'type' => 'radio', + 'type' => 'switch', 'label' => $this->l('Do you need a tax identification number?'), 'name' => 'need_identification_number', 'required' => false, - 'class' => 't', 'values' => array( array( 'id' => 'need_identification_number_on', @@ -331,11 +318,10 @@ class AdminCountriesControllerCore extends AdminController ) ), array( - 'type' => 'radio', + 'type' => 'switch', 'label' => $this->l('Display tax label (e.g. "Tax incl."):'), 'name' => 'display_tax_label', 'required' => false, - 'class' => 't', 'values' => array( array( 'id' => 'display_tax_label_on', @@ -364,7 +350,7 @@ class AdminCountriesControllerCore extends AdminController $this->fields_form['submit'] = array( 'title' => $this->l('Save '), - 'class' => 'button' + 'class' => 'btn btn-default' ); if ($this->object->iso_code == 'US') diff --git a/controllers/admin/AdminCurrenciesController.php b/controllers/admin/AdminCurrenciesController.php index bf8690b64..fd864b27b 100644 --- a/controllers/admin/AdminCurrenciesController.php +++ b/controllers/admin/AdminCurrenciesController.php @@ -28,6 +28,7 @@ class AdminCurrenciesControllerCore extends AdminController { public function __construct() { + $this->bootstrap = true; $this->table = 'currency'; $this->className = 'Currency'; $this->lang = false; @@ -52,18 +53,18 @@ class AdminCurrenciesControllerCore extends AdminController 'change' => array( 'title' => $this->l('Currency rates'), 'image' => '../img/admin/exchangesrate.gif', - 'description' => $this->l('Use PrestaShop\'s webservice to update your currency exchange rates. Please use caution, however, rates are provided as-is.'), + 'description' => '
'.$this->l('Use PrestaShop\'s webservice to update your currency exchange rates. Please use caution, however, rates are provided as-is.').'
', 'submit' => array( 'title' => $this->l('Update currency rates'), - 'class' => 'button', + 'class' => 'btn btn-default', 'name' => 'SubmitExchangesRates' ) ), 'cron' => array( 'title' => $this->l('Automatically update currency rates'), 'image' => '../img/admin/tab-tools.gif', - 'info' => $this->l('Use PrestaShop\'s webservice to update your currency exchange rates. Please use caution, rates are provided as-is. You can place this URL in the crontab,or access it manually.').':
- '.Tools::getShopDomain(true, true).__PS_BASE_URI__.basename(_PS_ADMIN_DIR_).'/cron_currency_rates.php?secure_key='.md5(_COOKIE_KEY_.Configuration::get('PS_SHOP_NAME')).'

', + 'info' => '
'.$this->l('Use PrestaShop\'s webservice to update your currency exchange rates. Please use caution, rates are provided as-is. You can place this URL in the crontab,or access it manually.').':
+ '.Tools::getShopDomain(true, true).__PS_BASE_URI__.basename(_PS_ADMIN_DIR_).'/cron_currency_rates.php?secure_key='.md5(_COOKIE_KEY_.Configuration::get('PS_SHOP_NAME')).'
', ) ); @@ -89,7 +90,7 @@ class AdminCurrenciesControllerCore extends AdminController $this->fields_form = array( 'legend' => array( 'title' => $this->l('Currencies:'), - 'image' => '../img/admin/money.gif' + 'icon' => 'icon-money' ), 'input' => array( array( @@ -105,46 +106,41 @@ class AdminCurrenciesControllerCore extends AdminController 'type' => 'text', 'label' => $this->l('ISO code:'), 'name' => 'iso_code', - 'size' => 30, 'maxlength' => 32, 'required' => true, - 'desc' => $this->l('ISO code (e.g. USD for Dollars, EUR for Euros)').'...', + 'hint' => $this->l('ISO code (e.g. USD for Dollars, EUR for Euros)').'...', ), array( 'type' => 'text', 'label' => $this->l('Numeric ISO code:'), 'name' => 'iso_code_num', - 'size' => 30, 'maxlength' => 32, 'required' => true, - 'desc' => $this->l('Numeric ISO code (e.g. 840 for Dollars, 978 for Euros)').'...', + 'hint' => $this->l('Numeric ISO code (e.g. 840 for Dollars, 978 for Euros)').'...', ), array( 'type' => 'text', 'label' => $this->l('Symbol:'), 'name' => 'sign', - 'size' => 3, 'maxlength' => 8, 'required' => true, - 'desc' => $this->l('Will appear in Front Office (e.g. $, €)').'...', + 'hint' => $this->l('Will appear in Front Office (e.g. $, €)').'...', ), array( 'type' => 'text', 'label' => $this->l('Exchange rate:'), 'name' => 'conversion_rate', - 'size' => 3, 'maxlength' => 11, 'required' => true, - 'desc' => $this->l('Exchange rates are calculated from one unit of your shop\'s default currency. For example, if the default currency is euros and your chosen currency is dollars, type "1.20"').' 1€ = $1.20', + 'hint' => $this->l('Exchange rates are calculated from one unit of your shop\'s default currency. For example, if the default currency is euros and your chosen currency is dollars, type "1.20"').' 1€ = $1.20', ), array( 'type' => 'select', 'label' => $this->l('Currency format:'), 'name' => 'format', - 'size' => 3, 'maxlength' => 11, 'required' => true, - 'desc' =>$this->l('Applies to all prices, e.g.').' $1,240.15', + 'hint' =>$this->l('Applies to all prices, e.g.').' $1,240.15', 'options' => array( 'query' => array( array('key' => 1, 'name' => 'X0,000.00 ('.$this->l('as with Dollars').')'), @@ -158,13 +154,12 @@ class AdminCurrenciesControllerCore extends AdminController ) ), array( - 'type' => 'radio', + 'type' => 'switch', 'label' => $this->l('Decimals:'), 'name' => 'decimals', 'required' => false, - 'class' => 't', 'is_bool' => true, - 'desc' => $this->l('Display decimals in prices'), + 'hint' => $this->l('Display decimals in prices'), 'values' => array( array( 'id' => 'decimals_on', @@ -179,13 +174,12 @@ class AdminCurrenciesControllerCore extends AdminController ), ), array( - 'type' => 'radio', + 'type' => 'switch', 'label' => $this->l('Spacing:'), 'name' => 'blank', 'required' => false, - 'class' => 't', 'is_bool' => true, - 'desc' => $this->l('Include a space between symbol and price, e.g.').'
$1,240.15 -> $ 1,240.15', + 'hint' => $this->l('Include a space between symbol and price, e.g.').'
$1,240.15 -> $ 1,240.15', 'values' => array( array( 'id' => 'blank_on', @@ -200,11 +194,10 @@ class AdminCurrenciesControllerCore extends AdminController ), ), array( - 'type' => 'radio', + 'type' => 'switch', 'label' => $this->l('Enable:'), 'name' => 'active', 'required' => false, - 'class' => 't', 'is_bool' => true, 'values' => array( array( @@ -232,8 +225,8 @@ class AdminCurrenciesControllerCore extends AdminController } $this->fields_form['submit'] = array( - 'title' => $this->l('Save '), - 'class' => 'button' + 'title' => $this->l('Save'), + 'class' => 'btn btn-primary' ); return parent::renderForm(); diff --git a/controllers/admin/AdminLanguagesController.php b/controllers/admin/AdminLanguagesController.php index 2112d1fbe..9ac1a6590 100644 --- a/controllers/admin/AdminLanguagesController.php +++ b/controllers/admin/AdminLanguagesController.php @@ -28,6 +28,7 @@ class AdminLanguagesControllerCore extends AdminController { public function __construct() { + $this->bootstrap = true; $this->table = 'lang'; $this->className = 'Language'; $this->lang = false; @@ -50,8 +51,7 @@ class AdminLanguagesControllerCore extends AdminController $this->fields_list = array( 'id_lang' => array( 'title' => $this->l('ID'), - 'align' => 'center', - 'width' => 25 + 'align' => 'center' ), 'flag' => array( 'title' => $this->l('Logo'), @@ -61,17 +61,14 @@ class AdminLanguagesControllerCore extends AdminController 'search' => false ), 'name' => array( - 'title' => $this->l('Name'), - 'width' => 120 + 'title' => $this->l('Name') ), 'iso_code' => array( 'title' => $this->l('ISO code'), - 'width' => 70, 'align' => 'center' ), 'language_code' => array( 'title' => $this->l('Language code'), - 'width' => 70, 'align' => 'center' ), 'date_format_lite' => array( @@ -113,7 +110,7 @@ class AdminLanguagesControllerCore extends AdminController $this->fields_form = array( 'legend' => array( 'title' => $this->l('Languages'), - 'image' => '../img/admin/world.gif' + 'icon' => 'icon-globe' ), 'input' => array( array( @@ -124,7 +121,6 @@ class AdminLanguagesControllerCore extends AdminController 'type' => 'text', 'label' => $this->l('Name:'), 'name' => 'name', - 'size' => 32, 'maxlength' => 32, 'required' => true ), @@ -133,54 +129,55 @@ class AdminLanguagesControllerCore extends AdminController 'label' => $this->l('ISO code:'), 'name' => 'iso_code', 'required' => true, - 'size' => 2, 'maxlength' => 2, - 'desc' => $this->l('Two-letter ISO code (e.g. FR, EN, DE)') + 'hint' => $this->l('Two-letter ISO code (e.g. FR, EN, DE)') ), array( 'type' => 'text', 'label' => $this->l('Language code:'), 'name' => 'language_code', 'required' => true, - 'size' => 2, 'maxlength' => 5, - 'desc' => $this->l('IETF language tag (e.g. en-US, pt-BR).').' '.sprintf('%s ', $this->l('IETF on Wikipedia')) + 'hint' => $this->l('IETF language tag (e.g. en-US, pt-BR).') + /* TO DO - ajouter les liens dans le hint ? */ + /*'desc' => $this->l('IETF language tag (e.g. en-US, pt-BR).').' '.sprintf('%s ', $this->l('IETF on Wikipedia'))*/ ), array( 'type' => 'text', 'label' => $this->l('Date format:'), 'name' => 'date_format_lite', 'required' => true, - 'size' => 15, - 'desc' => sprintf($this->l('Short date format (e.g., %s)'), 'Y-m-d') + 'hint' => $this->l('Short date format (e.g., %s)') + /* TO DO - ajouter les liens dans le hint ? */ + /*'desc' => sprintf($this->l('Short date format (e.g., %s)'), 'Y-m-d')*/ ), array( 'type' => 'text', 'label' => $this->l('Date format (full):'), 'name' => 'date_format_full', 'required' => true, - 'size' => 25, - 'desc' => sprintf($this->l('Full date format (e.g., %s)'), 'Y-m-d H:i:s') + 'hint' => $this->l('Full date format (e.g., %s)') + /* TO DO - ajouter les liens dans le hint ? */ + /*'desc' => sprintf($this->l('Full date format (e.g., %s)'), 'Y-m-d H:i:s')*/ ), array( 'type' => 'file', 'label' => $this->l('Flag:'), 'name' => 'flag', 'required' => true, - 'desc' => $this->l('Upload the country flag from your computer') + 'hint' => $this->l('Upload the country flag from your computer') ), array( 'type' => 'file', 'label' => $this->l('"No-picture" image:'), 'name' => 'no-picture', - 'desc' => $this->l('Image is displayed when "no picture is found"') + 'hint' => $this->l('Image is displayed when "no picture is found"') ), array( - 'type' => 'radio', + 'type' => 'switch', 'label' => $this->l('Is RTL language:'), 'name' => 'is_rtl', 'required' => false, - 'class' => 't', 'is_bool' => true, 'values' => array( array( @@ -194,15 +191,16 @@ class AdminLanguagesControllerCore extends AdminController 'label' => $this->l('Disabled') ) ), - 'desc' => $this->l('Enable if this language is read from right to left').' '. - $this->l('(Experimental: your theme must be compliant with RTL languages)') + 'hint' => array( + $this->l('Enable if this language is read from right to left').' '. + $this->l('(Experimental: your theme must be compliant with RTL languages)') + ) ), array( - 'type' => 'radio', + 'type' => 'switch', 'label' => $this->l('Status:'), 'name' => 'active', 'required' => false, - 'class' => 't', 'is_bool' => true, 'values' => array( array( @@ -216,7 +214,7 @@ class AdminLanguagesControllerCore extends AdminController 'label' => $this->l('Disabled') ) ), - 'desc' => $this->l('Activate this language') + 'hint' => $this->l('Activate this language') ), array( 'type' => 'special', diff --git a/controllers/admin/AdminLocalizationController.php b/controllers/admin/AdminLocalizationController.php index c5158f9fa..b9ddeac03 100644 --- a/controllers/admin/AdminLocalizationController.php +++ b/controllers/admin/AdminLocalizationController.php @@ -28,6 +28,7 @@ class AdminLocalizationControllerCore extends AdminController { public function __construct() { + $this->bootstrap = true; $this->className = 'Configuration'; $this->table = 'configuration'; @@ -39,7 +40,7 @@ class AdminLocalizationControllerCore extends AdminController 'fields' => array( 'PS_LANG_DEFAULT' => array( 'title' => $this->l('Default language:'), - 'desc' => $this->l('The default language used in your shop'), + 'hint' => $this->l('The default language used in your shop'), 'cast' => 'intval', 'type' => 'select', 'identifier' => 'id_lang', @@ -47,7 +48,7 @@ class AdminLocalizationControllerCore extends AdminController ), 'PS_COUNTRY_DEFAULT' => array( 'title' => $this->l('Default country:'), - 'desc' => $this->l('The default country used in your shop'), + 'hint' => $this->l('The default country used in your shop'), 'cast' => 'intval', 'type' => 'select', 'identifier' => 'id_country', @@ -55,11 +56,8 @@ class AdminLocalizationControllerCore extends AdminController ), 'PS_CURRENCY_DEFAULT' => array( 'title' => $this->l('Default currency:'), - 'desc' => - $this->l('The default currency used in your shop') - .'
' - .$this->l('If you change the default currency, you will have to manually edit every product price.') - .'
', + 'hint' => + $this->l('The default currency used in your shop').' - '.$this->l('If you change the default currency, you will have to manually edit every product price.'), 'cast' => 'intval', 'type' => 'select', 'identifier' => 'id_currency', @@ -70,61 +68,59 @@ class AdminLocalizationControllerCore extends AdminController ), 'localization' => array( 'title' => $this->l('Localization'), - 'width' => 'width2', 'icon' => 'localization', 'fields' => array( 'PS_WEIGHT_UNIT' => array( 'title' => $this->l('Weight unit:'), - 'desc' => $this->l('The default weight unit for your shop (e.g. kg or lbs)'), + 'hint' => $this->l('The default weight unit for your shop (e.g. kg or lbs)'), 'validation' => 'isWeightUnit', 'required' => true, 'type' => 'text' ), 'PS_DISTANCE_UNIT' => array( 'title' => $this->l('Distance unit:'), - 'desc' => $this->l('The default distance unit for your shop (e.g. km or mi)'), + 'hint' => $this->l('The default distance unit for your shop (e.g. km or mi)'), 'validation' => 'isDistanceUnit', 'required' => true, 'type' => 'text' ), 'PS_VOLUME_UNIT' => array( 'title' => $this->l('Volume unit:'), - 'desc' => $this->l('The default volume unit for your shop'), + 'hint' => $this->l('The default volume unit for your shop'), 'validation' => 'isWeightUnit', 'required' => true, 'type' => 'text' ), 'PS_DIMENSION_UNIT' => array( 'title' => $this->l('Dimension unit:'), - 'desc' => $this->l('The default dimension unit for your shop (e.g. cm or in)'), + 'hint' => $this->l('The default dimension unit for your shop (e.g. cm or in)'), 'validation' => 'isDistanceUnit', 'required' => true, 'type' => 'text' ) ), - 'submit' => array('title' => $this->l('Save'), 'class' => 'button') + 'submit' => array('title' => $this->l('Save'), 'class' => 'btn btn-primary') ), 'options' => array( 'title' => $this->l('Advanced'), - 'width' => 'width2', 'icon' => 'localization', 'fields' => array( 'PS_LOCALE_LANGUAGE' => array( 'title' => $this->l('Language locale:'), - 'desc' => $this->l('Your server\'s language locale.'), + 'hint' => $this->l('Your server\'s language locale.'), 'validation' => 'isLanguageIsoCode', 'type' => 'text', 'visibility' => Shop::CONTEXT_ALL ), 'PS_LOCALE_COUNTRY' => array( 'title' => $this->l('Country locale:'), - 'desc' => $this->l('Your server\'s country locale.'), + 'hint' => $this->l('Your server\'s country locale.'), 'validation' => 'isLanguageIsoCode', 'type' => 'text', 'visibility' => Shop::CONTEXT_ALL ) ), - 'submit' => array('title' => $this->l('Save'), 'class' => 'button') + 'submit' => array('title' => $this->l('Save'), 'class' => 'btn btn-primary') ) ); @@ -244,7 +240,7 @@ class AdminLocalizationControllerCore extends AdminController 'tinymce' => true, 'legend' => array( 'title' => $this->l('Import a localization pack'), - 'image' => '../img/admin/localization.gif' + 'icon' => 'icon-globe' ), 'input' => array( array( @@ -271,7 +267,7 @@ class AdminLocalizationControllerCore extends AdminController ), 'submit' => array( 'title' => $this->l('Import '), - 'class' => 'button', + 'class' => 'btn btn-default', 'name' => 'submitLocalizationPack' ) ); diff --git a/controllers/admin/AdminStatesController.php b/controllers/admin/AdminStatesController.php index 6b2dc99d0..8f7abfef9 100644 --- a/controllers/admin/AdminStatesController.php +++ b/controllers/admin/AdminStatesController.php @@ -28,6 +28,7 @@ class AdminStatesControllerCore extends AdminController { public function __construct() { + $this->bootstrap = true; $this->table = 'state'; $this->className = 'State'; $this->lang = false; @@ -51,8 +52,7 @@ class AdminStatesControllerCore extends AdminController $this->fields_list = array( 'id_state' => array( 'title' => $this->l('ID'), - 'align' => 'center', - 'width' => 25 + 'align' => 'center' ), 'name' => array( 'title' => $this->l('Name'), @@ -60,17 +60,14 @@ class AdminStatesControllerCore extends AdminController ), 'iso_code' => array( 'title' => $this->l('ISO code'), - 'align' => 'center', - 'width' => 75 + 'align' => 'center' ), 'zone' => array( 'title' => $this->l('Zone'), - 'width' => 100, 'filter_key' => 'z!name' ), 'active' => array( 'title' => $this->l('Enabled'), - 'width' => 70, 'active' => 'status', 'filter_key' => 'a!active', 'align' => 'center', @@ -96,27 +93,25 @@ class AdminStatesControllerCore extends AdminController $this->fields_form = array( 'legend' => array( 'title' => $this->l('States'), - 'image' => '../img/admin/world.gif' + 'icon' => 'icon-globe' ), 'input' => array( array( 'type' => 'text', 'label' => $this->l('Name:'), 'name' => 'name', - 'size' => 30, 'maxlength' => 32, 'required' => true, - 'desc' => $this->l('Provide the State name to be display in addresses and on invoices.') + 'hint' => $this->l('Provide the State name to be display in addresses and on invoices.') ), array( 'type' => 'text', 'label' => $this->l('ISO code:'), 'name' => 'iso_code', - 'size' => 7, 'maxlength' => 7, 'required' => true, 'class' => 'uppercase', - 'desc' => $this->l('1 to 4 letter ISO code') + 'hint' => $this->l('1 to 4 letter ISO code') ), array( 'type' => 'select', @@ -141,17 +136,16 @@ class AdminStatesControllerCore extends AdminController 'id' => 'id_zone', 'name' => 'name' ), - 'desc' => array( + 'hint' => array( $this->l('Geographical region where this state is located.'), $this->l('Used for shipping') ) ), array( - 'type' => 'radio', + 'type' => 'switch', 'label' => $this->l('Status:'), 'name' => 'active', 'required' => false, - 'class' => 't', 'values' => array( array( 'id' => 'active_on', @@ -164,7 +158,7 @@ class AdminStatesControllerCore extends AdminController 'label' => ''.$this->l('Disabled').'' ) ), - 'desc' => $this->l('Enabled or disabled') + 'hint' => $this->l('Enabled or disabled') ) ), 'submit' => array( diff --git a/controllers/admin/AdminTaxRulesGroupController.php b/controllers/admin/AdminTaxRulesGroupController.php index 63772700d..fea78e531 100644 --- a/controllers/admin/AdminTaxRulesGroupController.php +++ b/controllers/admin/AdminTaxRulesGroupController.php @@ -33,6 +33,7 @@ class AdminTaxRulesGroupControllerCore extends AdminController public function __construct() { + $this->bootstrap = true; $this->table = 'tax_rules_group'; $this->className = 'TaxRulesGroup'; $this->lang = false; @@ -41,16 +42,13 @@ class AdminTaxRulesGroupControllerCore extends AdminController $this->fields_list = array( 'id_tax_rules_group' => array( - 'title' => $this->l('ID'), - 'width' => 25 + 'title' => $this->l('ID') ), 'name' => array( - 'title' => $this->l('Name'), - 'width' => 'auto' + 'title' => $this->l('Name') ), 'active' => array( 'title' => $this->l('Enabled'), - 'width' => 25, 'active' => 'status', 'type' => 'bool', 'orderby' => false, @@ -87,28 +85,22 @@ class AdminTaxRulesGroupControllerCore extends AdminController $this->fields_list = array( 'country_name' => array( - 'title' => $this->l('Country'), - 'width' => 140 + 'title' => $this->l('Country') ), 'state_name' => array( - 'title' => $this->l('State'), - 'width' => 140 + 'title' => $this->l('State') ), 'zipcode' => array( - 'title' => $this->l('Zip Code'), - 'width' => 25, + 'title' => $this->l('Zip Code') ), 'behavior' => array( - 'title' => $this->l('Behavior'), - 'width' => 25, + 'title' => $this->l('Behavior') ), 'rate' => array( - 'title' => $this->l('Tax'), - 'width' => 25, + 'title' => $this->l('Tax') ), 'description' => array( - 'title' => $this->l('Description'), - 'width' => 25, + 'title' => $this->l('Description') ) ); @@ -141,23 +133,21 @@ class AdminTaxRulesGroupControllerCore extends AdminController $this->fields_form = array( 'legend' => array( 'title' => $this->l('Tax Rules'), - 'image' => '../img/admin/dollar.gif' + 'icon' => 'icon-money' ), 'input' => array( array( 'type' => 'text', 'label' => $this->l('Name:'), 'name' => 'name', - 'size' => 33, 'required' => true, 'hint' => $this->l('Invalid characters:').' <>;=#{}' ), array( - 'type' => 'radio', + 'type' => 'switch', 'label' => $this->l('Enable:'), 'name' => 'active', 'required' => false, - 'class' => 't', 'is_bool' => true, 'values' => array( array( @@ -175,7 +165,7 @@ class AdminTaxRulesGroupControllerCore extends AdminController ), 'submit' => array( 'title' => $this->l('Save and stay'), - 'class' => 'button', + 'class' => 'btn btn-primary', 'stay' => true ) ); @@ -210,7 +200,7 @@ class AdminTaxRulesGroupControllerCore extends AdminController $this->fields_form[0]['form'] = array( 'legend' => array( 'title' => $this->l('New tax rule'), - 'image' => '../img/admin/dollar.gif' + 'icon' => 'icon-money' ), 'input' => array( array( @@ -234,7 +224,6 @@ class AdminTaxRulesGroupControllerCore extends AdminController 'name' => 'states[]', 'id' => 'states', 'multiple' => true, - 'size' => 5, 'options' => array( 'query' => array(), 'id' => 'id_state', @@ -283,11 +272,15 @@ class AdminTaxRulesGroupControllerCore extends AdminController 'id' => 'id', 'name' => 'name' ), - 'hint' => - $this->l('Define the behavior if an address matches multiple rules:').'
- '.$this->l('This Tax Only:').' '.$this->l('Will apply only this tax').'
- '.$this->l('Combine:').' '.$this->l('Combine taxes (eg: 10% + 5% = 15%)').'
- '.$this->l('One After Another:').' '.$this->l('Apply taxes one after another (eg: 0 + 10% = 0 + 5% = 5.5)') + 'hint' => array( + $this->l('Define the behavior if an address matches multiple rules:'), + $this->l('This Tax Only:'), + $this->l('Will apply only this tax'), + $this->l('Combine:'), + $this->l('Combine taxes (eg: 10% + 5% = 15%)'), + $this->l('One After Another:'), + $this->l('Apply taxes one after another (eg: 0 + 10% = 0 + 5% = 5.5)') + ) ), array( 'type' => 'select', @@ -303,18 +296,17 @@ class AdminTaxRulesGroupControllerCore extends AdminController 'label' => $this->l('No Tax') ) ), - 'desc' => sprintf($this->l('(Total tax: %s)'), '9%') + 'hint' => sprintf($this->l('(Total tax: %s)'), '9%') ), array( 'type' => 'text', 'label' => $this->l('Description:'), 'name' => 'description', - 'size' => 40, ) ), 'submit' => array( 'title' => $this->l('Save and stay'), - 'class' => 'button', + 'class' => 'btn btn-primary', 'stay' => true ) ); diff --git a/controllers/admin/AdminTaxesController.php b/controllers/admin/AdminTaxesController.php index c03938943..0db9c7a58 100644 --- a/controllers/admin/AdminTaxesController.php +++ b/controllers/admin/AdminTaxesController.php @@ -28,6 +28,7 @@ class AdminTaxesControllerCore extends AdminController { public function __construct() { + $this->bootstrap = true; $this->table = 'tax'; $this->className = 'Tax'; $this->lang = true; @@ -81,7 +82,7 @@ class AdminTaxesControllerCore extends AdminController ), 'PS_USE_ECOTAX' => array( 'title' => $this->l('Use ecotax:'), - 'desc' => $ecotax_desc, + 'hint' => $ecotax_desc, 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool' @@ -94,7 +95,7 @@ class AdminTaxesControllerCore extends AdminController if (Configuration::get('PS_USE_ECOTAX')) $this->fields_options['general']['fields']['PS_ECOTAX_TAX_RULES_GROUP_ID'] = array( 'title' => $this->l('Ecotax'), - 'desc' => $this->l('Define the ecotax (e.g. French ecotax: 19.6%).'), + 'hint' => $this->l('Define the ecotax (e.g. French ecotax: 19.6%).'), 'cast' => 'intval', 'type' => 'select', 'identifier' => 'id_tax', @@ -161,35 +162,30 @@ class AdminTaxesControllerCore extends AdminController $this->fields_form = array( 'legend' => array( 'title' => $this->l('Taxes'), - 'image' => '../img/admin/dollar.gif' + 'icon' => 'icon-money' ), 'input' => array( array( 'type' => 'text', 'label' => $this->l('Name:'), 'name' => 'name', - 'size' => 33, 'required' => true, 'lang' => true, - 'hint' => $this->l('Invalid characters').' <>;=#{}', - 'desc' => $this->l('Tax name to display in carts and on invoices (e.g. VAT).') + 'hint' => $this->l('Tax name to display in carts and on invoices (e.g. VAT).').' - '.$this->l('Invalid characters').' <>;=#{}' ), array( 'type' => 'text', 'label' => $this->l('Rate:'), 'name' => 'rate', - 'size' => 4, 'maxlength' => 6, 'required' => true, - 'hint' => $this->l('Invalid characters').' <>;=#{}', - 'desc' => $this->l('Format: XX.XX or XX.XXX (e.g. 19.60 or 13.925)') + 'hint' => $this->l('Format: XX.XX or XX.XXX (e.g. 19.60 or 13.925)').' - '.$this->l('Invalid characters').' <>;=#{}' ), array( - 'type' => 'radio', + 'type' => 'switch', 'label' => $this->l('Enable:'), 'name' => 'active', 'required' => false, - 'class' => 't', 'is_bool' => true, 'values' => array( array( @@ -207,7 +203,7 @@ class AdminTaxesControllerCore extends AdminController ), 'submit' => array( 'title' => $this->l('Save'), - 'class' => 'button' + 'class' => 'btn btn-primary' ) ); diff --git a/controllers/admin/AdminTranslationsController.php b/controllers/admin/AdminTranslationsController.php index 67950d6fc..46978d655 100644 --- a/controllers/admin/AdminTranslationsController.php +++ b/controllers/admin/AdminTranslationsController.php @@ -72,6 +72,7 @@ class AdminTranslationsControllerCore extends AdminController public function __construct() { + $this->bootstrap = true; $this->multishop_context = Shop::CONTEXT_ALL; parent::__construct(); @@ -156,15 +157,15 @@ class AdminTranslationsControllerCore extends AdminController $this->toolbar_btn['save-and-stay'] = array( 'short' => 'SaveAndStay', 'href' => '#', - 'desc' => $this->l('Save and stay'), + 'hint' => $this->l('Save and stay'), ); $this->toolbar_btn['save'] = array( 'href' => '#', - 'desc' => $this->l('Update translations') + 'hint' => $this->l('Update translations') ); $this->toolbar_btn['cancel'] = array( 'href' => self::$currentIndex.'&token='.$this->token, - 'desc' => $this->l('Cancel') + 'hint' => $this->l('Cancel') ); } diff --git a/controllers/admin/AdminZonesController.php b/controllers/admin/AdminZonesController.php index 2a8d8e98c..8a082a061 100644 --- a/controllers/admin/AdminZonesController.php +++ b/controllers/admin/AdminZonesController.php @@ -30,6 +30,7 @@ class AdminZonesControllerCore extends AdminController public function __construct() { + $this->bootstrap = true; $this->table = 'zone'; $this->className = 'Zone'; $this->lang = false; @@ -37,16 +38,13 @@ class AdminZonesControllerCore extends AdminController $this->fields_list = array( 'id_zone' => array( 'title' => $this->l('ID'), - 'align' => 'center', - 'width' => 25 + 'align' => 'center' ), 'name' => array( 'title' => $this->l('Zone'), - 'width' => 'auto' ), 'active' => array( 'title' => $this->l('Enabled'), - 'width' => '70', 'align' => 'center', 'active' => 'status', 'type' => 'bool', @@ -75,23 +73,21 @@ class AdminZonesControllerCore extends AdminController $this->fields_form = array( 'legend' => array( 'title' => $this->l('Zones'), - 'image' => '../img/admin/world.gif' + 'icon' => 'icon-globe' ), 'input' => array( array( 'type' => 'text', 'label' => $this->l('Name:'), 'name' => 'name', - 'size' => 33, 'required' => true, - 'desc' => $this->l('Zone name (e.g. Africa, West Coast, Neighboring Countries)'), + 'hint' => $this->l('Zone name (e.g. Africa, West Coast, Neighboring Countries)'), ), array( - 'type' => 'radio', + 'type' => 'switch', 'label' => $this->l('Active:'), 'name' => 'active', 'required' => false, - 'class' => 't', 'is_bool' => true, 'values' => array( array( @@ -105,7 +101,7 @@ class AdminZonesControllerCore extends AdminController 'label' => $this->l('Disabled') ) ), - 'desc' => $this->l('Allow or disallow shipping to this zone') + 'hint' => $this->l('Allow or disallow shipping to this zone') ) ) ); @@ -120,8 +116,8 @@ class AdminZonesControllerCore extends AdminController } $this->fields_form['submit'] = array( - 'title' => $this->l('Save '), - 'class' => 'button' + 'title' => $this->l('Save'), + 'class' => 'btn btn-default' ); return parent::renderForm();
+ {if $has_bulk_actions} + + {/if} +
+ {if isset($params.hint)}{$params.hint} {/if} + + {$params.title} + +
+ {if $shop_link_type == 'shop'} + {l s='Shop'} + {else} + {l s='Group shop'} + {/if} +
{l s='Actions'}
 
- {if $has_bulk_actions} - - {/if} - - {if isset($params.hint)}{$params.hint} {/if} - - {$params.title} - -
  -
- {if $shop_link_type == 'shop'} - {l s='Shop'} - {else} - {l s='Group shop'} - {/if} -
  -
{l s='Actions'}