This commit is contained in:
Fred Tempez 2020-09-29 19:03:35 +02:00
parent 1b117eb8c0
commit 26f88cbb26
4 changed files with 25 additions and 3 deletions

View File

@ -483,7 +483,8 @@ class config extends common {
'connect' => [
'attempt' => $this->getInput('configConnectAttempt',helper::FILTER_INT),
'timeout' => $this->getInput('configConnectTimeout',helper::FILTER_INT),
'log' => $this->getInput('configConnectLog',helper::FILTER_BOOLEAN)
'log' => $this->getInput('configConnectLog',helper::FILTER_BOOLEAN),
'captcha' => $this->getInput('configConnectCaptcha',helper::FILTER_BOOLEAN)
]
]
]);

View File

@ -94,7 +94,7 @@
'help' => 'Le fuseau horaire est utile au bon référencement'
]); ?>
</div>
<div class="col8 verticalAlignBottom">
<div class="col4 verticalAlignBottom">
<?php echo template::checkbox('configCookieConsent', true, 'Message de consentement aux cookies', [
'checked' => $this->getData(['config', 'cookieConsent'])
]); ?>
@ -499,6 +499,13 @@
]); ?>
</div>
</div>
<div class="row">
<div class="col4">
<?php echo template::checkbox('configConnectCaptcha', true, 'Captcha à la connexion', [
'checked' => $this->getData(['config', 'connect','captcha'])
]); ?>
</div>
</div>
</div>
</div>
</div>

View File

@ -334,6 +334,14 @@ class user extends common {
public function login() {
// Soumission du formulaire
if($this->isPost()) {
// Check la captcha
if(
$this->getInput('userLoginCaptcha', helper::FILTER_INT) !== $this->getInput('userLoginCaptchaFirstNumber', helper::FILTER_INT) + $this->getInput('userLoginCaptchaSecondNumber', helper::FILTER_INT))
{
self::$inputNotices['blogArticlecaptcha'] = 'Incorrect';
}
// Lire Id du compte
$userId = $this->getInput('userLoginId', helper::FILTER_ID, true);
/**

View File

@ -12,6 +12,13 @@
]); ?>
</div>
</div>
<?php if ($this->getData(['config', 'connect','captcha'])): ?>
<div class="row">
<div class="col6">
<?php echo template::captcha('userLoginCaptcha'); ?>
</div>
</div>
<?php endif;?>
<div class="row">
<div class="col6">
<?php echo template::checkbox('userLoginLongTime', true, 'Se souvenir de moi', [
@ -25,7 +32,6 @@
<div class="row">
<div class="col3 offset6">
<?php echo template::button('userLoginBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . str_replace('_', '/', str_replace('__', '#', $this->getUrl(2))),
'ico' => 'left',
'value' => 'Annuler'