Skip to content
Snippets Groups Projects
Verified Commit 6a002e8d authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #8489 add view admin sendmail

parent b83b14e1
No related branches found
No related tags found
No related merge requests found
<div class="admin-container" [class.admin-is-mobile]="mobileQuery.matches">
<mat-sidenav-container autosize class="admin-sidenav-container" >
<mat-sidenav #snav [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56"
[opened]="mobileQuery.matches ? false : true">
<menu-shortcut></menu-shortcut>
<menu-nav></menu-nav>
</mat-sidenav>
<mat-sidenav-content>
<div *ngIf="loading" style="display:flex;height:100%;">
<mat-spinner style="margin:auto;"></mat-spinner>
</div>
<mat-card *ngIf="!loading" class="card-app-content">
<mat-tab-group>
<mat-tab label="{{lang.informations}}">
<form (ngSubmit)="onSubmit()" #passwordForm="ngForm">
<div class="form-group">
<div class="col-md-12">
<mat-form-field>
<input matInput placeholder="{{lang.host}}">
</mat-form-field>
</div>
</div>
<div class="col-md-12 text-center" style="padding:10px;">
<button mat-raised-button type="submit" color="primary">{{lang.validate}}</button>
<button mat-raised-button type="button" color="default" (click)="cancelModification()">{{lang.cancel}}</button>
</div>
</form>
</mat-tab>
</mat-tab-group>
</mat-card>
</mat-sidenav-content>
<mat-sidenav #snav2 [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56"
position='end' [opened]="mobileQuery.matches ? false : false" style="overflow-x:hidden;max-width:500px;">
</mat-sidenav>
</mat-sidenav-container>
</div>
\ No newline at end of file
import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core';
import { MediaMatcher } from '@angular/cdk/layout';
import { HttpClient } from '@angular/common/http';
import { LANG } from '../../translate.component';
import { MatSidenav } from '@angular/material';
import { NotificationService } from '../../notification.service';
import { HeaderService } from '../../../service/header.service';
declare function $j(selector: any): any;
declare var angularGlobals: any;
@Component({
templateUrl: "sendmail-administration.component.html",
providers: [NotificationService]
})
export class SendmailAdministrationComponent implements OnInit {
@ViewChild('snav') public sidenavLeft : MatSidenav;
@ViewChild('snav2') public sidenavRight : MatSidenav;
mobileQuery : MediaQueryList;
private _mobileQueryListener : () => void;
coreUrl : string;
lang : any = LANG;
loading : boolean = false;
sendmail: any = {
'host': '',
'SMTPAuth': false,
'username': '',
'password': '',
'SMTPSecure': 'ssl', //tls, ssl, starttls
'port': '',
};
sendmailClone: any = {};
constructor(changeDetectorRef: ChangeDetectorRef, media: MediaMatcher, public http: HttpClient, private notify: NotificationService, private headerService: HeaderService) {
$j("link[href='merged_css.php']").remove();
this.mobileQuery = media.matchMedia('(max-width: 768px)');
this._mobileQueryListener = () => changeDetectorRef.detectChanges();
this.mobileQuery.addListener(this._mobileQueryListener);
}
ngOnDestroy(): void {
this.mobileQuery.removeListener(this._mobileQueryListener);
}
ngOnInit(): void {
this.headerService.headerMessage = '???';
window['MainHeaderComponent'].setSnav(this.sidenavLeft);
window['MainHeaderComponent'].setSnavRight(null);
this.loading = true;
this.coreUrl = angularGlobals.coreUrl;
// this.http.get(this.coreUrl + 'rest/sendmail')
// .subscribe((data: any) => {
// }, (err) => {
// this.notify.error(err.error.errors);
// });
this.loading = false;
}
cancelModification() {
this.sendmail = JSON.parse(JSON.stringify(this.sendmailClone));
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment