Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
login.component.html 2.26 KiB
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" [style]="'width:400px;height:300px;margin:10px'">
Joze RIHTARSIC's avatar
Joze RIHTARSIC committed
      <mat-card-title class="title-panel"  >SSO Login: {{lookups.cachedApplicationInfo.ssoAuthenticationLabel}}</mat-card-title>
      <mat-card-content style="align-items: center;justify-content: center;display: flex;height: 200px;">
        <a mat-raised-button color="primary" href="{{lookups.cachedApplicationInfo.ssoAuthenticationURI}}"
          <mat-icon>input</mat-icon>
          <span> SSO Login</span>
        </a>
      </mat-card-content>
    </mat-card>
    <mat-card *ngIf="isUserAuthPasswdEnabled() == true" fxFlex="400px" [style]="'width:400px;height:300px;margin:10px;'">
Joze RIHTARSIC's avatar
Joze RIHTARSIC committed
      <mat-card-title class="title-panel">SMP Login</mat-card-title>
      <mat-card-content style="align-items: center;justify-content: center;display: flex;flex-direction:column; height: 200px;">
        <form name="loginForm" #loginForm="ngForm" (ngSubmit)="login()">
                <mat-form-field style="width: 100%">
                  <mat-label>Username</mat-label>
                  <input matInput placeholder="Username" name="username" [(ngModel)]="model.username"
                         #username="ngModel"
                         id="username_id"
                         auto-focus-directive
                         required>
                </mat-form-field>
                <mat-form-field style="width: 100%">
                  <mat-label>Password</mat-label>
                  <input type="password" matInput placeholder="Password" name="password" [(ngModel)]="model.password"
                         #password="ngModel" required id="password_id">
                </mat-form-field>
                <button mat-raised-button color="primary" [disabled]="!loginForm.form.valid" id="loginbutton_id"
                        [style]="'width:150px'">
                  <mat-icon>input</mat-icon>
                  <span> Login</span>
                </button>
        </form>
      </mat-card-content>
    </mat-card>
  <footer></footer>