From 73cd16b953bb510ae30e096d98b98469e78b3744 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Mon, 11 May 2020 12:15:51 +0200 Subject: [PATCH] =?UTF-8?q?Am=C3=A9lioreation=20form=20+=20param=20smtp=20?= =?UTF-8?q?false?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core.php | 5 +- core/module/config/view/index/index.js.php | 12 +-- core/module/config/view/index/index.php | 98 +++++++++++----------- 3 files changed, 59 insertions(+), 56 deletions(-) diff --git a/core/core.php b/core/core.php index 47742a6a..d34d6706 100755 --- a/core/core.php +++ b/core/core.php @@ -852,13 +852,14 @@ class common { ob_start(); include 'core/layout/mail.php'; $layout = ob_get_clean(); - $mail = new PHPMailer\PHPMailer\PHPMailer; - // $mail->SMTPDebug = PHPMailer\PHPMailer\SMTP::DEBUG_SERVER; + $mail = new PHPMailer\PHPMailer\PHPMailer; // Mail try{ // Paramètres SMTP if ($this->getdata(['config','smtp','enable'])) { + // $mail->SMTPDebug = PHPMailer\PHPMailer\SMTP::DEBUG_SERVER; $mail->isSMTP(); + $mail->SMTPAutoTLS = false; $mail->Host = $this->getdata(['config','smtp','host']); $mail->Port = (int) $this->getdata(['config','smtp','port']); if ($this->getData(['config','smtp','auth'])) { diff --git a/core/module/config/view/index/index.js.php b/core/module/config/view/index/index.js.php index e4c85d3d..f0faf8c7 100755 --- a/core/module/config/view/index/index.js.php +++ b/core/module/config/view/index/index.js.php @@ -14,12 +14,12 @@ * Modification de l'affichage de l'icône de langues */ - -var configdisablei18nDOM = $("#configdisablei18n"); -configdisablei18nDOM.on("change", function() { - if ($("input[name=configdisablei18n]").is(':checked')) { - $(".zwiico-flag").css('display','none'); +$("input[name=configSmtpEnable]").on("change", function() { + if ($("input[name=configSmtpEnable]").is(':checked')) { + $(".configSmtpParam").addClass("disabled"); + $(".configSmtpParam").slideDown(); } else { - $(".zwiico-flag").css('display','block'); + $(".configSmtpParam").removeClass("disabled"); + $(".configSmtpParam").slideUp(); } }); \ No newline at end of file diff --git a/core/module/config/view/index/index.php b/core/module/config/view/index/index.php index 694131b0..4642b2be 100755 --- a/core/module/config/view/index/index.php +++ b/core/module/config/view/index/index.php @@ -335,55 +335,57 @@ ]); ?> -
-
- 'Adresse SMTP', - 'placeholder' => 'smtp.fr', - 'value' => $this->getData(['config', 'smtp','host']) - ]); ?> +
+
+
+ 'Adresse SMTP', + 'placeholder' => 'smtp.fr', + 'value' => $this->getData(['config', 'smtp','host']) + ]); ?> +
+
+ 'Mail expéditeur', + 'value' => $this->getData(['config', 'smtp','sender']) + ]); ?> +
+
+ 'Port SMTP', + 'placeholder' => '589', + 'value' => $this->getData(['config', 'smtp','port']) + ]); ?> +
+
+
+
+ 'Authentification', + 'selected' => $this->getData(['config', 'smtp','auth']) + ]); ?> +
+
+ 'Nom utilisateur', + 'value' => $this->getData(['config', 'smtp','username' ]) + ]); ?> +
+
+ 'Mot de passe', + 'autocomplete' => 'off', + 'value' => $this->getData(['config', 'smtp','password' ]) + ]); ?> +
+
+ 'Sécurité', + 'selected' => $this->getData(['config', 'smtp','secure']) + ]); ?> +
-
- 'Mail expéditeur', - 'value' => $this->getData(['config', 'smtp','sender']) - ]); ?> -
-
- 'Port SMTP', - 'placeholder' => '589', - 'value' => $this->getData(['config', 'smtp','port']) - ]); ?> -
-
-
-
- 'Authentification', - 'selected' => $this->getData(['config', 'smtp','auth']) - ]); ?> -
-
- 'Nom utilisateur', - 'value' => $this->getData(['config', 'smtp','username' ]) - ]); ?> -
-
- 'Mot de passe', - 'autocomplete' => 'off', - 'value' => $this->getData(['config', 'smtp','password' ]) - ]); ?> -
-
- 'Sécurité', - 'selected' => $this->getData(['config', 'smtp','secure']) - ]); ?> -
-
+