// update localization tab
This commit is contained in:
@@ -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)').'.
|
||||
<a href="http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm" target="_blank">'.
|
||||
$this->l('Official list here').'
|
||||
</a>.'
|
||||
</a>.'*/
|
||||
),
|
||||
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')
|
||||
|
||||
@@ -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' => '<div class="alert alert-block">'.$this->l('Use PrestaShop\'s webservice to update your currency exchange rates. Please use caution, however, rates are provided as-is.').'</div>',
|
||||
'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.').':<br />
|
||||
<b>'.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')).'</b></p>',
|
||||
'info' => '<div class="alert alert-block">'.$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.').':<br />
|
||||
<b>'.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')).'</b></div>',
|
||||
)
|
||||
);
|
||||
|
||||
@@ -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.').'<br />$1,240.15 -> $ 1,240.15',
|
||||
'hint' => $this->l('Include a space between symbol and price, e.g.').'<br />$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();
|
||||
|
||||
@@ -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('<a href="http://en.wikipedia.org/wiki/IETF_language_tag" target="_blank">%s <img src="../img/admin/external_link.png" class="icon-top" /></a>', $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('<a href="http://en.wikipedia.org/wiki/IETF_language_tag" target="_blank">%s <img src="../img/admin/external_link.png" class="icon-top" /></a>', $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)'), '<a href="http://php.net/date" target="_blank">Y-m-d</a>')
|
||||
'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)'), '<a href="http://php.net/date" target="_blank">Y-m-d</a>')*/
|
||||
),
|
||||
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)'), '<a href="http://php.net/date" target="_blank">Y-m-d H:i:s</a>')
|
||||
'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)'), '<a href="http://php.net/date" target="_blank">Y-m-d H:i:s</a>')*/
|
||||
),
|
||||
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',
|
||||
|
||||
@@ -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')
|
||||
.'<div class="warn">'
|
||||
.$this->l('If you change the default currency, you will have to manually edit every product price.')
|
||||
.'</div>',
|
||||
'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'
|
||||
)
|
||||
);
|
||||
|
||||
@@ -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' => '<img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" />'
|
||||
)
|
||||
),
|
||||
'desc' => $this->l('Enabled or disabled')
|
||||
'hint' => $this->l('Enabled or disabled')
|
||||
)
|
||||
),
|
||||
'submit' => array(
|
||||
|
||||
@@ -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:').'<br />
|
||||
<b>'.$this->l('This Tax Only:').'</b> '.$this->l('Will apply only this tax').'<br />
|
||||
<b>'.$this->l('Combine:').'</b> '.$this->l('Combine taxes (eg: 10% + 5% = 15%)').'<br />
|
||||
<b>'.$this->l('One After Another:').'</b> '.$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
|
||||
)
|
||||
);
|
||||
|
||||
@@ -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'
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -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')
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user