// norms
This commit is contained in:
+14
-8
@@ -715,7 +715,8 @@ class Blocktopmenu extends Module
|
||||
|
||||
public function hookDisplayTop($param)
|
||||
{
|
||||
$this->user_groups = ($this->context->customer->isLogged() ? $this->context->customer->getGroups() : array(Configuration::get('PS_UNIDENTIFIED_GROUP')));
|
||||
$this->user_groups = ($this->context->customer->isLogged() ?
|
||||
$this->context->customer->getGroups() : array(Configuration::get('PS_UNIDENTIFIED_GROUP')));
|
||||
$this->page_name = Dispatcher::getInstance()->getController();
|
||||
if (!$this->isCached('blocktopmenu.tpl', $this->getCacheId()))
|
||||
{
|
||||
@@ -988,7 +989,8 @@ class Blocktopmenu extends Module
|
||||
'title' => $this->l('Menu Top Link'),
|
||||
'icon' => 'icon-link'
|
||||
),
|
||||
'info' => '<div class="alert alert-warning">' .$this->l('All active products combinations quantities will be changed').'</div>',
|
||||
'info' => '<div class="alert alert-warning">'.
|
||||
$this->l('All active products combinations quantities will be changed').'</div>',
|
||||
'input' => array(
|
||||
array(
|
||||
'type' => 'switch',
|
||||
@@ -1025,7 +1027,8 @@ class Blocktopmenu extends Module
|
||||
$this->fields_form = array();
|
||||
$helper->module = $this;
|
||||
$helper->identifier = $this->identifier;
|
||||
$helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;
|
||||
$helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).
|
||||
'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;
|
||||
$helper->token = Tools::getAdminTokenLite('AdminModules');
|
||||
$helper->tpl_vars = array(
|
||||
'fields_value' => $this->getConfigFieldsValues(),
|
||||
@@ -1042,7 +1045,8 @@ class Blocktopmenu extends Module
|
||||
$fields_form = array(
|
||||
'form' => array(
|
||||
'legend' => array(
|
||||
'title' => (Tools::getIsset('updatelinksmenutop') && !Tools::getValue('updatelinksmenutop')) ? $this->l('Update link') : $this->l('Add a new link'),
|
||||
'title' => (Tools::getIsset('updatelinksmenutop') && !Tools::getValue('updatelinksmenutop')) ?
|
||||
$this->l('Update link') : $this->l('Add a new link'),
|
||||
'icon' => 'icon-link'
|
||||
),
|
||||
'input' => array(
|
||||
@@ -1107,7 +1111,8 @@ class Blocktopmenu extends Module
|
||||
$helper->fields_value['updatelink'] = '';
|
||||
}
|
||||
|
||||
$helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;
|
||||
$helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).
|
||||
'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;
|
||||
$helper->token = Tools::getAdminTokenLite('AdminModules');
|
||||
$helper->languages = $this->context->controller->getLanguages();
|
||||
$helper->default_form_language = (int)$this->context->language->id;
|
||||
@@ -1120,7 +1125,6 @@ class Blocktopmenu extends Module
|
||||
$spacer = str_repeat(' ', $this->spacer_size);
|
||||
$items = $this->getMenuItems();
|
||||
|
||||
|
||||
$html = '<select multiple="multiple" id="availableItems" style="width: 300px; height: 160px;">';
|
||||
$html .= '<optgroup label="'.$this->l('CMS').'">';
|
||||
$html .= $this->getCMSOptions(0, 1, $this->context->language->id, $items);
|
||||
@@ -1299,8 +1303,10 @@ class Blocktopmenu extends Module
|
||||
else
|
||||
foreach (Language::getLanguages(false) as $lang)
|
||||
{
|
||||
$fields_values['label'][$lang['id_lang']] = Tools::getValue('label_'.(int)$lang['id_lang'], isset($labels_edit[$lang['id_lang']]) ? $labels_edit[$lang['id_lang']] : '');
|
||||
$fields_values['link'][$lang['id_lang']] = Tools::getValue('link_'.(int)$lang['id_lang'], isset($links_label_edit[$lang['id_lang']]) ? $links_label_edit[$lang['id_lang']] : '');
|
||||
$fields_values['label'][$lang['id_lang']] = Tools::getValue('label_'.(int)$lang['id_lang'], isset($labels_edit[$lang['id_lang']]) ?
|
||||
$labels_edit[$lang['id_lang']] : '');
|
||||
$fields_values['link'][$lang['id_lang']] = Tools::getValue('link_'.(int)$lang['id_lang'], isset($links_label_edit[$lang['id_lang']]) ?
|
||||
$links_label_edit[$lang['id_lang']] : '');
|
||||
}
|
||||
|
||||
return $fields_values;
|
||||
|
||||
Reference in New Issue
Block a user