2019-12-10 10:53:31 +01:00
|
|
|
/**
|
|
|
|
* 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-2020, Frédéric Tempez
|
|
|
|
* @license GNU General Public License, version 3
|
|
|
|
* @link http://zwiicms.com/
|
|
|
|
*/
|
|
|
|
|
2020-05-29 17:53:30 +02:00
|
|
|
$( document).ready(function() {
|
2020-05-11 17:02:32 +02:00
|
|
|
/**
|
|
|
|
* Afficher et masquer options SMTP
|
|
|
|
*/
|
|
|
|
if ($("input[name=configSmtpEnable]").is(':checked')) {
|
|
|
|
$("#configSmtpParam").addClass("disabled");
|
2020-05-29 17:53:30 +02:00
|
|
|
$("#configSmtpParam").slideDown();
|
2020-05-11 17:02:32 +02:00
|
|
|
} else {
|
|
|
|
$("#configSmtpParam").removeClass("disabled");
|
2020-05-29 17:53:30 +02:00
|
|
|
$("#configSmtpParam").slideUp();
|
2020-05-11 17:02:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Afficher et masquer options Auth
|
|
|
|
*/
|
|
|
|
|
2020-05-29 17:53:30 +02:00
|
|
|
if ($("select[name=configSmtpAuth]").val() == true) {
|
2020-05-11 17:02:32 +02:00
|
|
|
$("#configSmtpAuthParam").addClass("disabled");
|
2020-05-29 17:53:30 +02:00
|
|
|
$("#configSmtpAuthParam").slideDown();
|
|
|
|
} else {
|
2020-05-11 17:02:32 +02:00
|
|
|
$("#configSmtpAuthParam").removeClass("disabled");
|
2020-05-29 17:53:30 +02:00
|
|
|
$("#configSmtpAuthParam").slideUp();
|
2020-05-11 17:02:32 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2019-12-10 10:53:31 +01:00
|
|
|
/**
|
2020-05-11 17:02:32 +02:00
|
|
|
* Afficher et masquer options SMTP
|
2019-12-10 10:53:31 +01:00
|
|
|
*/
|
2020-05-29 17:53:30 +02:00
|
|
|
$("input[name=configSmtpEnable]").on("change", function() {
|
2020-05-11 12:15:51 +02:00
|
|
|
if ($("input[name=configSmtpEnable]").is(':checked')) {
|
2020-05-11 17:02:32 +02:00
|
|
|
$("#configSmtpParam").addClass("disabled");
|
2020-05-29 17:53:30 +02:00
|
|
|
$("#configSmtpParam").slideDown();
|
2020-05-07 08:36:24 +02:00
|
|
|
} else {
|
2020-05-11 17:02:32 +02:00
|
|
|
$("#configSmtpParam").removeClass("disabled");
|
2020-05-29 17:53:30 +02:00
|
|
|
$("#configSmtpParam").slideUp();
|
2020-05-11 17:02:32 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Afficher et masquer options Auth
|
|
|
|
*/
|
|
|
|
|
2020-05-29 17:53:30 +02:00
|
|
|
$("select[name=configSmtpAuth]").on("change", function() {
|
|
|
|
if ($("select[name=configSmtpAuth]").val() == true) {
|
2020-05-11 17:02:32 +02:00
|
|
|
$("#configSmtpAuthParam").addClass("disabled");
|
2020-05-29 17:53:30 +02:00
|
|
|
$("#configSmtpAuthParam").slideDown();
|
|
|
|
} else {
|
2020-05-11 17:02:32 +02:00
|
|
|
$("#configSmtpAuthParam").removeClass("disabled");
|
2020-05-29 17:53:30 +02:00
|
|
|
$("#configSmtpAuthParam").slideUp();
|
2020-05-07 08:36:24 +02:00
|
|
|
}
|
2020-05-11 17:02:32 +02:00
|
|
|
});
|
2020-05-29 17:53:30 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Options de blocage de connexions choix aucun
|
|
|
|
*/
|
|
|
|
$("select[name=configConnectAttempt]").on("change", function() {
|
|
|
|
if ($("select[name=configConnectAttempt]").val() === "999") {
|
|
|
|
$("select[name=configConnectTimeout]").val(0);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
$("select[name=configConnectTimeout]").on("change", function() {
|
|
|
|
if ($("select[name=configConnectTimeout]").val() === "0") {
|
|
|
|
$("select[name=configConnectAttempt]").val(999);
|
|
|
|
}
|
|
|
|
});
|