Newer
Older
<div id="page" class="login-page" [style]="'justify-content:center; align-items:center; height:100%'">
<div fxLayout="row" [style]="'justify-content:center; align-items:center; height:100%'">
<mat-card *ngIf="isUserAuthSSOEnabled() == true" fxFlex="400px" class="login-panel" >
<mat-card-title class="title-panel">{{ "login.title.sso.login" | translate }} {{ lookups.cachedApplicationInfo.ssoAuthenticationLabel }}

Joze RIHTARSIC
committed
</mat-card-title>
<mat-card-content class="login-panel-content">
<a mat-raised-button color="primary" href="{{lookups.cachedApplicationInfo.ssoAuthenticationURI}}">
<span>{{ "login.button.sso.login" | translate }}</span>
</a>
</mat-card-content>
</mat-card>
<mat-card *ngIf="isUserAuthPasswdEnabled() == true" class="login-panel">
<mat-card-title class="title-panel">{{ "login.title.smp.login" | translate }}</mat-card-title>
<mat-card-content class="login-panel-content">

Joze RIHTARSIC
committed
<mat-tab-group>
<mat-tab label="{{ 'login.label.login' | translate }}">

Joze RIHTARSIC
committed
<ng-container *ngTemplateOutlet="loginFormContainer"></ng-container>
</mat-tab>
<mat-tab label="{{ 'login.label.password.reset' | translate }}">

Joze RIHTARSIC
committed
<ng-container *ngTemplateOutlet="requestResetContainer"></ng-container>
</mat-tab>
</mat-tab-group>

Joze RIHTARSIC
committed
<ng-template #loginFormContainer>
<div [formGroup]="loginForm" class="form-control" (ngSubmit)="login()" (keydown.enter)="onLoginFormEnterKeyDown($event)">

Joze RIHTARSIC
committed
<mat-form-field style="width: 100%">
<mat-label>{{ "login.label.login.username" | translate }}</mat-label>

Joze RIHTARSIC
committed
<input matInput id="username_id"
formControlName="username"
auto-focus-directive
required>
</mat-form-field>
<mat-form-field style="width: 100%">
<mat-label>{{ "login.label.password" | translate }}</mat-label>

Joze RIHTARSIC
committed
<input matInput id="password_id" type="password"

Joze RIHTARSIC
committed
formControlName="password" required>
</mat-form-field>
<button mat-raised-button color="primary" id="loginbutton_id" [disabled]="!loginForm.valid"
(click)="login()">

Joze RIHTARSIC
committed
<mat-icon>input</mat-icon>
<span>{{ "login.button.login" | translate }}</span>

Joze RIHTARSIC
committed
</button>
</div>
</ng-template>
<ng-template #requestResetContainer>
<div [formGroup]="resetForm" class="form-control">
<mat-form-field style="width: 100%">
<mat-label>{{ "login.label.password.reset.username" | translate }}</mat-label>

Joze RIHTARSIC
committed
<input matInput id="reset_username_id"
formControlName="resetUsername"
auto-focus-directive
required>
</mat-form-field>
<button mat-raised-button color="primary" id="resetbutton_id" [disabled]="!resetForm.valid"
[style]="'width:250px'"
(click)="requestCredentialReset()"
>
<mat-icon>input</mat-icon>
<span>{{ "login.button.password.reset" | translate }}</span>

Joze RIHTARSIC
committed
</button>
</div>
</ng-template>