forked from ZwiiCMS-Team/ZwiiCMS
Amélioreation form + param smtp false
This commit is contained in:
parent
5542ba5193
commit
73cd16b953
@ -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'])) {
|
||||
|
@ -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();
|
||||
}
|
||||
});
|
@ -335,55 +335,57 @@
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col5">
|
||||
<?php echo template::text('configSmtpHost', [
|
||||
'label' => 'Adresse SMTP',
|
||||
'placeholder' => 'smtp.fr',
|
||||
'value' => $this->getData(['config', 'smtp','host'])
|
||||
]); ?>
|
||||
<div class="configSmtpParam">
|
||||
<div class="row">
|
||||
<div class="col5">
|
||||
<?php echo template::text('configSmtpHost', [
|
||||
'label' => 'Adresse SMTP',
|
||||
'placeholder' => 'smtp.fr',
|
||||
'value' => $this->getData(['config', 'smtp','host'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col5">
|
||||
<?php echo template::text('configSmtpSender', [
|
||||
'label' => 'Mail expéditeur',
|
||||
'value' => $this->getData(['config', 'smtp','sender'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::text('configSmtpPort', [
|
||||
'label' => 'Port SMTP',
|
||||
'placeholder' => '589',
|
||||
'value' => $this->getData(['config', 'smtp','port'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::select('configSmtpAuth', $module::$SMTPauth, [
|
||||
'label' => 'Authentification',
|
||||
'selected' => $this->getData(['config', 'smtp','auth'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::text('configSmtpUsername', [
|
||||
'label' => 'Nom utilisateur',
|
||||
'value' => $this->getData(['config', 'smtp','username' ])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::password('configSmtpPassword', [
|
||||
'label' => 'Mot de passe',
|
||||
'autocomplete' => 'off',
|
||||
'value' => $this->getData(['config', 'smtp','password' ])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::select('configSmtpSecure', $module::$SMTPEnc , [
|
||||
'label' => 'Sécurité',
|
||||
'selected' => $this->getData(['config', 'smtp','secure'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col5">
|
||||
<?php echo template::text('configSmtpSender', [
|
||||
'label' => 'Mail expéditeur',
|
||||
'value' => $this->getData(['config', 'smtp','sender'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::text('configSmtpPort', [
|
||||
'label' => 'Port SMTP',
|
||||
'placeholder' => '589',
|
||||
'value' => $this->getData(['config', 'smtp','port'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::select('configSmtpAuth', $module::$SMTPauth, [
|
||||
'label' => 'Authentification',
|
||||
'selected' => $this->getData(['config', 'smtp','auth'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::text('configSmtpUsername', [
|
||||
'label' => 'Nom utilisateur',
|
||||
'value' => $this->getData(['config', 'smtp','username' ])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::password('configSmtpPassword', [
|
||||
'label' => 'Mot de passe',
|
||||
'autocomplete' => 'off',
|
||||
'value' => $this->getData(['config', 'smtp','password' ])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::select('configSmtpSecure', $module::$SMTPEnc , [
|
||||
'label' => 'Sécurité',
|
||||
'selected' => $this->getData(['config', 'smtp','secure'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user