login.component.html 2.67 KB
Newer Older
1
<ion-content class="login-content">
Alex ORLUC's avatar
Alex ORLUC committed
2
    <mat-icon svgIcon="maarchLogo" class="maarchLogo"></mat-icon>
3

4
    <ion-card style="width: 400px;position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);">
5
        <ion-card-header *ngIf="!functions.empty(authService.loginMessage)">
6
7
8
9
            <ion-card-subtitle class="loginMessage">
                <div [innerHTML]="authService.loginMessage | safeHtml"></div>
            </ion-card-subtitle>
        </ion-card-header>
10
11
12
13
        <ion-card-content>
            <form (ngSubmit)="onSubmit()" [formGroup]="loginForm">
                <ion-item>
                    <ion-label position="floating">{{'lang.login' | translate}}</ion-label>
14
                    <ion-input formControlName="login" type="text" (keyup.enter)="onSubmit()"></ion-input>
15
16
17
                </ion-item>
                <ion-item>
                    <ion-label position="floating">{{'lang.password' | translate}}</ion-label>
18
19
                    <ion-input name="password" matInput type="password" formControlName="password"
                        (keyup.enter)="onSubmit()"></ion-input>
20
                </ion-item>
21
                <div class="connection-type">
22
                    <a routerLink="/forgot-password" *ngIf="authService.authMode === 'default' && authService.mailServerOnline"
23
                        class="forgot-password">{{'lang.forgotPassword' | translate}}</a>
24
25
                    <a (click)="mailServerOffline()" *ngIf="authService.authMode === 'default' && !authService.mailServerOnline"
                        class="forgot-password" style="cursor: pointer; text-decoration: underline">{{'lang.forgotPassword' | translate}}</a>
26
27
28
29
30
31
32
33
34
                    <a href="" *ngIf="authService.authMode === 'ldap'"
                        class="forgot-password">{{'lang.ldapEnabled' | translate}}</a>
                    <a href="" *ngIf="authService.authMode === 'kerberos'"
                        class="forgot-password">{{'lang.kerberosEnabled' | translate}}</a>
                    <a href="" *ngIf="authService.authMode === 'x509'"
                        class="forgot-password">{{'lang.x509Enabled' | translate}}</a>
                </div>
                <ion-button type="submit" expand="block" [disabled]="loginForm.invalid || loading">
                    {{'lang.connect' | translate}}
35
36
37
38
39
                </ion-button>
            </form>
        </ion-card-content>
    </ion-card>
    <ion-note class="version-info">
Alex ORLUC's avatar
Alex ORLUC committed
40
        Maarch Parapheur {{environment.VERSION}} <a *ngIf="commitHash !== null" style="color: white" target="blank" href="{{'lang.repoUrl' | translate}}/commit/{{commitHash}}">{{commitHash.substring(0, 8)}}</a> Powered by {{environment.AUTHOR}}
41
    </ion-note>
42
</ion-content>