bug animation smtp

This commit is contained in:
fredtempez 2021-12-06 12:03:48 +01:00
parent cd4ed108b8
commit 16b934ccc4
1 changed files with 26 additions and 25 deletions

View File

@ -16,26 +16,26 @@ $( document).ready(function() {
//----------------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------------
/** /**
* Afficher et masquer options SMTP * Afficher et masquer options smtp
*/ */
if ($("input[name=SmtpEnable]").is(':checked')) { if ($("input[name=smtpEnable]").is(':checked')) {
$("#SmtpParam").addClass("disabled"); console.log("init");
$("#SmtpParam").slideDown(); $("#smtpParam").addClass("disabled");
$("#smtpParam").slideDown();
} else { } else {
$("#SmtpParam").removeClass("disabled"); $("#smtpParam").removeClass("disabled");
$("#SmtpParam").slideUp(); $("#smtpParam").slideUp();
} }
/** /**
* Afficher et masquer options Auth * Afficher et masquer options Auth
*/ */
if ($("select[name=SmtpEnable]").val() == true) { if ($("select[name=smtpEnable]").val() == true) {
$("#SmtpAuthParam").addClass("disabled"); $("#smtpAuthParam").addClass("disabled");
$("#SmtpAuthParam").slideDown(); $("#smtpAuthParam").slideDown();
} else { } else {
$("#SmtpAuthParam").removeClass("disabled"); $("#smtpAuthParam").removeClass("disabled");
$("#SmtpAuthParam").slideUp(); $("#smtpAuthParam").slideUp();
} }
var configLayout = getCookie("configLayout"); var configLayout = getCookie("configLayout");
@ -56,15 +56,16 @@ $( document).ready(function() {
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
/** /**
* Afficher et masquer options SMTP * Afficher et masquer options smtp
*/ */
$("input[name=SmtpEnable]").on("change", function() { $("input[name=smtpEnable]").on("change", function() {
if ($("input[name=SmtpEnable]").is(':checked')) { console.log("truc");
$("#SmtpParam").addClass("disabled"); if ($("input[name=smtpEnable]").is(':checked')) {
$("#SmtpParam").slideDown(); $("#smtpParam").addClass("disabled");
$("#smtpParam").slideDown();
} else { } else {
$("#SmtpParam").removeClass("disabled"); $("#smtpParam").removeClass("disabled");
$("#SmtpParam").slideUp(); $("#smtpParam").slideUp();
} }
}); });
@ -72,13 +73,13 @@ $( document).ready(function() {
* Afficher et masquer options Auth * Afficher et masquer options Auth
*/ */
$("select[name=SmtpAuth]").on("change", function() { $("select[name=smtpAuth]").on("change", function() {
if ($("select[name=SmtpAuth]").val() == true) { if ($("select[name=smtpAuth]").val() == true) {
$("#SmtpAuthParam").addClass("disabled"); $("#smtpAuthParam").addClass("disabled");
$("#SmtpAuthParam").slideDown(); $("#smtpAuthParam").slideDown();
} else { } else {
$("#SmtpAuthParam").removeClass("disabled"); $("#smtpAuthParam").removeClass("disabled");
$("#SmtpAuthParam").slideUp(); $("#smtpAuthParam").slideUp();
} }
}); });