2017-11-30 11:02:49 +00:00
|
|
|
<ion-header>
|
|
|
|
<ion-navbar>
|
2017-12-08 14:53:27 +00:00
|
|
|
<ion-title>{{ 'core.login.reconnect' | translate }}</ion-title>
|
2017-11-30 11:02:49 +00:00
|
|
|
</ion-navbar>
|
|
|
|
</ion-header>
|
2017-12-29 17:05:52 +00:00
|
|
|
<ion-content padding class="core-center-view">
|
2017-12-18 09:48:04 +00:00
|
|
|
<div class="box">
|
|
|
|
<div *ngIf="site" text-wrap text-center [ngClass]="{'item-avatar-center': site.avatar}">
|
2017-11-30 11:02:49 +00:00
|
|
|
<ion-avatar *ngIf="site.avatar">
|
|
|
|
<!-- Show user avatar. -->
|
2018-02-09 09:02:14 +00:00
|
|
|
<img [src]="site.avatar" class="avatar" core-external-content [siteId]="site.id" alt="{{ 'core.pictureof' | translate:{$a: site.fullname} }}" role="presentation" onError="this.src='assets/img/user-avatar.png'">
|
2017-11-30 11:02:49 +00:00
|
|
|
</ion-avatar>
|
|
|
|
|
|
|
|
<!-- Show site logo or a default image. -->
|
|
|
|
<img *ngIf="!site.avatar && logoUrl" [src]="logoUrl" core-external-content [siteId]="site.id" role="presentation">
|
2017-12-18 09:48:04 +00:00
|
|
|
<img *ngIf="!site.avatar && !logoUrl" src="assets/img/login_logo.png" class="login-logo" role="presentation">
|
2017-11-30 11:02:49 +00:00
|
|
|
|
|
|
|
<!-- If no sitename show big siteurl. -->
|
2017-12-29 17:05:52 +00:00
|
|
|
<p *ngIf="!siteName" class="item-heading core-siteurl">{{siteUrl}}</p>
|
2017-11-30 11:02:49 +00:00
|
|
|
<!-- If sitename, show big sitename and small siteurl. -->
|
2018-05-16 12:43:25 +00:00
|
|
|
<p *ngIf="siteName" class="item-heading core-sitename"><core-format-text [text]="siteName"></core-format-text></p>
|
2017-12-29 17:05:52 +00:00
|
|
|
<p *ngIf="siteName" class="core-siteurl">{{siteUrl}}</p>
|
2017-11-30 11:02:49 +00:00
|
|
|
|
|
|
|
<p *ngIf="!isLoggedOut">
|
2017-12-08 14:53:27 +00:00
|
|
|
<ion-icon padding name="alert"></ion-icon> {{ 'core.login.reconnectdescription' | translate }}
|
2017-11-30 11:02:49 +00:00
|
|
|
</p>
|
2017-12-18 09:48:04 +00:00
|
|
|
</div>
|
|
|
|
<ion-list>
|
2017-12-29 17:05:52 +00:00
|
|
|
<ion-item padding text-wrap class="core-username">
|
2017-12-18 09:48:04 +00:00
|
|
|
<p class="item-heading">{{ 'core.login.username' | translate }}</p>
|
|
|
|
<p>{{username}}</p>
|
2017-11-30 11:02:49 +00:00
|
|
|
</ion-item>
|
2017-12-18 09:48:04 +00:00
|
|
|
<form [formGroup]="credForm" (ngSubmit)="login()">
|
|
|
|
<ion-item>
|
|
|
|
<core-show-password item-content [name]="'password'">
|
2017-12-29 17:05:52 +00:00
|
|
|
<ion-input class="core-ioninput-password" name="password" type="password" placeholder="{{ 'core.login.password' | translate }}" formControlName="password" core-show-password core-auto-focus></ion-input>
|
2017-12-18 09:48:04 +00:00
|
|
|
</core-show-password>
|
|
|
|
</ion-item>
|
|
|
|
<ion-grid>
|
|
|
|
<ion-row>
|
|
|
|
<ion-col>
|
|
|
|
<a ion-button block color="light" (click)="cancel()">{{ 'core.login.cancel' | translate }}</a>
|
|
|
|
</ion-col>
|
|
|
|
<ion-col>
|
|
|
|
<button ion-button block [disabled]="!credForm.valid">{{ 'core.login.loginbutton' | translate }}</button>
|
|
|
|
</ion-col>
|
|
|
|
</ion-row>
|
|
|
|
</ion-grid>
|
|
|
|
</form>
|
|
|
|
</ion-list>
|
2017-11-30 11:02:49 +00:00
|
|
|
|
|
|
|
<!-- Identity providers. -->
|
2017-12-18 09:48:04 +00:00
|
|
|
<ion-list *ngIf="identityProviders && identityProviders.length" padding-top>
|
|
|
|
<ion-list-header text-wrap>{{ 'core.login.potentialidps' | translate }}</ion-list-header>
|
2017-12-29 17:05:52 +00:00
|
|
|
<button ion-item *ngFor="let provider of identityProviders" text-wrap class="core-oauth-icon" (click)="oauthClicked(provider)" title="{{provider.name}}">
|
2017-12-18 09:48:04 +00:00
|
|
|
<img [src]="provider.iconurl" alt="{{provider.name}}" item-start>
|
|
|
|
{{provider.name}}
|
|
|
|
</button>
|
|
|
|
</ion-list>
|
|
|
|
</div>
|
2017-11-30 11:02:49 +00:00
|
|
|
</ion-content>
|