forked from ZwiiCMS-Team/ZwiiCMS
[9.2.0.dev] Choix de la page des mentions légales dans la config
This commit is contained in:
parent
f05922b090
commit
ee3b0dc8b1
@ -1963,9 +1963,9 @@ class layout extends common {
|
||||
$items .= '</span>';
|
||||
// Affichage des mentions légales
|
||||
$items .= '<span id="footerDisplayLegal"';
|
||||
$items .= $this->getData(['theme','footer','legalPageId']) === '' ? ' class="displayNone" >' : '>';
|
||||
if ($this->getData(['theme','footer','legalPageId']) !== '') {
|
||||
$items .= '<wbr> | <a href="' . helper::baseUrl() . $this->getData(['theme','footer','legalPageId']) . '" data-tippy-content="Mentions Légales">Mentions légales</a>';
|
||||
$items .= $this->getData(['theme','footer','displayLegal']) === false ? ' class="displayNone" >' : '>';
|
||||
if ($this->getData(['config','legalPageId']) !== '') {
|
||||
$items .= '<wbr> | <a href="' . helper::baseUrl() . $this->getData(['config','legalPageId']) . '" data-tippy-content="Mentions Légales">Mentions légales</a>';
|
||||
}
|
||||
$items .= '</span>';
|
||||
// Affichage du lien de connexion
|
||||
|
@ -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 === []) {
|
||||
|
@ -60,21 +60,36 @@
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col12">
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::select('configTimezone', $module::$timezones, [
|
||||
'label' => 'Fuseau horaire',
|
||||
'selected' => $this->getData(['config', 'timezone'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php $listePageId = array_merge(['' => 'Sélectionner'] , helper::arrayCollumn($this->getData(['page']), 'title', 'SORT_ASC') );
|
||||
?>
|
||||
<?php echo template::select('configLegalPageId', $listePageId , [
|
||||
'label' => 'Page des mentions légales',
|
||||
'class' => $this->getData(['config', 'legalPageId']) === '' ? 'displayNone' : '',
|
||||
'selected' => $this->getData(['config', 'legalPageId'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col12">
|
||||
<?php echo template::checkbox('configCookieConsent', true, 'Message de consentement aux cookies', [
|
||||
'checked' => $this->getData(['config', 'cookieConsent'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('rewrite', true, 'Réécriture d\'URL', [
|
||||
'checked' => helper::checkRewrite(),
|
||||
'help' => 'Vérifiez d\'abord que votre serveur l\'autorise : ce n\'est pas le cas chez Free.'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<div class="block">
|
||||
<h4>Réseaux sociaux</h4>
|
||||
|
@ -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([
|
||||
|
@ -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")) {
|
||||
|
@ -192,20 +192,12 @@
|
||||
</div>
|
||||
<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
|
||||
<?php echo template::checkbox('themeFooterDisplayLegal', true, 'Pages des mentions légales', [
|
||||
'checked' => $this->getData(['theme', 'footer', 'displayLegal'])
|
||||
]); ?>
|
||||
<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>
|
||||
|
Loading…
Reference in New Issue
Block a user