[9.1.14] Page des mentions légales dans le footer (reste à insérer dans le pied de page)

This commit is contained in:
fredtempez 2019-06-22 17:27:49 +02:00
parent 2586da1d53
commit a3e17dfb83
3 changed files with 33 additions and 8 deletions

View File

@ -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([

View File

@ -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");

View File

@ -190,14 +190,26 @@
]); ?>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<p><em>La personnalisation des réseaux sociaux s'effectue dans la configuration du site.</em></p>
<div class="col3">
<div class="row">
<?php echo template::checkbox('themeFooterLegalCheck', true, 'Pages des mentions légales', [
'checked' => $this->getData(['theme', 'footer', 'legalPageId']) === '' ? false : true
]); ?>
<p></p>
</div>
</div>
<div class="col3">
<div class="row">
<?php echo template::select('themeFooterLegalPageId', helper::arrayCollumn($this->getData(['page']), 'title', 'SORT_ASC'), [
'class' => $this->getData(['theme', 'footer', 'legalPageId']) === '' ? 'displayNone' : '',
'selected' => $this->getData(['theme', 'footer', 'legalPageId'])
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>