visibilité du mot de passe + suite banniere

This commit is contained in:
Deltacms 2022-12-19 09:14:38 +01:00
parent 5608e6071d
commit a6d9922495
12 changed files with 57 additions and 22 deletions

View File

@ -2,7 +2,8 @@
## Version 4.4.03 de Deltacms
- Modifications :
- Nouvelle option pour la bannière : une bannière animée avec Swiper
- Thème / bannière : nouvelle option : une bannière animée avec Swiper,
- Configuration / connexion : nouvelle option permettant de dévoiler le mot de passe,
- Corrections :
## Version 4.4.02 de Deltacms

View File

@ -555,22 +555,24 @@ $(document).ready(function(){
*/
$(window).on("resize", function() {
if( $(window).width() > 768 ){
var page=[];
if( '<?php echo $this->getData(['theme', 'menu', 'minWidthParentOrAll']); ?>' === ''){
page = parentPage;
// suppression d'un sous-menu depuis le dernier enregistrement de theme.css
$.each(allPage, function(index, value) {
// si la page n'est pas parent on repositionne min-width à auto
if( parentPage.includes( value ) === false ) $('nav li .' + value).css('min-width', 'auto');
if( typeof parentPage !== "undefined" ){
var page=[];
if( '<?php echo $this->getData(['theme', 'menu', 'minWidthParentOrAll']); ?>' === ''){
page = parentPage;
// suppression d'un sous-menu depuis le dernier enregistrement de theme.css
$.each(allPage, function(index, value) {
// si la page n'est pas parent on repositionne min-width à auto
if( parentPage.includes( value ) === false ) $('nav li .' + value).css('min-width', 'auto');
});
} else{
page = allPage;
}
$.each(page, function(index, value) {
$('nav li .' + value).css('min-width', '<?php echo $this->getData(['theme', 'menu', 'minWidthTab']); ?>');
$('nav li ul li .'+value).css('width', $('.'+value).css('width'));
$('nav li.' + value).css('text-align', 'left');
});
} else{
page = allPage;
}
$.each(page, function(index, value) {
$('nav li .' + value).css('min-width', '<?php echo $this->getData(['theme', 'menu', 'minWidthTab']); ?>');
$('nav li ul li .'+value).css('width', $('.'+value).css('width'));
$('nav li.' + value).css('text-align', 'left');
});
}
}).trigger("resize");

View File

@ -98,6 +98,7 @@ if ($this->getData(['core', 'dataVersion']) < 4403) {
$this->setData(['theme', 'header', 'swiperDirection', false]);
$this->setData(['theme', 'header', 'swiperTime', '2000']);
$this->setData(['theme', 'header', 'swiperTransition', '1000']);
$this->setData(['config', 'connect', 'passwordVisibility', false]);
// Mise à jour
$this->setData(['core', 'dataVersion', 4403]);
}

View File

@ -428,7 +428,8 @@ class config extends common {
'anonymousIp' => $this->getInput('connectAnonymousIp',helper::FILTER_INT),
'captcha' => $this->getInput('connectCaptcha',helper::FILTER_BOOLEAN),
'captchaBot' => $this->getInput('connectCaptchaBot',helper::FILTER_BOOLEAN),
'autoDisconnect' => $this->getInput('connectAutoDisconnect',helper::FILTER_BOOLEAN)
'autoDisconnect' => $this->getInput('connectAutoDisconnect',helper::FILTER_BOOLEAN),
'passwordVisibility' => $this->getInput('connectPasswordVisibility',helper::FILTER_BOOLEAN)
],
'i18n' => [
'enable' => $this->getInput('localei18n',helper::FILTER_BOOLEAN),

View File

@ -34,6 +34,8 @@ $text['core_config_view']['connect'][16] = 'French regulations require level 2 a
$text['core_config_view']['connect'][17] = 'Download log';
$text['core_config_view']['connect'][18] = 'Reset log';
$text['core_config_view']['connect'][19] = 'Simple Captcha for humans';
$text['core_config_view']['connect'][20] = 'Password visibility';
$text['core_config_view']['connect'][21] = 'Hovering over an icon reveals the password';
$text['core_config_view']['index'][0] = 'Home';
$text['core_config_view']['index'][1] = 'Help';
$text['core_config_view']['index'][2] = 'Configuration';

View File

@ -34,6 +34,8 @@ $text['core_config_view']['connect'][16] = 'La réglementation française impose
$text['core_config_view']['connect'][17] = 'Télécharger le journal';
$text['core_config_view']['connect'][18] = 'Réinitialiser le journal';
$text['core_config_view']['connect'][19] = 'Captcha simple pour les humains';
$text['core_config_view']['connect'][20] = 'Visibilité du mot de passe';
$text['core_config_view']['connect'][21] = 'Le survol d\'une icône dévoile le mot de passe';
$text['core_config_view']['index'][0] = 'Accueil';
$text['core_config_view']['index'][1] = 'Aide';
$text['core_config_view']['index'][2] = 'Configuration';

View File

@ -19,12 +19,18 @@ include('./core/module/config/lang/'. $this->getData(['config', 'i18n', 'langAdm
'checked' => $this->getData(['config', 'connect','captcha'])
]); ?>
</div>
<div class="col6">
<div class="col3">
<?php echo template::checkbox('connectCaptchaBot', true, $text['core_config_view']['connect'][19], [
'checked' => $this->getData(['config', 'connect', 'captchaBot']),
'help' => $text['core_config_view']['connect'][3]
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('connectPasswordVisibility', true, $text['core_config_view']['connect'][20], [
'checked' => $this->getData(['config', 'connect', 'passwordVisibility']),
'help' => $text['core_config_view']['connect'][21]
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('connectAutoDisconnect', true, $text['core_config_view']['connect'][5], [
'checked' => $this->getData(['config','connect', 'autoDisconnect']),

View File

@ -38,7 +38,8 @@ class init extends common {
'log' => false,
'anonymousIp' => 2,
'captcha' => true,
'captchaBot' => true
'captchaBot' => true,
'passwordVisibility' => false
],
'i18n' => [
'enable'=> true,

View File

@ -994,7 +994,6 @@ class theme extends common {
heightMod = heightImg * ( widthMod / widthImg );
$(".swiper-wrapper").css("width", widthMod);
$(".swiper-wrapper").css("height", heightMod);
console.log( widthSite +" * " + wclient +" ** " + widthMod + " - " + heightMod);
}
$.wrapper();
$(window).resize(function(){

View File

@ -17,4 +17,11 @@
.userInner{
display: inline-block;
}
#passwordLabel, #passwordIcon {
display: inline-flex;
}
#passwordIcon {
float: right;
}

View File

@ -13,7 +13,14 @@
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
*/
/* Visibilité du mot de passe */
$(".zwiico-eye").mouseenter(function() {
$("#userLoginPassword").attr("type","text");
});
$(".zwiico-eye").mouseleave(function() {
$("#userLoginPassword").attr("type","password");
});
/* Création et mise à jour du cookie sur modification d'un input */
$( ".humanBot" ).mouseleave(function() {

View File

@ -12,8 +12,14 @@ echo template::formOpen('userLoginForm');
]); ?>
</div>
<div class="col6">
<?php echo template::password('userLoginPassword', [
'label' => $text['core_user_view']['login'][1]
<?php
if( $this->getData(['config', 'connect', 'passwordVisibility']) === true){
$passwordLabel = '<span id="passwordLabel">'. $text['core_user_view']['login'][1] .'</span><span id="passwordIcon">' . template::ico('eye') . '</span>';
} else {
$passwordLabel = $text['core_user_view']['login'][1];
}
echo template::password('userLoginPassword', [
'label' => $passwordLabel
]); ?>
</div>
</div>