diff --git a/core/module/config/config.php b/core/module/config/config.php index dde6bff9..d4220027 100644 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -31,7 +31,6 @@ class config extends common 'logDownload' => self::GROUP_ADMIN, 'blacklistReset' => self::GROUP_ADMIN, 'blacklistDownload' => self::GROUP_ADMIN, - 'register' => self::GROUP_ADMIN, 'testmail' => self::GROUP_ADMIN, ]; @@ -503,6 +502,17 @@ class config extends common ] ]); + // Sauvegarde la position des onglets de la vue de l'utilisateur courant + $this->setData([ + 'user', + $this->getUser('id'), + 'view', + [ + 'config' => $this->getInput('containerSelected'), + 'page' => $this->getData(['user', $this->getUser('id'), 'view', 'page']), + ] + ]); + // Efface les fichiers de backup lorsque l'option est désactivée if ($this->getInput('configFileBackup', helper::FILTER_BOOLEAN) === false) { $path = realpath('site/data'); @@ -922,26 +932,6 @@ class config extends common } } - /** - * Stocke la variable dans les paramètres de l'utilisateur pour activer la tab à sa prochaine visite - * @return never - */ - public function register(): void - { - $this->setData([ - 'user', - $this->getUser('id'), - 'view', - [ - 'config' => $this->getUrl(2), - 'page' => $this->getData(['user', $this->getUser('id'), 'view', 'page']), - ] - ]); - // Valeurs en sortie - $this->addOutput([ - 'redirect' => helper::baseUrl() . 'config/' . $this->getUrl(2), - ]); - } /** * Envoi un message de test diff --git a/core/module/config/view/index/index.js.php b/core/module/config/view/index/index.js.php index c4a6501a..418b778d 100644 --- a/core/module/config/view/index/index.js.php +++ b/core/module/config/view/index/index.js.php @@ -162,6 +162,7 @@ $(document).ready(function () { $("#connectContainer").hide(); $("#networkContainer").hide(); $("#setupContainer").show(); + document.getElementById("containerSelected").value = "setup"; $("#configSetupButton").addClass("activeButton"); $("#configSocialButton").removeClass("activeButton"); $("#configConnectButton").removeClass("activeButton"); @@ -172,6 +173,7 @@ $(document).ready(function () { $("#setupContainer").hide(); $("#networkContainer").hide(); $("#socialContainer").show(); + document.getElementById("containerSelected").value = "social"; $("#configSetupButton").removeClass("activeButton"); $("#configSocialButton").addClass("activeButton"); $("#configConnectButton").removeClass("activeButton"); @@ -182,6 +184,7 @@ $(document).ready(function () { $("#socialContainer").hide(); $("#networkContainer").hide(); $("#connectContainer").show(); + document.getElementById("containerSelected").value = "connect"; $("#configSetupButton").removeClass("activeButton"); $("#configSocialButton").removeClass("activeButton"); $("#configConnectButton").addClass("activeButton"); @@ -192,6 +195,7 @@ $(document).ready(function () { $("#socialContainer").hide(); $("#connectContainer").hide(); $("#networkContainer").show(); + document.getElementById("containerSelected").value = "network"; $("#configSetupButton").removeClass("activeButton"); $("#configSocialButton").removeClass("activeButton"); $("#configConnectButton").removeClass("activeButton"); diff --git a/core/module/config/view/index/index.php b/core/module/config/view/index/index.php index 5551fb4c..2e676fbd 100644 --- a/core/module/config/view/index/index.php +++ b/core/module/config/view/index/index.php @@ -22,26 +22,25 @@ 'Configuration', 'class' => 'buttonTab', - 'href' => helper::baseUrl() . 'config/register/setup' ]); ?> 'Référencement', 'class' => 'buttonTab', - 'href' => helper::baseUrl() . 'config/register/social' ]); ?> - 'Connexion', 'class' => 'buttonTab', - 'href' => helper::baseUrl() . 'config/register/connect' ]); ?> 'Réseau', 'class' => 'buttonTab', - 'href' => helper::baseUrl() . 'config/register/network' ]); ?> + + + +