// update localization tab

This commit is contained in:
Sarah Lorenzini
2013-07-30 12:25:20 +02:00
parent 8bafaceb40
commit 816153687c
15 changed files with 342 additions and 388 deletions
@@ -23,10 +23,7 @@
* International Registered Trademark & Property of PrestaShop SA
*}
<div class="width4">
{$localization_form}
</div>
<br />
<div class="width4">
{$localization_options}
</div>
{$localization_form}
{$localization_options}
@@ -26,9 +26,9 @@
{block name="label"}
{if $input.name == 'zipcode' && isset($input.label)}
<label id="zipcode-label">{$input.label}</label>
<label id="zipcode-label" class="control-label col-lg-3 ">{$input.label}</label>
{elseif $input.name == 'states[]'}
<label id="states-label">{$input.label}</label>
<label id="states-label" class="control-label col-lg-3 ">{$input.label}</label>
{else}
{$smarty.block.parent}
{/if}
@@ -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
*}
<a onclick="loadTaxRule('{$id}'); return false;" href="#"><img src="../img/admin/edit.gif" alt="{$action}" title="{$action}" /></a>
<a onclick="loadTaxRule('{$id}'); return false;" href="#" class="btn btn-default">
<i class="icon-pencil"></i>
{$action}
</a>
@@ -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
*}
<tbody>
{foreach $list AS $index => $tr}
<tr
{if $position_identifier}id="tr_{$id_category}_{$tr.$identifier}_{$tr.position['position']}"{/if}
{if $index is odd}class="alt_row"{/if}
{if isset($tr.color) && $color_on_bg}style="background-color: {$tr.color}"{/if}
>
<td class="center">
{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}
<tbody>
{foreach $list AS $index => $tr}
<tr
{if $position_identifier}id="tr_{$id_category}_{$tr.$identifier}_{$tr.position['position']}"{/if}
{if isset($tr.color) && $color_on_bg}style="background-color: {$tr.color}"{/if}
>
<td>
{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}
<input type="checkbox" name="{$table}Box[]" value="{$tr.$identifier}" class="noborder" />
{/if}
{/if}
{/foreach}
{if $bulkActionPossible == true}
<input type="checkbox" name="{$table}Box[]" value="{$tr.$identifier}" class="noborder" />
{/if}
{/if}
</td>
{foreach $fields_display AS $key => $params}
<td
{if isset($params.position)}
id="td_{if $id_category}{$id_category}{else}0{/if}_{$tr.$identifier}"
{/if}
class="{if !$no_link}pointer{/if}
{if isset($params.position) && $order_by == 'position'} dragHandle{/if}
{if isset($params.align)} {$params.align}{/if}"
</td>
{foreach $fields_display AS $key => $params}
<td
{if isset($params.position)}
id="td_{if $id_category}{$id_category}{else}0{/if}_{$tr.$identifier}"
{/if}
class="{if !$no_link}pointer{/if}
{if isset($params.position) && $order_by == 'position'} dragHandle{/if}
{if isset($params.align)} {$params.align}{/if}"
{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}
>
{/if}
{if isset($params.active)}
{$tr.$key}
{elseif isset($params.activeVisu)}
<img src="../img/admin/{if $tr.$key}enabled.gif{else}disabled.gif{/if}"
alt="{if $tr.$key}{l s='Enabled'}{else}{l s='Disabled'}{/if}" title="{if $tr.$key}{l s='Enabled'}{else}{l s='Disabled'}{/if}" />
{elseif isset($params.position)}
{if $order_by == 'position' && $order_way != 'DESC'}
<a href="{$tr.$key.position_url_down}" {if !($tr.$key.position != $positions[count($positions) - 1])}style="display: none;"{/if}>
<img src="../img/admin/{if $order_way == 'ASC'}down{else}up{/if}.gif" alt="{l s='Down'}" title="{l s='Down'}" />
</a>
<a href="{$tr.$key.position_url_up}" {if !($tr.$key.position != $positions.0)}style="display: none;"{/if}>
<img src="../img/admin/{if $order_way == 'ASC'}up{else}down{/if}.gif" alt="{l s='Up'}" title="{l s='Up'}" />
</a>
{else}
{$tr.$key.position + 1}
{/if}
{elseif isset($params.image)}
{$tr.$key}
{elseif (isset($params.icon))}
<img src="../img/admin/{$tr[$key]}" alt="{$tr[$key]}" title="{$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}
</td>
{/foreach}
{if isset($params.active)}
{$tr.$key}
{elseif isset($params.activeVisu)}
<img src="../img/admin/{if $tr.$key}enabled.gif{else}disabled.gif{/if}"
alt="{if $tr.$key}{l s='Enabled'}{else}{l s='Disabled'}{/if}" title="{if $tr.$key}{l s='Enabled'}{else}{l s='Disabled'}{/if}" />
{elseif isset($params.position)}
{if $order_by == 'position' && $order_way != 'DESC'}
<a href="{$tr.$key.position_url_down}" {if !($tr.$key.position != $positions[count($positions) - 1])}style="display: none;"{/if}>
<img src="../img/admin/{if $order_way == 'ASC'}down{else}up{/if}.gif" alt="{l s='Down'}" title="{l s='Down'}" />
</a>
{if $shop_link_type}
<td class="center" {if $name != $tr.shop_name}title="{$tr.shop_name}"{/if}>{if isset($tr.shop_short_name)}{$tr.shop_short_name}{else}{$tr.shop_name}{/if}</td>
{/if}
{if $has_actions}
<td class="center" style="white-space: nowrap;">
{foreach $actions AS $action}
{if isset($tr.$action)}
{$tr.$action}
{/if}
{/foreach}
</td>
{/if}
</tr>
{/foreach}
</tbody>
<a href="{$tr.$key.position_url_up}" {if !($tr.$key.position != $positions.0)}style="display: none;"{/if}>
<img src="../img/admin/{if $order_way == 'ASC'}up{else}down{/if}.gif" alt="{l s='Up'}" title="{l s='Up'}" />
</a>
{else}
{$tr.$key.position + 1}
{/if}
{elseif isset($params.image)}
{$tr.$key}
{elseif (isset($params.icon))}
<img src="../img/admin/{$tr[$key]}" alt="{$tr[$key]}" title="{$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}
</td>
{/foreach}
{if $shop_link_type}
<td {if $name != $tr.shop_name}title="{$tr.shop_name}"{/if}>{if isset($tr.shop_short_name)}{$tr.shop_short_name}{else}{$tr.shop_name}{/if}</td>
{/if}
{if $has_actions}
<td>
{foreach $actions AS $action}
{if isset($tr.$action)}
{$tr.$action}
{/if}
{/foreach}
</td>
{/if}
</tr>
{/foreach}
</tbody>
@@ -33,81 +33,45 @@
{/if}
<form method="post" action="{$currentIndex}&{$identifier}&token={$token}&id_tax_rules_group={$id_tax_rules_group}&updatetax_rules_group#{$table}" class="form">
<input type="hidden" id="submitFilter{$table}" name="submitFilter{$table}" value="0"/>
<table class="table_grid">
<tr>
<td style="vertical-align: bottom;">
<span style="float: left;">
{if $page > 1}
<input type="image" src="../img/admin/list-prev2.gif" onclick="getE('submitFilter{$table}').value=1"/>&nbsp;
<input type="image" src="../img/admin/list-prev.gif" onclick="getE('submitFilter{$table}').value={$page - 1}"/>
{/if}
{l s='Page'} <b>{$page}</b> / {$total_pages}
{if $page < $total_pages}
<input type="image" src="../img/admin/list-next.gif" onclick="getE('submitFilter{$table}').value={$page + 1};"/>&nbsp;
<input type="image" src="../img/admin/list-next2.gif" onclick="getE('submitFilter{$table}').value={$total_pages}"/>
{/if}
| {l s='Display'}
<select name="pagination" onchange="submit()">
{* Choose number of results per page *}
{foreach $pagination AS $value}
<option value="{$value|intval}"{if $selected_pagination == $value} selected="selected" {elseif $selected_pagination == NULL && $value == $pagination[1]} selected="selected2"{/if}>{$value|intval}</option>
{/foreach}
</select>
/ {$list_total} {l s='result(s)'}
</span>
<span style="float: right;">
<input type="submit" name="submitReset{$table}" value="{l s='Reset'}" class="button" />
</span>
<span class="clear"></span>
</td>
</tr>
<tr>
<td>
<table
{if $table_id} id={$table_id}{/if}
class="table {if $table_dnd}tableDnD{/if} {$table}"
cellpadding="0" cellspacing="0"
style="width: 100%; margin-bottom:10px;"
>
<col width="10px" />
<fieldset class="col-lg-12">
<input type="hidden" id="submitFilter{$table}" name="submitFilter{$table}" value="0"/>
<table {if $table_id} id={$table_id}{/if} class="table {if $table_dnd}tableDnD{/if} {$table}">
<col width="10" />
{foreach $fields_display AS $key => $params}
<col {if isset($params.width) && $params.width != 'auto'}width="{$params.width}px"{/if}/>
{/foreach}
{if $shop_link_type}
<col width="80" />
{/if}
{if $has_actions}
<col width="52" />
{/if}
<thead>
<tr class="nodrag nodrop">
<th>
{if $has_bulk_actions}
<input type="checkbox" name="checkme" class="noborder" onclick="checkDelBoxes(this.form, '{$table}Box[]', this.checked)" />
{/if}
</th>
{foreach $fields_display AS $key => $params}
<col {if isset($params.width) && $params.width != 'auto'}width="{$params.width}px"{/if}/>
<th {if isset($params.align)} class="{$params.align}"{/if}>
{if isset($params.hint)}<span class="alert alert-info" name="help_box">{$params.hint}<span class="hint-pointer">&nbsp;</span></span>{/if}
<span class="title_box">
{$params.title}
</span>
</th>
{/foreach}
{if $shop_link_type}
<col width="80px" />
<th>
{if $shop_link_type == 'shop'}
{l s='Shop'}
{else}
{l s='Group shop'}
{/if}
</th>
{/if}
{if $has_actions}
<col width="52px" />
<th>{l s='Actions'}<br />&nbsp;</th>
{/if}
<thead>
<tr class="nodrag nodrop">
<th class="center">
{if $has_bulk_actions}
<input type="checkbox" name="checkme" class="noborder" onclick="checkDelBoxes(this.form, '{$table}Box[]', this.checked)" />
{/if}
</th>
{foreach $fields_display AS $key => $params}
<th {if isset($params.align)} class="{$params.align}"{/if}>
{if isset($params.hint)}<span class="alert alert-info" name="help_box">{$params.hint}<span class="hint-pointer">&nbsp;</span></span>{/if}
<span class="title_box">
{$params.title}
</span>
<br />&nbsp;
</th>
{/foreach}
{if $shop_link_type}
<th>
{if $shop_link_type == 'shop'}
{l s='Shop'}
{else}
{l s='Group shop'}
{/if}
<br />&nbsp;
</th>
{/if}
{if $has_actions}
<th class="center">{l s='Actions'}<br />&nbsp;</th>
{/if}
</tr>
</thead>
</tr>
</thead>
@@ -60,39 +60,78 @@
});
</script>
<fieldset>
<legend><img src="../img/admin/translation.gif" />{l s='Modify translations'}</legend>
{l s='Here you can modify translations for every line of code inside PrestaShop.'}<br />
{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.'}<br /><br />
<form method="get" action="index.php" id="typeTranslationForm">
<form method="get" action="index.php" id="typeTranslationForm" class="form-horizontal">
<fieldset>
<h3>
<i class="icon-file-text"></i>
{l s='Modify translations'}
</h3>
<p class="alert alert-block">
{l s='Here you can modify translations for every line of code inside PrestaShop.'}<br />
{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.'}
</p>
<input type="hidden" name="controller" value="AdminTranslations" />
<input type="hidden" name="lang" id="translation_lang" value="0" />
<select name="type" style="float:left;margin-right:10px">
{foreach $translations_type as $type => $array}
<option value="{$type}">{$array.name}</option>
<div class="row">
<label class="control-label col-lg-3">{l s='Type of translation:'}</label>
<div class="col-lg-6">
<select name="type">
{foreach $translations_type as $type => $array}
<option value="{$type}">{$array.name}</option>
{/foreach}
</select>
</div>
</div>
<div class="row">
<label class="control-label col-lg-3">{l s='Choose your theme:'}</label>
<div class="col-lg-6">
<select name="theme">
<option value="">{l s='Core (no theme selected)'}</option>
{foreach $themes as $theme}
<option value="{$theme->directory}" {if $id_theme_current == $theme->id}selected=selected{/if}>{$theme->name}</option>
{/foreach}
</select>
</div>
</div>
{* TO DO - ajouter la langue*}
{*<div class="row">
{foreach from=$languages item=language}
<div class="input-group col-lg-12 translatable-field lang-{$language.id_lang}">
<div class="input-group-btn">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<img src="{$base_url}/img/l/{$language.id_lang|intval}.jpg" alt="">
{$language.iso_code}
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
{foreach $languages as $language}
<li>
<a href="javascript:chooseTypeTranslation('{$language['iso_code']}');">
<img src="{$theme_lang_dir}{$language['id_lang']}.jpg" alt="{$language['iso_code']}" title="{$language['iso_code']}" />
{$language['iso_code']}
</a>
</li>
{/foreach}
</ul>
</div>
</div>
{/foreach}
</select>
<select name="theme" style="float:left;margin-right:10px">
<option value="">{l s='Core (no theme selected)'}</option>
{foreach $themes as $theme}
<option value="{$theme->directory}" {if $id_theme_current == $theme->id}selected=selected{/if}>{$theme->name}</option>
</div>*}
{foreach $languages as $language}
<a href="javascript:chooseTypeTranslation('{$language['iso_code']}');">
<img src="{$theme_lang_dir}{$language['id_lang']}.jpg" alt="{$language['iso_code']}" title="{$language['iso_code']}" />
</a>
{/foreach}
</select>
{foreach $languages as $language}
<a href="javascript:chooseTypeTranslation('{$language['iso_code']}');">
<img src="{$theme_lang_dir}{$language['id_lang']}.jpg" alt="{$language['iso_code']}" title="{$language['iso_code']}" />
</a>
{/foreach}
<input type="hidden" name="token" value="{$token}" />
</form>
</fieldset>
<br /><h2>{l s='Translation exchange'}</h2>
<input type="hidden" name="token" value="{$token}" />
</div>
</fieldset>
</form>
<form action="{$url_submit}" method="post" enctype="multipart/form-data">
<fieldset>
<legend>
<img src="../img/admin/import.gif" />{l s='Add / Update a language'}
</legend>
<h3>
<i class="icon-download"></i>
{l s='Add / Update a language'}
</h3>
<div id="submitAddLangContent" style="float:left;">
<p>{l s='You can add or update a language directly from the PrestaShop website here:'}</p>
<div class="alert alert-block">
+20 -34
View File
@@ -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')
+18 -25
View File
@@ -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&euro; = $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&euro; = $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();
+23 -25
View File
@@ -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'
)
);
+9 -15
View File
@@ -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
)
);
+8 -12
View File
@@ -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')
);
}
+8 -12
View File
@@ -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();