2021-10-21 23:30:25 +02:00
|
|
|
<div class="modal fade" role="dialog" aria-modal="true" aria-labelledby="2faEmailTitle">
|
2019-10-11 17:47:41 +02:00
|
|
|
<div class="modal-dialog" role="document">
|
2018-06-27 22:56:11 +02:00
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
2019-10-11 17:47:41 +02:00
|
|
|
<h2 class="modal-title" id="2faEmailTitle">
|
2018-06-27 22:56:11 +02:00
|
|
|
{{ "twoStepLogin" | i18n }}
|
|
|
|
<small>{{ "emailTitle" | i18n }}</small>
|
|
|
|
</h2>
|
2019-10-11 17:22:21 +02:00
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
class="close"
|
|
|
|
data-dismiss="modal"
|
|
|
|
appA11yTitle="{{ 'close' | i18n }}"
|
|
|
|
>
|
2018-06-27 22:56:11 +02:00
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
</button>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
2019-02-21 22:50:37 +01:00
|
|
|
<app-two-factor-verify
|
|
|
|
[organizationId]="organizationId"
|
|
|
|
[type]="type"
|
|
|
|
(onAuthed)="auth($event)"
|
|
|
|
*ngIf="!authed"
|
2021-12-17 15:57:11 +01:00
|
|
|
>
|
2018-06-28 05:55:50 +02:00
|
|
|
</app-two-factor-verify>
|
2021-12-17 15:57:11 +01:00
|
|
|
<form
|
|
|
|
#form
|
2018-06-27 22:56:11 +02:00
|
|
|
(ngSubmit)="submit()"
|
|
|
|
[appApiAction]="formPromise"
|
|
|
|
ngNativeValidate
|
|
|
|
*ngIf="authed"
|
2021-12-17 15:57:11 +01:00
|
|
|
>
|
2018-06-27 22:56:11 +02:00
|
|
|
<div class="modal-body">
|
|
|
|
<ng-container *ngIf="enabled">
|
2022-01-27 18:25:58 +01:00
|
|
|
<app-callout type="success" title="{{ 'enabled' | i18n }}" icon="bwi bwi-check-circle">
|
2018-06-27 22:56:11 +02:00
|
|
|
{{ "twoStepLoginProviderEnabled" | i18n }}
|
|
|
|
</app-callout>
|
|
|
|
<strong>{{ "email" | i18n }}:</strong> {{ email }}
|
|
|
|
</ng-container>
|
|
|
|
<ng-container *ngIf="!enabled">
|
|
|
|
<p class="d-flex">
|
|
|
|
<span class="mr-3">{{ "twoFactorEmailDesc" | i18n }}</span>
|
2021-10-08 00:47:32 +02:00
|
|
|
<img class="float-right ml-auto mfaType1" alt="Email logo" />
|
2021-12-17 15:57:11 +01:00
|
|
|
</p>
|
2018-06-27 22:56:11 +02:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="email">1. {{ "twoFactorEmailEnterEmail" | i18n }}</label>
|
2021-12-17 15:57:11 +01:00
|
|
|
<input
|
2019-02-21 22:50:37 +01:00
|
|
|
id="email"
|
|
|
|
type="text"
|
|
|
|
name="Email"
|
|
|
|
class="form-control"
|
|
|
|
[(ngModel)]="email"
|
2021-12-17 15:57:11 +01:00
|
|
|
required
|
2019-02-21 22:50:37 +01:00
|
|
|
inputmode="email"
|
|
|
|
appInputVerbatim="false"
|
2021-12-17 15:57:11 +01:00
|
|
|
/>
|
2018-06-27 22:56:11 +02:00
|
|
|
</div>
|
2019-02-21 22:50:37 +01:00
|
|
|
<div class="mb-3 d-flex">
|
|
|
|
<button
|
|
|
|
#sendBtn
|
|
|
|
type="button"
|
2018-06-27 22:56:11 +02:00
|
|
|
class="btn btn-outline-primary btn-sm btn-submit align-self-start"
|
|
|
|
(click)="sendEmail()"
|
|
|
|
[appApiAction]="emailPromise"
|
|
|
|
[disabled]="sendBtn.loading"
|
|
|
|
>
|
|
|
|
<i
|
2022-01-27 18:25:58 +01:00
|
|
|
class="bwi bwi-spinner bwi-spin"
|
2018-06-27 22:56:11 +02:00
|
|
|
title="{{ 'loading' | i18n }}"
|
2019-02-21 22:50:37 +01:00
|
|
|
aria-hidden="true"
|
2019-10-11 16:35:24 +02:00
|
|
|
></i>
|
2018-06-27 22:56:11 +02:00
|
|
|
<span>{{ "sendEmail" | i18n }}</span>
|
|
|
|
</button>
|
|
|
|
<span class="text-success ml-3" *ngIf="sentEmail">
|
|
|
|
{{ "verificationCodeEmailSent" | i18n: sentEmail }}
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="token">2. {{ "twoFactorEmailEnterCode" | i18n }}</label>
|
2019-02-21 22:50:37 +01:00
|
|
|
<input
|
|
|
|
id="token"
|
|
|
|
type="text"
|
|
|
|
name="Token"
|
|
|
|
class="form-control"
|
|
|
|
[(ngModel)]="token"
|
|
|
|
required
|
|
|
|
appInputVerbatim
|
|
|
|
/>
|
2018-06-27 22:56:11 +02:00
|
|
|
</div>
|
|
|
|
</ng-container>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
2018-07-18 05:15:15 +02:00
|
|
|
<button type="submit" class="btn btn-primary btn-submit" [disabled]="form.loading">
|
2022-01-27 18:25:58 +01:00
|
|
|
<i
|
|
|
|
class="bwi bwi-spinner bwi-spin"
|
|
|
|
title="{{ 'loading' | i18n }}"
|
|
|
|
aria-hidden="true"
|
|
|
|
></i>
|
2018-06-27 23:50:31 +02:00
|
|
|
<span *ngIf="!enabled">{{ "enable" | i18n }}</span>
|
2018-06-27 22:56:11 +02:00
|
|
|
<span *ngIf="enabled">{{ "disable" | i18n }}</span>
|
|
|
|
</button>
|
2019-02-21 22:50:37 +01:00
|
|
|
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">
|
|
|
|
{{ "close" | i18n }}
|
|
|
|
</button>
|
2018-06-27 22:56:11 +02:00
|
|
|
</div>
|
2021-12-17 15:57:11 +01:00
|
|
|
</form>
|
2018-06-27 22:56:11 +02:00
|
|
|
</div>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
2018-06-27 22:56:11 +02:00
|
|
|
</div>
|