forked from ZwiiCMS-Team/ZwiiCMS
Validations à vérifier
This commit is contained in:
parent
b41c352bc5
commit
02ff10df39
@ -1844,6 +1844,7 @@ class common {
|
||||
$notificationClass = 'notificationSuccess';
|
||||
}
|
||||
if(common::$inputNotices) {
|
||||
var_dump ( common::$inputNotices );
|
||||
$notification = 'Impossible de soumettre le formulaire, car il contient des erreurs';
|
||||
$notificationClass = 'notificationError';
|
||||
}
|
||||
|
@ -674,7 +674,13 @@ if ($this->getData(['core', 'dataVersion']) < 11100) {
|
||||
|
||||
// Version 11.2.00
|
||||
if ($this->getData(['core', 'dataVersion']) < 11200) {
|
||||
// Déplacer la valeur captcha
|
||||
|
||||
// Mise àjour des données de config
|
||||
$this->setData(['config', 'connect', 'captchaStrong', $this->getData(['config', 'captchaStrong'])]);
|
||||
$this->deleteData(['config', 'captchaStrong']);
|
||||
$this->setData(['config', 'connect', 'autoDisconnect', $this->getData(['config', 'autoDisconnect'])]);
|
||||
$this->deleteData(['config', 'autoDisconnect']);
|
||||
|
||||
// Mise à jour
|
||||
$this->setData(['core', 'dataVersion', 11200]);
|
||||
}
|
||||
|
@ -443,6 +443,12 @@ class config extends common {
|
||||
'cookieConsent' => $this->getInput('configCookieConsent', helper::FILTER_BOOLEAN),
|
||||
'favicon' => $this->getInput('configFavicon'),
|
||||
'faviconDark' => $this->getInput('configFaviconDark'),
|
||||
'timezone' => $this->getInput('configTimezone', helper::FILTER_STRING_SHORT),
|
||||
'autoUpdate' => $this->getInput('configAutoUpdate', helper::FILTER_BOOLEAN),
|
||||
'autoUpdateHtaccess' => $this->getInput('configAutoUpdateHtaccess', helper::FILTER_BOOLEAN),
|
||||
'proxyType' => $this->getInput('configProxyType'),
|
||||
'proxyUrl' => $this->getInput('configProxyUrl'),
|
||||
'proxyPort' => $this->getInput('configProxyPort',helper::FILTER_INT),
|
||||
'social' => [
|
||||
'facebookId' => $this->getInput('configSocialFacebookId'),
|
||||
'linkedinId' => $this->getInput('configSocialLinkedinId'),
|
||||
@ -453,14 +459,6 @@ class config extends common {
|
||||
'youtubeUserId' => $this->getInput('configSocialYoutubeUserId'),
|
||||
'githubId' => $this->getInput('configSocialGithubId')
|
||||
],
|
||||
'timezone' => $this->getInput('configTimezone', helper::FILTER_STRING_SHORT, true),
|
||||
'autoUpdate' => $this->getInput('configAutoUpdate', helper::FILTER_BOOLEAN),
|
||||
'autoUpdateHtaccess' => $this->getInput('configAutoUpdateHtaccess', helper::FILTER_BOOLEAN),
|
||||
'proxyType' => $this->getInput('configProxyType'),
|
||||
'proxyUrl' => $this->getInput('configProxyUrl'),
|
||||
'proxyPort' => $this->getInput('configProxyPort',helper::FILTER_INT),
|
||||
'captchaStrong' => $this->getInput('configCaptchaStrong',helper::FILTER_BOOLEAN),
|
||||
'autoDisconnect' => $this->getInput('configAutoDisconnect',helper::FILTER_BOOLEAN),
|
||||
'smtp' => [
|
||||
'enable' => $this->getInput('configSmtpEnable',helper::FILTER_BOOLEAN),
|
||||
'host' => $this->getInput('configSmtpHost',helper::FILTER_STRING_SHORT),
|
||||
@ -474,12 +472,14 @@ class config extends common {
|
||||
'seo' => [
|
||||
'robots' => $this->getInput('configSeoRobots',helper::FILTER_BOOLEAN)
|
||||
],
|
||||
'connect' => [
|
||||
'safety' => [
|
||||
'attempt' => $this->getInput('configConnectAttempt',helper::FILTER_INT),
|
||||
'timeout' => $this->getInput('configConnectTimeout',helper::FILTER_INT),
|
||||
'log' => $this->getInput('configConnectLog',helper::FILTER_BOOLEAN),
|
||||
'anonymousIp' => $this->getInput('configConnectAnonymousIp',helper::FILTER_INT),
|
||||
'captcha' => $this->getInput('configConnectCaptcha',helper::FILTER_BOOLEAN),
|
||||
'captchaStrong' => $this->getInput('configConnectCaptchaStrong',helper::FILTER_BOOLEAN),
|
||||
'autoDisconnect' => $this->getInput('configConnectAutoDisconnect',helper::FILTER_BOOLEAN),
|
||||
],
|
||||
'i18n' => [
|
||||
'enable' => $this->getData(['config', 'i18n', 'enable'])
|
||||
|
@ -1,22 +1,22 @@
|
||||
<div id="safety">
|
||||
<div id="connectContainer">
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Sécurité de la connexion</h4>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<?php echo template::checkbox('ConnectCaptcha', true, 'Captcha à la connexion', [
|
||||
<?php echo template::checkbox('configConnectCaptcha', true, 'Captcha à la connexion', [
|
||||
'checked' => $this->getData(['config', 'connect','captcha'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::checkbox('CaptchaStrong', true, 'Captcha complexe', [
|
||||
<?php echo template::checkbox('configConnectCaptchaStrong', true, 'Captcha complexe', [
|
||||
'checked' => $this->getData(['config','captchaStrong']),
|
||||
'help' => 'Option recommandée pour sécuriser la connexion. S\'applique à tous les captchas du site. Le captcha simple se limite à une addition de nombres de 0 à 10. Le captcha complexe utilise quatre opérations de nombres de 0 à 20. Activation recommandée.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::checkbox('AutoDisconnect', true, 'Déconnexion automatique', [
|
||||
<?php echo template::checkbox('configConnectAutoDisconnect', true, 'Déconnexion automatique', [
|
||||
'checked' => $this->getData(['config','autoDisconnect']),
|
||||
'help' => 'Déconnecte les sessions ouvertes précédemment sur d\'autres navigateurs ou terminaux. Activation recommandée.'
|
||||
]); ?>
|
||||
@ -24,13 +24,13 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col3">
|
||||
<?php echo template::select('ConnectAttempt', $module::$connectAttempt , [
|
||||
<?php echo template::select('configConnectAttempt', $module::$connectAttempt , [
|
||||
'label' => 'Connexions successives',
|
||||
'selected' => $this->getData(['config', 'connect', 'attempt'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('ConnectTimeout', $module::$connectTimeout , [
|
||||
<?php echo template::select('configConnectTimeout', $module::$connectTimeout , [
|
||||
'label' => 'Blocage après échecs',
|
||||
'selected' => $this->getData(['config', 'connect', 'timeout'])
|
||||
]); ?>
|
||||
@ -42,14 +42,14 @@
|
||||
Après le nombre de tentatives autorisées, l\'IP et le compte sont bloqués.');
|
||||
?>
|
||||
</label>
|
||||
<?php echo template::button('ConnectblacListDownload', [
|
||||
<?php echo template::button('ConfigBlackListDownload', [
|
||||
'href' => helper::baseUrl() . 'config/blacklistDownload',
|
||||
'value' => 'Télécharger la liste',
|
||||
'ico' => 'download'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3 verticalAlignBottom">
|
||||
<?php echo template::button('ConnectReset', [
|
||||
<?php echo template::button('ConfigBlackListReset', [
|
||||
'class' => 'buttonRed',
|
||||
'href' => helper::baseUrl() . 'config/blacklistReset',
|
||||
'value' => 'Réinitialiser la liste',
|
||||
@ -66,26 +66,26 @@
|
||||
<h4>Journalisation</h4>
|
||||
<div class="row">
|
||||
<div class="col3">
|
||||
<?php echo template::checkbox('ConnectLog', true, 'Activer la journalisation', [
|
||||
<?php echo template::checkbox('ConfigConnectLog', true, 'Activer la journalisation', [
|
||||
'checked' => $this->getData(['config', 'connect', 'log'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('ConnectAnonymousIp', $module::$anonIP, [
|
||||
<?php echo template::select('ConfigConnectAnonymousIp', $module::$anonIP, [
|
||||
'label' => 'Anonymat des adresses IP',
|
||||
'selected' => $this->getData(['config', 'connect', 'anonymousIp']),
|
||||
'help' => 'La réglementation française impose un anonymat de niveau 2'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3 verticalAlignBottom">
|
||||
<?php echo template::button('LogDownload', [
|
||||
<?php echo template::button('ConfigLogDownload', [
|
||||
'href' => helper::baseUrl() . 'config/logDownload',
|
||||
'value' => 'Télécharger le journal',
|
||||
'ico' => 'download'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3 verticalAlignBottom">
|
||||
<?php echo template::button('LogReset', [
|
||||
<?php echo template::button('ConfigLogReset', [
|
||||
'class' => 'buttonRed',
|
||||
'href' => helper::baseUrl() . 'config/logReset',
|
||||
'value' => 'Réinitialiser le journal',
|
@ -16,3 +16,11 @@
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
||||
|
||||
#setupContainer {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#localeContainer, #socialContainer, #safetyContainer, #networkContainer {
|
||||
display: none;
|
||||
}
|
@ -87,4 +87,59 @@ $( document).ready(function() {
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Captcha strong si captcha sélectionné
|
||||
*/
|
||||
$("input[name=configConnectCaptcha]").on("change", function() {
|
||||
|
||||
if ($("input[name=configConnectCaptcha]").is(':checked')) {
|
||||
$("#configConnectCaptchaStrongWrapper").addClass("disabled");
|
||||
$("#configConnectCaptchaStrongWrapper").slideDown();
|
||||
$( "#configConnectCaptchaStrong" ).prop( "checked", false );
|
||||
} else {
|
||||
$("#configConnectCaptchaStrongWrapper").removeClass("disabled");
|
||||
$("#configConnectCaptchaStrongWrapper").slideUp();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Sélection de la page de configuration à afficher
|
||||
*/
|
||||
$("#configSetupButton").on("click", function() {
|
||||
$("#localeContainer").slideUp();
|
||||
$("#socialContainer").slideUp();
|
||||
$("#connectContainer").slideUp();
|
||||
$("#networkContainer").slideUp();
|
||||
$("#setupContainer").slideDown();
|
||||
});
|
||||
$("#configLocalButton").on("click", function() {
|
||||
$("#setupContainer").slideUp();
|
||||
$("#socialContainer").slideUp();
|
||||
$("#connectContainer").slideUp();
|
||||
$("#networkContainer").slideUp();
|
||||
$("#localeContainer").slideDown();
|
||||
});
|
||||
$("#configSocialButton").on("click", function() {
|
||||
$("#connectContainer").slideUp();
|
||||
$("#setupContainer").slideUp();
|
||||
$("#localeContainer").slideUp();
|
||||
$("#networkContainer").slideUp();
|
||||
$("#socialContainer").slideDown();
|
||||
});
|
||||
$("#configConnectButton").on("click", function() {
|
||||
$("#setupContainer").slideUp();
|
||||
$("#localeContainer").slideUp();
|
||||
$("#socialContainer").slideUp();
|
||||
$("#networkContainer").slideUp();
|
||||
$("#connectContainer").slideDown();
|
||||
});
|
||||
$("#configNetworkButton").on("click", function() {
|
||||
$("#setupContainer").slideUp();
|
||||
$("#localeContainer").slideUp();
|
||||
$("#socialContainer").slideUp();
|
||||
$("#connectContainer").slideUp();
|
||||
$("#networkContainer").slideDown();
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -23,32 +23,27 @@
|
||||
<div class="col12">
|
||||
<div class="row textAlignCenter">
|
||||
<div class="col2">
|
||||
<?php echo template::button('Button', [
|
||||
'href' => helper::baseUrl() . 'config/index',
|
||||
<?php echo template::button('configSetupButton', [
|
||||
'value' => 'Paramètres'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::button('Button', [
|
||||
'href' => helper::baseUrl() . 'config/locale',
|
||||
<?php echo template::button('configLocalButton', [
|
||||
'value' => 'Localisation'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::button('Button', [
|
||||
'href' => helper::baseUrl() . 'config/social',
|
||||
<?php echo template::button('configSocialButton', [
|
||||
'value' => 'Référencement'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::button('Button', [
|
||||
'href' => helper::baseUrl() . 'config/safety',
|
||||
'value' => 'Sécurité'
|
||||
<?php echo template::button('configConnectButton', [
|
||||
'value' => 'Connexion'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::button('Button', [
|
||||
'href' => helper::baseUrl() . 'config/network',
|
||||
<?php echo template::button('configNetworkButton', [
|
||||
'value' => 'Réseau'
|
||||
]); ?>
|
||||
</div>
|
||||
@ -59,6 +54,6 @@
|
||||
<?php include ('core/module/config/view/setup/setup.php') ?>
|
||||
<?php include ('core/module/config/view/locale/locale.php') ?>
|
||||
<?php include ('core/module/config/view/social/social.php') ?>
|
||||
<?php include ('core/module/config/view/safety/safety.php') ?>
|
||||
<?php include ('core/module/config/view/connect/connect.php') ?>
|
||||
<?php include ('core/module/config/view/network/network.php') ?>
|
||||
<?php echo template::formClose(); ?>
|
@ -1,4 +1,4 @@
|
||||
<div id="locale">
|
||||
<div id="localeContainer">
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
@ -44,6 +44,9 @@
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div id="network">
|
||||
<div id="networkContainer">
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div id="setup">
|
||||
<div id="setupContainer">
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
@ -21,7 +21,7 @@
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::select('Timezone', $module::$timezones, [
|
||||
<?php echo template::select('configTimezone', $module::$timezones, [
|
||||
'label' => 'Fuseau horaire',
|
||||
'selected' => $this->getData(['config', 'timezone']),
|
||||
'help' => 'Le fuseau horaire est utile au bon référencement'
|
||||
@ -30,13 +30,13 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('CookieConsent', true, 'Message de consentement aux cookies', [
|
||||
<?php echo template::checkbox('ConfigCookieConsent', true, 'Message de consentement aux cookies', [
|
||||
'checked' => $this->getData(['config', 'cookieConsent']),
|
||||
'help' => 'Activation obligatoire selon les lois françaises sauf si vous utilisez votre propre système de consentement.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('rewrite', true, 'URL intelligentes', [
|
||||
<?php echo template::checkbox('ConfigRewrite', true, 'URL intelligentes', [
|
||||
'checked' => helper::checkRewrite(),
|
||||
'help' => 'Vérifiez d\'abord que votre serveur autorise l\'URL rewriting (ce qui n\'est pas le cas chez Free).'
|
||||
]); ?>
|
||||
@ -52,21 +52,21 @@
|
||||
<?php $updateError = helper::urlGetContents(common::ZWII_UPDATE_URL . common::ZWII_UPDATE_CHANNEL . '/version');?>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<?php echo template::checkbox('AutoUpdate', true, 'Rechercher une mise à jour en ligne', [
|
||||
<?php echo template::checkbox('ConfigAutoUpdate', true, 'Rechercher une mise à jour en ligne', [
|
||||
'checked' => $this->getData(['config', 'autoUpdate']),
|
||||
'help' => 'La vérification est quotidienne. Option désactivée si la configuration du serveur ne le permet pas.',
|
||||
'disabled' => !$updateError
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::checkbox('AutoUpdateHtaccess', true, 'Préserver le fichier htaccess racine', [
|
||||
<?php echo template::checkbox('ConfigAutoUpdateHtaccess', true, 'Préserver le fichier htaccess racine', [
|
||||
'checked' => $this->getData(['config', 'autoUpdateHtaccess']),
|
||||
'help' => 'Lors d\'une mise à jour automatique, conserve le fichier htaccess de la racine du site.',
|
||||
'disabled' => !$updateError
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::button('UpdateForced', [
|
||||
<?php echo template::button('ConfigUpdateForced', [
|
||||
'ico' => 'download-cloud',
|
||||
'href' => helper::baseUrl() . 'install/update',
|
||||
'value' => 'Mise à jour manuelle',
|
||||
@ -84,13 +84,13 @@
|
||||
<h4>Maintenance</h4>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('AutoBackup', true, 'Sauvegarde automatique quotidienne du site', [
|
||||
<?php echo template::checkbox('ConfigAutoBackup', true, 'Sauvegarde automatique quotidienne du site', [
|
||||
'checked' => $this->getData(['config', 'autoBackup']),
|
||||
'help' => 'Une archive contenant le dossier /site/data est copiée dans le dossier \'site/backup\'. La sauvegarde est conservée pendant 30 jours.</p><p>Les fichiers du site ne sont pas sauvegardés automatiquement. Activation recommandée.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('Maintenance', true, 'Site en maintenance', [
|
||||
<?php echo template::checkbox('ConfigMaintenance', true, 'Site en maintenance', [
|
||||
'checked' => $this->getData(['config', 'maintenance'])
|
||||
]); ?>
|
||||
</div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div id="social">
|
||||
<div id="socialContainer">
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
|
Loading…
Reference in New Issue
Block a user