45 lines
1.9 KiB
HTML
45 lines
1.9 KiB
HTML
<mat-card *ngIf="externals && externals.length > 0">
|
|
<mat-card-content>
|
|
<h2>{{'login.external' | i18n}}</h2>
|
|
<mat-error *ngIf="externalLoginInvalid">
|
|
{{'login.external.invalid' | i18n}}
|
|
</mat-error>
|
|
</mat-card-content>
|
|
<mat-card-actions>
|
|
<a class="external-login" href="{{apiUrl}}/{{client.loginUrl}}" *ngFor="let client of externals"
|
|
mat-raised-button color="accent">{{'login.external.client' | i18n:client.id}}</a>
|
|
</mat-card-actions>
|
|
</mat-card>
|
|
|
|
<form *ngIf="internalLogin || externals && externals.length < 1" action="{{apiUrl}}/login" method="POST" #loginForm>
|
|
<mat-card>
|
|
<mat-card-content>
|
|
<h2>{{'login.internal' | i18n}}</h2>
|
|
<mat-error *ngIf="loginInvalid">
|
|
{{'login.invalid' | i18n}}
|
|
</mat-error>
|
|
<mat-form-field>
|
|
<input id="username" name="username" matInput placeholder="{{'username' | i18n}}" required matAutofocus>
|
|
<mat-error>
|
|
{{'username.missing' | i18n}}
|
|
</mat-error>
|
|
</mat-form-field>
|
|
<mat-form-field>
|
|
<input id="password" name="password" matInput type="password" placeholder="{{'password' | i18n}}"
|
|
required>
|
|
<mat-error>
|
|
{{'password.invalid.hint' | i18n}}
|
|
</mat-error>
|
|
</mat-form-field>
|
|
<mat-slide-toggle id="remember-me" name="remember-me">
|
|
{{'login.keepSession' | i18n}}
|
|
</mat-slide-toggle>
|
|
</mat-card-content>
|
|
<mat-card-actions>
|
|
<button type="submit" (click)="loginForm.submit()" mat-raised-button color="primary"
|
|
[disabled]="loginForm.invalid">{{'login' |
|
|
i18n}}<mat-icon style="font-size: 1em;">open_in_new
|
|
</mat-icon></button>
|
|
</mat-card-actions>
|
|
</mat-card>
|
|
</form> |