diff --git a/core/core.php b/core/core.php index 3bc51334..9da9abf8 100644 --- a/core/core.php +++ b/core/core.php @@ -1963,9 +1963,9 @@ class layout extends common { $items .= ''; // Affichage des mentions légales $items .= 'getData(['theme','footer','legalPageId']) === '' ? ' class="displayNone" >' : '>'; - if ($this->getData(['theme','footer','legalPageId']) !== '') { - $items .= ' | Mentions légales'; + $items .= $this->getData(['theme','footer','displayLegal']) === false ? ' class="displayNone" >' : '>'; + if ($this->getData(['config','legalPageId']) !== '') { + $items .= ' | Mentions légales'; } $items .= ''; // Affichage du lien de connexion diff --git a/core/module/config/config.php b/core/module/config/config.php index 3dc5e1f5..99bc764b 100755 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -263,6 +263,11 @@ class config extends common { public function index() { // Soumission du formulaire if($this->isPost()) { + if ($this->getInput('configLegalCheck', helper::FILTER_BOOLEAN) === true ) { + $legalPageId = $this->getInput('configLegalPageId', helper::FILTER_ID); + } else { + $legalPageId = ''; + } $this->setData([ 'config', [ @@ -284,7 +289,8 @@ class config extends common { ], 'timezone' => $this->getInput('configTimezone', helper::FILTER_STRING_SHORT, true), 'title' => $this->getInput('configTitle', helper::FILTER_STRING_SHORT, true), - 'itemsperPage' => $this->getInput('itemsperPage', helper::FILTER_INT,true) + 'itemsperPage' => $this->getInput('itemsperPage', helper::FILTER_INT,true), + 'legalPageId' => $this->getInput('configLegalPageId') ] ]); if(self::$inputNotices === []) { diff --git a/core/module/config/view/index/index.php b/core/module/config/view/index/index.php index 80950253..0db02079 100755 --- a/core/module/config/view/index/index.php +++ b/core/module/config/view/index/index.php @@ -43,36 +43,51 @@

Réglages

-
-
- 1, - 'help' => 'Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.', - 'label' => 'Favicon', - 'value' => $this->getData(['config', 'favicon']) - ]); ?> -
-
- 'Articles par page', - 'selected' => $this->getData(['config', 'itemsperPage']), - 'help' => 'Modules Blog et News' - ]); ?> -
+
+
+ 1, + 'help' => 'Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.', + 'label' => 'Favicon', + 'value' => $this->getData(['config', 'favicon']) + ]); ?>
-
+
+ 'Articles par page', + 'selected' => $this->getData(['config', 'itemsperPage']), + 'help' => 'Modules Blog et News' + ]); ?> +
+
+
+
'Fuseau horaire', 'selected' => $this->getData(['config', 'timezone']) ]); ?> -
+
+
+ 'Sélectionner'] , helper::arrayCollumn($this->getData(['page']), 'title', 'SORT_ASC') ); + ?> + 'Page des mentions légales', + 'class' => $this->getData(['config', 'legalPageId']) === '' ? 'displayNone' : '', + 'selected' => $this->getData(['config', 'legalPageId']) + ]); ?> +
+
+
$this->getData(['config', 'cookieConsent']) - ]); ?> + ]); ?> +
+
helper::checkRewrite(), 'help' => 'Vérifiez d\'abord que votre serveur l\'autorise : ce n\'est pas le cas chez Free.' ]); ?> +
diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index 5b781630..2d6176d8 100755 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -299,11 +299,6 @@ class theme extends common { 'state' => false ]); } else { - if ($this->getInput('themeFooterLegalCheck', helper::FILTER_BOOLEAN) === true ) { - $legalPageId = $this->getInput('themeFooterLegalPageId', helper::FILTER_ID); - } else { - $legalPageId = ''; - } $this->setData(['theme', 'footer', [ 'backgroundColor' => $this->getInput('themeFooterBackgroundColor'), 'copyrightAlign' => $this->getInput('themeFooterCopyrightAlign'), @@ -325,8 +320,8 @@ class theme extends common { 'displayVersion' => $this->getInput('themefooterDisplayVersion', helper::FILTER_BOOLEAN), 'displaySiteMap' => $this->getInput('themefooterDisplaySiteMap', helper::FILTER_BOOLEAN), 'displayCopyright' => $this->getInput('themefooterDisplayCopyright', helper::FILTER_BOOLEAN), - 'template' => $this->getInput('themeFooterTemplate'), - 'legalPageId' => $legalPageId + 'displayLegal' => $this->getInput('themeFooterDisplayLegal', helper::FILTER_BOOLEAN), + 'template' => $this->getInput('themeFooterTemplate') ]]); // Valeurs en sortie $this->addOutput([ diff --git a/core/module/theme/view/footer/footer.js.php b/core/module/theme/view/footer/footer.js.php index 8a8187e1..5d37321d 100755 --- a/core/module/theme/view/footer/footer.js.php +++ b/core/module/theme/view/footer/footer.js.php @@ -203,17 +203,6 @@ $("#themeFooterCopyrightPosition").on("change", function() { }).trigger("change"); -// Mention Légales activation de la liste de choix -$("#themeFooterLegalCheck").on("change",function() { - if($(this).is(":checked")) { - $("#themeFooterLegalPageId").show(); - $("#footerDisplayLegal").show(); - } else { - $("#themeFooterLegalPageId").hide(); - $("#footerDisplayLegal").hide(); - } -}); - // Lien de connexion $("#themeFooterLoginLink").on("change", function() { if($(this).is(":checked")) { diff --git a/core/module/theme/view/footer/footer.php b/core/module/theme/view/footer/footer.php index 07463888..91d549fd 100755 --- a/core/module/theme/view/footer/footer.php +++ b/core/module/theme/view/footer/footer.php @@ -192,20 +192,12 @@
- $this->getData(['theme', 'footer', 'legalPageId']) === '' ? false : true + $this->getData(['theme', 'footer', 'displayLegal']) ]); ?>

-
-
- getData(['page']), 'title', 'SORT_ASC'), [ - 'class' => $this->getData(['theme', 'footer', 'legalPageId']) === '' ? 'displayNone' : '', - 'selected' => $this->getData(['theme', 'footer', 'legalPageId']) - ]); ?> -
-