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>
|
|
|
|
<ion-content padding class="mm-center-view">
|
|
|
|
<ion-list no-lines class="box">
|
|
|
|
<ion-item *ngIf="site" text-wrap class="item-avatar-center" [ngClass]="{'item-avatar-center': site.avatar, 'text-center': !site.avatar}">
|
|
|
|
<ion-avatar *ngIf="site.avatar">
|
|
|
|
<!-- Show user avatar. -->
|
2017-12-08 14:53:27 +00:00
|
|
|
<img [src]="site.avatar" class="avatar" core-external-content [siteId]="site.id" alt="{{ 'core.pictureof' | translate:{$a: site.fullname} }}" role="presentation">
|
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">
|
|
|
|
<img *ngIf="!site.avatar && !logoUrl" src="assets/img/logo.png" class="moodle-logo" role="presentation">
|
|
|
|
|
|
|
|
<!-- If no sitename show big siteurl. -->
|
|
|
|
<p *ngIf="!siteName" class="item-heading mm-siteurl">{{siteUrl}}</p>
|
|
|
|
<!-- If sitename, show big sitename and small siteurl. -->
|
|
|
|
<p *ngIf="siteName" class="item-heading mm-sitename">{{siteName}}</p>
|
|
|
|
<p *ngIf="siteName" class="mm-siteurl">{{siteUrl}}</p>
|
|
|
|
|
|
|
|
<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>
|
|
|
|
</ion-item>
|
|
|
|
<ion-item padding text-wrap class="mm-username">
|
2017-12-08 14:53:27 +00:00
|
|
|
<p class="item-heading">{{ 'core.login.username' | translate }}</p>
|
2017-11-30 11:02:49 +00:00
|
|
|
<p>{{username}}</p>
|
|
|
|
</ion-item>
|
|
|
|
<form [formGroup]="credForm" (ngSubmit)="login()">
|
|
|
|
<ion-item>
|
|
|
|
<core-show-password item-content [name]="'password'">
|
2017-12-08 14:53:27 +00:00
|
|
|
<ion-input class="mm-ioninput-password" name="password" type="password" placeholder="{{ 'core.login.password' | translate }}" formControlName="password" mm-show-password></ion-input>
|
2017-11-30 11:02:49 +00:00
|
|
|
</core-show-password>
|
|
|
|
</ion-item>
|
|
|
|
<ion-buttons class="button-bar">
|
2017-12-08 14:53:27 +00:00
|
|
|
<a ion-button (click)="cancel()">{{ 'core.login.cancel' | translate }}</a>
|
|
|
|
<button ion-button color="primary" [disabled]="!credForm.valid">{{ 'core.login.loginbutton' | translate }}</button>
|
2017-11-30 11:02:49 +00:00
|
|
|
</ion-buttons>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<!-- Identity providers. -->
|
|
|
|
<div *ngIf="identityProviders && identityProviders.length" padding-top>
|
2017-12-08 14:53:27 +00:00
|
|
|
<p>{{ 'core.login.potentialidps' | translate }}</p>
|
2017-11-30 11:02:49 +00:00
|
|
|
<ion-item *ngFor="let provider of identityProviders" text-wrap class="mm-oauth-icon" (click)="oauthClicked(provider)" title="{{provider.name}}">
|
|
|
|
<img [src]="provider.iconurl" alt="{{provider.name}}">
|
|
|
|
<span>{{provider.name}}</span>
|
|
|
|
<ion-icon class="icon-accessory" name="arrow-forward" md="ios-arrow-forward" item-end></ion-icon>
|
|
|
|
</ion-item>
|
|
|
|
</div>
|
|
|
|
</ion-list>
|
|
|
|
</ion-content>
|