Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions classes/Form/ConfigurationForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

namespace PrestaShop\Module\Ps_Googleanalytics\Form;

use AdminController;
use Configuration;
use Context;
use HelperForm;
Expand Down Expand Up @@ -53,25 +52,33 @@ public function generate()
$helper->module = $this->module;
$helper->name_controller = $this->module->name;
$helper->token = Tools::getAdminTokenLite('AdminModules');
$helper->currentIndex = AdminController::$currentIndex . '&configure=' . $this->module->name;
$helper->currentIndex = Context::getContext()->link->getAdminLink('AdminModules', true, [], [
'configure' => $this->module->name,
'tab_module' => $this->module->tab,
'module_name' => $this->module->name,
]);

// Language
$helper->default_form_language = $default_lang;
$helper->allow_employee_form_lang = $default_lang;

// Title and toolbar
$helper->title = $this->module->displayName;
$helper->show_toolbar = true; // false -> remove toolbar
$helper->toolbar_scroll = true; // yes - > Toolbar is always visible on the top of the screen.
$helper->show_toolbar = true; // false -> remove toolbar
$helper->toolbar_scroll = true; // yes - > Toolbar is always visible on the top of the screen.
$helper->submit_action = 'submit' . $this->module->name;
$helper->toolbar_btn = [
'save' => [
'desc' => $this->module->getTranslator()->trans('Save', [], 'Modules.Googleanalytics.Admin'),
'href' => AdminController::$currentIndex . '&configure=' . $this->module->name . '&save=' . $this->module->name .
'&token=' . $helper->token,
'href' => Context::getContext()->link->getAdminLink('AdminModules', true, [], [
'configure' => $this->module->name,
'tab_module' => $this->module->tab,
'module_name' => $this->module->name,
'save' => $this->module->name,
]),
],
'back' => [
'href' => AdminController::$currentIndex . '&token=' . $helper->token,
'href' => Context::getContext()->link->getAdminLink('AdminModules', true),
'desc' => $this->module->getTranslator()->trans('Back to list', [], 'Modules.Googleanalytics.Admin'),
],
];
Expand Down
31 changes: 14 additions & 17 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<module>
<name>ps_googleanalytics</name>
<displayName><![CDATA[Google Analytics]]></displayName>
<version><![CDATA[5.0.2]]></version>
<version><![CDATA[5.0.3]]></version>
<description><![CDATA[Gain clear insights into important metrics about your customers, using Google Analytics]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[analytics_stats]]></tab>
Expand Down
2 changes: 1 addition & 1 deletion ps_googleanalytics.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function __construct()
{
$this->name = 'ps_googleanalytics';
$this->tab = 'analytics_stats';
$this->version = '5.0.2';
$this->version = '5.0.3';
$this->ps_versions_compliancy = ['min' => '1.7.7', 'max' => _PS_VERSION_];
$this->author = 'PrestaShop';
$this->module_key = 'fd2aaefea84ac1bb512e6f1878d990b8';
Expand Down
Loading