Skip to content

Commit 0354f58

Browse files
authored
Merge pull request #171 from Touxten/Touxten-patch-1
Fix the link since the page migration
2 parents e200853 + fde0acc commit 0354f58

1 file changed

Lines changed: 14 additions & 7 deletions

File tree

classes/Form/ConfigurationForm.php

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
namespace PrestaShop\Module\Ps_Googleanalytics\Form;
2222

23-
use AdminController;
2423
use Configuration;
2524
use Context;
2625
use HelperForm;
@@ -53,25 +52,33 @@ public function generate()
5352
$helper->module = $this->module;
5453
$helper->name_controller = $this->module->name;
5554
$helper->token = Tools::getAdminTokenLite('AdminModules');
56-
$helper->currentIndex = AdminController::$currentIndex . '&configure=' . $this->module->name;
55+
$helper->currentIndex = Context::getContext()->link->getAdminLink('AdminModules', true, [], [
56+
'configure' => $this->module->name,
57+
'tab_module' => $this->module->tab,
58+
'module_name' => $this->module->name,
59+
]);
5760

5861
// Language
5962
$helper->default_form_language = $default_lang;
6063
$helper->allow_employee_form_lang = $default_lang;
6164

6265
// Title and toolbar
6366
$helper->title = $this->module->displayName;
64-
$helper->show_toolbar = true; // false -> remove toolbar
65-
$helper->toolbar_scroll = true; // yes - > Toolbar is always visible on the top of the screen.
67+
$helper->show_toolbar = true; // false -> remove toolbar
68+
$helper->toolbar_scroll = true; // yes - > Toolbar is always visible on the top of the screen.
6669
$helper->submit_action = 'submit' . $this->module->name;
6770
$helper->toolbar_btn = [
6871
'save' => [
6972
'desc' => $this->module->getTranslator()->trans('Save', [], 'Modules.Googleanalytics.Admin'),
70-
'href' => AdminController::$currentIndex . '&configure=' . $this->module->name . '&save=' . $this->module->name .
71-
'&token=' . $helper->token,
73+
'href' => Context::getContext()->link->getAdminLink('AdminModules', true, [], [
74+
'configure' => $this->module->name,
75+
'tab_module' => $this->module->tab,
76+
'module_name' => $this->module->name,
77+
'save' => $this->module->name,
78+
]),
7279
],
7380
'back' => [
74-
'href' => AdminController::$currentIndex . '&token=' . $helper->token,
81+
'href' => Context::getContext()->link->getAdminLink('AdminModules', true),
7582
'desc' => $this->module->getTranslator()->trans('Back to list', [], 'Modules.Googleanalytics.Admin'),
7683
],
7784
];

0 commit comments

Comments
 (0)