From 787a323001c49b62e70d4c5cd79f355ac997d5db Mon Sep 17 00:00:00 2001 From: fredtempez Date: Mon, 13 Dec 2021 13:30:20 +0100 Subject: [PATCH] =?UTF-8?q?Bug=20pr=C3=A9sentation=20options=20smtp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/module/config/config.php | 2 +- core/module/config/view/index/index.js.php | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/core/module/config/config.php b/core/module/config/config.php index 9a3f7e58..ac3684b9 100644 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -492,7 +492,7 @@ class config extends common { 'auth' => $this->getInput('smtpAuth',helper::FILTER_BOOLEAN), 'secure' => $this->getInput('smtpSecure',helper::FILTER_BOOLEAN), 'username' => $this->getInput('smtpUsername',helper::FILTER_STRING_SHORT,$this->getInput('smtpAuth',helper::FILTER_BOOLEAN)), - 'password' =>helper::encrypt($this->getData(['config','smtp','username']),$this->getInput('smtpPassword',$this->getInput('smtpAuth',helper::FILTER_BOOLEAN))), + 'password' =>helper::encrypt($this->getData(['config','smtp','username']),$this->getInput('smtpPassword',null,$this->getInput('smtpAuth',helper::FILTER_BOOLEAN))), 'sender' => $this->getInput('smtpSender',helper::FILTER_MAIL) ], 'seo' => [ diff --git a/core/module/config/view/index/index.js.php b/core/module/config/view/index/index.js.php index 746f2464..2bd7d6c4 100644 --- a/core/module/config/view/index/index.js.php +++ b/core/module/config/view/index/index.js.php @@ -29,7 +29,7 @@ $( document).ready(function() { * Afficher et masquer options Auth */ - if ($("select[name=smtpEnable]").val() == true) { + if ($("select[name=smtpAuth]").val() == true) { $("#smtpAuthParam").addClass("disabled"); $("#smtpAuthParam").slideDown(); } else { @@ -202,16 +202,20 @@ $( document).ready(function() { /* var containers = ["setup", "locale", "social", "connect", "network"]; $.each( containers, function( index, value ){ - console.log(value); var a = $("div#" + value + "Container").find("input.notice").not(".displayNone"); if (a.length > 0) { $("#config" + capitalizeFirstLetter(a) + "Button").addClass("buttonNotice"); } else { $("#config" + capitalizeFirstLetter(a) + "Button").removeClass("buttonNotice"); } - }); - */ - + });*/ + + var locale = $("div#networkContainer").find("input.notice").not(".displayNone"); + if (locale.length > 0) { + $("#configNetworkButton").addClass("buttonNotice"); + } else { + $("#configNetworkButton").removeClass("buttonNotice"); + } var locale = $("div#localeContainer").find("input.notice").not(".displayNone"); if (locale.length > 0) { $("#configLocaleButton").addClass("buttonNotice");