//Fixed bug delete duplicate method initList and initOptions
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9499 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -23,6 +23,9 @@
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<script type="text/javascript">
|
||||
id_language = Number({$current_id_lang});
|
||||
</script>
|
||||
<br />
|
||||
<form action="{$current}&submitOptions{$table}=1&token={$token}" method="post" enctype="multipart/form-data">
|
||||
{foreach $option_list AS $category => $categoryData}
|
||||
@@ -120,7 +123,7 @@
|
||||
{elseif $field['type'] == 'textLang' || $field['type'] == 'textareaLang'}
|
||||
{if $field['type'] == 'textLang'}
|
||||
{foreach $field['languages'] AS $id_lang => $value}
|
||||
<div id="{$key}_{$id_lang}" style="margin-bottom:8px; display: {if $id_lang == $current_id_lang}'block'{else}'none'{/if}; float: left; vertical-align: top;">
|
||||
<div id="{$key}_{$id_lang}" style="margin-bottom:8px; display: {if $id_lang == $current_id_lang}block{else}none{/if}; float: left; vertical-align: top;">
|
||||
<input type="text" size="{if isset($field['size'])}{$field['size']|intval}{else}5{/if}" name="{$key}_{$id_lang}" value="{$value}" />
|
||||
</div>
|
||||
{/foreach}
|
||||
|
||||
@@ -539,9 +539,6 @@ class AdminControllerCore extends Controller
|
||||
$tmp_tab = explode('!', $key);
|
||||
$key = (count($tmp_tab) > 1 ? $tmp_tab[1] : $tmp_tab[0]);
|
||||
|
||||
// init list declaration
|
||||
$this->initList();
|
||||
|
||||
if (array_key_exists($key, $this->fieldsDisplay))
|
||||
unset($this->context->cookie->$cookie_key);
|
||||
}
|
||||
@@ -750,9 +747,6 @@ class AdminControllerCore extends Controller
|
||||
|
||||
protected function filterToField($key, $filter)
|
||||
{
|
||||
// init list declaration
|
||||
$this->initList();
|
||||
|
||||
foreach ($this->fieldsDisplay as $field)
|
||||
if (array_key_exists('filter_key', $field) && $field['filter_key'] == $key)
|
||||
return $field;
|
||||
@@ -1969,8 +1963,6 @@ EOF;
|
||||
|
||||
$languages = Language::getLanguages(false);
|
||||
|
||||
// init options declaration
|
||||
$this->initOptions();
|
||||
foreach ($this->options as $category => $category_data)
|
||||
{
|
||||
$fields = $category_data['fields'];
|
||||
|
||||
@@ -101,7 +101,6 @@ class HelperOptionsCore extends Helper
|
||||
$value = Configuration::get($key, $language['id_lang']);
|
||||
$field['languages'][$language['id_lang']] = $value;
|
||||
}
|
||||
$field['flags'] = $this->displayFlags($languages, $this->context->language->id, $key, $key, true);
|
||||
}
|
||||
|
||||
// Multishop default value
|
||||
@@ -125,7 +124,7 @@ class HelperOptionsCore extends Helper
|
||||
'option_list' => $option_list,
|
||||
'current_id_lang' => $this->context->language->id,
|
||||
'required_fields' => isset($required_fields) ? $required_fields : false,
|
||||
'languages' => $languages
|
||||
'languages' => isset($languages) ? $languages : false
|
||||
));
|
||||
return $this->context->smarty->fetch(_PS_ADMIN_DIR_.'/themes/template/'.$this->tpl);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user