diff --git a/src/frontend/app/administration/sendmail/sendmail-administration.component.html b/src/frontend/app/administration/sendmail/sendmail-administration.component.html index 194da5a7df60bfd8d6d088593d47238058fc1af7..7434629a2bfd2c73b7a1b424a7362a9a7fda4b36 100644 --- a/src/frontend/app/administration/sendmail/sendmail-administration.component.html +++ b/src/frontend/app/administration/sendmail/sendmail-administration.component.html @@ -39,9 +39,9 @@ <div class="col-md-2"> <mat-form-field> <mat-select name="SMTPSecure" placeholder="{{lang.smtpAuth}}" [disabled]="sendmail.type != 'smtp'" - [(ngModel)]="sendmail.secure" required> - <mat-option *ngFor="let security of smtpSecList" [value]="security"> - {{security}} + [(ngModel)]="sendmail.secure"> + <mat-option *ngFor="let security of smtpSecList" [value]="security.id"> + {{security.label}} </mat-option> </mat-select> </mat-form-field> @@ -62,7 +62,7 @@ <div class="form-group" [style.opacity]="sendmail.type != 'smtp' ? '0.5' : '1'"> <div class="col-md-12"> <mat-slide-toggle color="primary" name="SMTPAuth" [(ngModel)]="sendmail.auth" - [disabled]="sendmail.type != 'smtp'">{{lang.enableAuth}}</mat-slide-toggle> + [disabled]="sendmail.type != 'smtp'"(change)="cleanAuthInfo()">{{lang.enableAuth}}</mat-slide-toggle> </div> </div> <div class="form-group" [style.opacity]="sendmail.type != 'smtp' ? '0.5' : '1'"> diff --git a/src/frontend/app/administration/sendmail/sendmail-administration.component.ts b/src/frontend/app/administration/sendmail/sendmail-administration.component.ts index f4014c844a54b4aba6409a4c86b1929bcbd15b32..4a4f10fa57a5720dab33e005c52f72e516d833a3 100644 --- a/src/frontend/app/administration/sendmail/sendmail-administration.component.ts +++ b/src/frontend/app/administration/sendmail/sendmail-administration.component.ts @@ -55,7 +55,20 @@ export class SendmailAdministrationComponent implements OnInit { } ]; smtpTypeDesc = ''; - smtpSecList = ['ssl', 'tls']; + smtpSecList = [ + { + id : '', + label : this.lang.none + }, + { + id : 'ssl', + label : 'ssl' + }, + { + id : 'tls', + label : 'tls' + } + ]; sendmailClone: any = {}; hidePassword: boolean = true; serverConnectionLoading: boolean = false; @@ -141,6 +154,9 @@ export class SendmailAdministrationComponent implements OnInit { } testEmailSend() { + if (JSON.stringify(this.sendmailClone) !== JSON.stringify(this.sendmail)) { + this.onSubmit(); + } this.emailSendResult = { icon: 'fa-paper-plane primary', msg: this.lang.emailSendInProgress, @@ -173,4 +189,9 @@ export class SendmailAdministrationComponent implements OnInit { }; }); } + + cleanAuthInfo() { + this.sendmail.user = ''; + this.sendmail.password = ''; + } } diff --git a/src/frontend/lang/lang-en.ts b/src/frontend/lang/lang-en.ts index 5eecdd943be551d268e7643a0a0aa52584d12b1b..f06f13b9758e633546c0c39c79c3491f6c4c808a 100755 --- a/src/frontend/lang/lang-en.ts +++ b/src/frontend/lang/lang-en.ts @@ -742,4 +742,5 @@ export const LANG_EN = { "smtpAuth" : "Authentication methode", "emailSendFailed" : "Email send failed", "doNotReply" : "Do not reply", + "none" : "None", }; diff --git a/src/frontend/lang/lang-fr.ts b/src/frontend/lang/lang-fr.ts index ce26afbe10bdfc3439edb8a1bd395c390445b24d..b3b4c780253fe46f02beebeec24ae2d02250898b 100755 --- a/src/frontend/lang/lang-fr.ts +++ b/src/frontend/lang/lang-fr.ts @@ -768,6 +768,7 @@ export const LANG_FR = { "smtpAuth" : "Méthode d'authentification", "emailSendFailed" : "Échec d'envoi", "doNotReply" : "Ne pas répondre", + "none" : "Aucune", }; diff --git a/src/frontend/lang/lang-nl.ts b/src/frontend/lang/lang-nl.ts index 700168f41752b4cb90232ff3ebb10ebc3863a863..122ac5d33435de1aaedcbc4a43aed385eec9d30d 100755 --- a/src/frontend/lang/lang-nl.ts +++ b/src/frontend/lang/lang-nl.ts @@ -771,4 +771,5 @@ export const LANG_NL = { "sendmailShort" : "_TO_TRANSLATE", "emailSendFailed" : "_TO_TRANSLATE", "doNotReply" : "_TO_TRANSLATE", + "none" : "_TO_TRANSLATE", };