From a3e17dfb83b2990b627349d87bba664ab170cf1b Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sat, 22 Jun 2019 17:27:49 +0200 Subject: [PATCH] =?UTF-8?q?[9.1.14]=20Page=20des=20mentions=20l=C3=A9gales?= =?UTF-8?q?=20dans=20le=20footer=20(reste=20=C3=A0=20ins=C3=A9rer=20dans?= =?UTF-8?q?=20le=20pied=20de=20page)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/module/theme/theme.php | 8 +++++++- core/module/theme/view/footer/footer.js.php | 13 ++++++++++--- core/module/theme/view/footer/footer.php | 20 ++++++++++++++++---- 3 files changed, 33 insertions(+), 8 deletions(-) diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index f419ab83..c37e7423 100755 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -294,6 +294,11 @@ 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'), @@ -315,7 +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') + 'template' => $this->getInput('themeFooterTemplate'), + 'legalPageId' => $legalPageId ]]); // 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 ae1f7707..bb71f190 100755 --- a/core/module/theme/view/footer/footer.js.php +++ b/core/module/theme/view/footer/footer.js.php @@ -214,7 +214,14 @@ $("#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(); + } else { + $("#themeFooterLegalPageId").hide(); + } +}); // Lien de connexion $("#themeFooterLoginLink").on("change", function() { @@ -229,10 +236,10 @@ $("#themeFooterLoginLink").on("change", function() { // Numéro de version $("#themefooterDisplayVersion").on("change", function() { if($(this).is(":checked")) { - $("#footerDisplayVersion").show(); + $("#footerDisplayVersion").slideDown(); } else { - $("#footerDisplayVersion").hide(); + $("#footerDisplayVersion").slideUp(); } }).trigger("change"); diff --git a/core/module/theme/view/footer/footer.php b/core/module/theme/view/footer/footer.php index 878bce59..ac1667d7 100755 --- a/core/module/theme/view/footer/footer.php +++ b/core/module/theme/view/footer/footer.php @@ -190,14 +190,26 @@ ]); ?> - -
-
-

La personnalisation des réseaux sociaux s'effectue dans la configuration du site.

+
+
+ $this->getData(['theme', 'footer', 'legalPageId']) === '' ? false : true + ]); ?> +

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