option mot de passe dévoilé

This commit is contained in:
Fred Tempez 2021-12-17 18:18:24 +01:00
parent 6b704bd121
commit d697717c69
17 changed files with 120 additions and 57 deletions

View File

@ -710,7 +710,10 @@ if ($this->getData(['core', 'dataVersion']) < 11200) {
$this->setData(['locale', 'cookies', 'cookiesButtonText', 'J\'ai compris']);
// Supppression de l'option de traduction en mode connecté
$this->serData(['config','i18n', 'admin', false]);
$this->setData(['config','i18n', 'admin', false]);
// Option de dévoilement du mdp
$this->setData(['config', 'connect', 'showPassword', true]);
// Mise à jour
$this->setData(['core', 'dataVersion', 11200]);

View File

@ -507,7 +507,9 @@ class config extends common {
'captcha' => $this->getInput('connectCaptcha',helper::FILTER_BOOLEAN),
'captchaStrong' => $this->getInput('connectCaptchaStrong',helper::FILTER_BOOLEAN),
'autoDisconnect' => $this->getInput('connectAutoDisconnect',helper::FILTER_BOOLEAN),
'captchaType' => $this->getInput('connectCaptchaType')
'captchaType' => $this->getInput('connectCaptchaType'),
'showPassword' => $this->getInput('connectShowPassword',helper::FILTER_BOOLEAN),
],
'i18n' => [
'enable' => $this->getInput('localei18n',helper::FILTER_BOOLEAN),

View File

@ -11,16 +11,18 @@
</h4>
<div class="row">
<div class="col3">
<div class="row">
<?php echo template::checkbox('connectCaptcha', true, 'Captcha à la connexion', [
'checked' => $this->getData(['config', 'connect','captcha'])
]); ?>
</div>
<div class="col3">
<div class="row">
<?php echo template::checkbox('connectCaptchaStrong', true, 'Captcha complexe', [
'checked' => $this->getData(['config', 'connect', '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>
<div class="col3">
<?php echo template::select('connectCaptchaType', $module::$captchaTypes , [
'label' => 'Type de captcha',
@ -33,6 +35,12 @@
'help' => 'Déconnecte les sessions ouvertes précédemment sur d\'autres navigateurs ou terminaux. Activation recommandée.'
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('connectShowPassword', true, 'Dévoile le mot de passe', [
'checked' => $this->getData(['config','connect', 'showPassword']),
'help' => 'Dans l\'écran de connexion, active une icône dont le survol dévoile temporairement le mot de passe.'
]); ?>
</div>
</div>
<div class="row">
<div class="col3">

View File

@ -37,7 +37,8 @@ class init extends common {
'captcha' => true,
'captchaStrong' => false,
"captchaType" => 'num',
'autoDisconnect' => true
'autoDisconnect' => true,
'showPassword' => true
],
'i18n' => [
'enable'=> true,

View File

@ -1 +1,17 @@
/** vide */
/**
* This file is part of Zwii.
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/
#passwordLabel, #passwordIcon {
display: inline-flex;
}
#passwordIcon {
float: right;
}

View File

@ -0,0 +1,20 @@
/**
* This file is part of Zwii.
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/
$(document).ready(function(){
$(".zwiico-eye").mouseenter(function() {
$("#userLoginPassword").attr("type", 'text');
});
$(".zwiico-eye").mouseleave(function() {
$("#userLoginPassword").attr("type", 'password');
});
});

View File

@ -7,8 +7,14 @@
]); ?>
</div>
<div class="col6">
<?php if ($this->getData(['config', 'connect', 'showPassword']) === true) {
$passwordLabel = '<span id="passwordLabel">Mot de passe</span><span id="passwordIcon">'. template::ico('eye') . '</span>';
} else {
$passwordLabel = 'Mot de passe';
}
?>
<?php echo template::password('userLoginPassword', [
'label' => 'Mot de passe'
'label' => $passwordLabel
]); ?>
</div>
</div>

View File

@ -39,6 +39,7 @@
.zwiico-divide:before { content: '\e824'; } /* '' */
.zwiico-flag:before { content: '\e825'; } /* '' */
.zwiico-search:before { content: '\e826'; } /* '' */
.zwiico-eye-1:before { content: '\e827'; } /* '' */
.zwiico-spin:before { content: '\e831'; } /* '' */
.zwiico-twitter:before { content: '\f099'; } /* '' */
.zwiico-facebook:before { content: '\f09a'; } /* '' */

File diff suppressed because one or more lines are too long

View File

@ -39,6 +39,7 @@
.zwiico-divide { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe824;&nbsp;'); }
.zwiico-flag { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe825;&nbsp;'); }
.zwiico-search { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe826;&nbsp;'); }
.zwiico-eye-1 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe827;&nbsp;'); }
.zwiico-spin { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe831;&nbsp;'); }
.zwiico-twitter { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf099;&nbsp;'); }
.zwiico-facebook { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf09a;&nbsp;'); }

View File

@ -50,6 +50,7 @@
.zwiico-divide { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe824;&nbsp;'); }
.zwiico-flag { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe825;&nbsp;'); }
.zwiico-search { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe826;&nbsp;'); }
.zwiico-eye-1 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe827;&nbsp;'); }
.zwiico-spin { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe831;&nbsp;'); }
.zwiico-twitter { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf099;&nbsp;'); }
.zwiico-facebook { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf09a;&nbsp;'); }

View File

@ -1,11 +1,11 @@
@font-face {
font-family: 'zwiico';
src: url('../font/zwiico.eot?32340763');
src: url('../font/zwiico.eot?32340763#iefix') format('embedded-opentype'),
url('../font/zwiico.woff2?32340763') format('woff2'),
url('../font/zwiico.woff?32340763') format('woff'),
url('../font/zwiico.ttf?32340763') format('truetype'),
url('../font/zwiico.svg?32340763#zwiico') format('svg');
src: url('../font/zwiico.eot?28623358');
src: url('../font/zwiico.eot?28623358#iefix') format('embedded-opentype'),
url('../font/zwiico.woff2?28623358') format('woff2'),
url('../font/zwiico.woff?28623358') format('woff'),
url('../font/zwiico.ttf?28623358') format('truetype'),
url('../font/zwiico.svg?28623358#zwiico') format('svg');
font-weight: normal;
font-style: normal;
}
@ -15,12 +15,11 @@
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'zwiico';
src: url('../font/zwiico.svg?32340763#zwiico') format('svg');
src: url('../font/zwiico.svg?28623358#zwiico') format('svg');
}
}
*/
[class^="zwiico-"]:before, [class*=" zwiico-"]:before {
[class^="zwiico-"]:before, [class*=" zwiico-"]:before {
font-family: "zwiico";
font-style: normal;
font-weight: normal;
@ -95,6 +94,7 @@
.zwiico-divide:before { content: '\e824'; } /* '' */
.zwiico-flag:before { content: '\e825'; } /* '' */
.zwiico-search:before { content: '\e826'; } /* '' */
.zwiico-eye-1:before { content: '\e827'; } /* '' */
.zwiico-spin:before { content: '\e831'; } /* '' */
.zwiico-twitter:before { content: '\f099'; } /* '' */
.zwiico-facebook:before { content: '\f09a'; } /* '' */

Binary file not shown.

View File

@ -86,6 +86,8 @@
<glyph glyph-name="search" unicode="&#xe826;" d="M643 386q0 103-73 176t-177 74-177-74-73-176 73-177 177-73 177 73 73 177z m286-465q0-29-22-50t-50-21q-30 0-50 21l-191 191q-100-69-223-69-80 0-153 31t-125 84-84 125-31 153 31 152 84 126 125 84 153 31 153-31 125-84 84-126 31-152q0-123-69-223l191-191q21-21 21-51z" horiz-adv-x="928.6" />
<glyph glyph-name="eye-1" unicode="&#xe827;" d="M488 695c291 0 487-340 487-340s-196-339-487-339-488 339-488 339 196 340 488 340z m0-579c131 0 238 108 238 239s-107 239-238 239-239-108-239-239 107-239 239-239z m107 239c0-59-50-106-107-106-59 0-107 47-107 106 0 57 48 107 107 107 57 0 107-50 107-107z" horiz-adv-x="975" />
<glyph glyph-name="spin" unicode="&#xe831;" d="M46 144l0 0c0 0-1 0-1 0-8 18-15 37-21 55-6 19-11 38-15 58-19 99-8 203 35 298 3 6 10 8 15 5 1 0 2 0 2-1l0 0 80-59c5-3 6-9 4-14-5-12-9-25-12-37-4-13-7-26-9-40-11-67-3-137 23-201 2-5 0-10-4-13l0 0-80-56c-5-4-12-2-16 3-1 0-1 1-1 2l0 0z m120 574l0 0c0 1 0 1 0 1 15 13 30 25 46 37 16 11 33 22 51 31 89 50 192 72 297 60 6-1 10-6 10-13 0-1-1-1-1-2l0 0-31-94c-2-5-8-8-13-7-13 0-27 0-40 0-14-1-27-2-40-4-68-11-133-40-186-84-4-3-10-3-14 0l0 0-79 58c-5 3-6 11-2 16 0 0 1 1 2 1l0 0z m588 65l0 0c0 0 1 0 1 0 17-10 34-21 50-32 16-12 31-25 46-38 74-69 127-160 148-262 2-6-2-12-9-13-1 0-1 0-2 0l0 0-100 1c-5 0-10 4-11 9-3 13-8 26-12 38-5 12-10 25-17 36-31 61-78 113-137 150-5 3-6 8-5 13l0 0 31 92c2 6 9 9 15 7 1 0 2-1 2-1l0 0z m244-535l0 0c0 0 0 0 0 0-4-20-9-39-15-57-7-19-14-37-22-55-44-92-114-170-205-221-6-3-13-1-16 4 0 1-1 2-1 2l0 0-30 94c-2 6 1 12 6 14 11 7 22 15 32 23 11 9 21 18 30 27 49 48 84 109 101 176 2 5 6 8 11 8l0 0 98-1c6 0 11-5 11-11 0-1 0-2 0-3l0 0z m-438-395l0 0c0 0 0 0 0 0-20-2-40-3-60-3-20 0-40 1-59 4-102 12-198 54-276 125-5 4-5 11 0 16 0 0 1 1 1 1l0 0 81 58c5 3 12 2 16-2 10-8 20-16 32-23 11-7 22-14 34-20 62-31 131-45 200-41 6 0 10-3 12-8l0 0 29-92c2-6-1-12-7-14-1-1-2-1-3-1l0 0z" horiz-adv-x="1000" />
<glyph glyph-name="twitter" unicode="&#xf099;" d="M904 622q-37-54-90-93 0-8 0-23 0-73-21-145t-64-139-103-117-144-82-181-30q-151 0-276 81 19-2 43-2 126 0 224 77-59 1-105 36t-64 89q19-3 34-3 24 0 48 6-63 13-104 62t-41 115v2q38-21 82-23-37 25-59 64t-22 86q0 49 25 91 68-83 164-133t208-55q-5 21-5 41 0 75 53 127t127 53q79 0 132-57 61 12 115 44-21-64-80-100 52 6 104 28z" horiz-adv-x="928.6" />

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.