Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 48 additions & 44 deletions ui/src/app/user/user-update.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -150,51 +150,55 @@ <h1 id="jhi-ms-user-heading" class="mt-5" i18n="@@gatewayApp.msUserServiceMSUser
</button>
</div>
</form>
<form name="mfaForm" role="form" novalidate [formGroup]="mfaForm">
<ng-container *ngIf="existentUser && existentUser.id && hasRoleAdmin()">
<hr class="mb-32 mt-32" />
<h2 class="mb-8 font-size-18">
<ng-container i18n="@@settings.security.mfa.string">Two-factor authentication</ng-container>&nbsp;<span
class="mfaOn"
*ngIf="existentUser.mfaEnabled"
>(<ng-container i18n="@@settings.security.mfaOn.string">ON</ng-container>)</span
>
<span class="mfaOff" *ngIf="!existentUser.mfaEnabled"
>(<ng-container i18n="@@settings.security.mfaOff.string">OFF</ng-container>)</span
>
</h2>
<div class="font-size-14">
<ng-container *ngIf="existentUser.mfaEnabled">
<p class="mb-8" i18n="@@settings.security.disableMfaDescription.string">
Disable two-factor authentication (2FA) for this user if they are having difficulty signing in to the
member portal.
</p>
<div class="form-group">
<input
type="checkbox"
class="form-control"
name="twoFactorAuthentication"
id="field_twoFactorAuthentication"
formControlName="twoFactorAuthentication"
/>
<label
class="form-control-label two-factor-authentication-label"
i18n="@@settings.security.mfa.string"
for="field_twoFactorAuthentication"
>Two-factor authentication</label
>
</div>
</ng-container>
<ng-container *ngIf="!existentUser.mfaEnabled">
<div class="warning-message d-flex p-16 mb-40 mt-16">
<img src="./../../../../content/images/warning-sign.svg" alt="Warning sign" class="p-8" />
<div class="font-size-14 wide-text line-height-150" i18n="@@settings.security.disabledMfaNotice.string">
Users can enable 2FA from their account settings page
</div>
<form
name="mfaForm"
role="form"
novalidate
[formGroup]="mfaForm"
*ngIf="existentUser && existentUser.id && hasRoleAdmin()"
>
<hr class="mb-32 mt-32" />
<h2 class="mb-8 font-size-18">
<ng-container i18n="@@settings.security.mfa.string">Two-factor authentication</ng-container>&nbsp;<span
class="mfaOn"
*ngIf="existentUser.mfaEnabled"
>(<ng-container i18n="@@settings.security.mfaOn.string">ON</ng-container>)</span
>
<span class="mfaOff" *ngIf="!existentUser.mfaEnabled"
>(<ng-container i18n="@@settings.security.mfaOff.string">OFF</ng-container>)</span
>
</h2>
<div class="font-size-14">
<ng-container *ngIf="existentUser.mfaEnabled">
<p class="mb-8" i18n="@@settings.security.disableMfaDescription.string">
Disable two-factor authentication (2FA) for this user if they are having difficulty signing in to the member
portal.
</p>
<div class="form-group">
<input
type="checkbox"
class="form-control"
name="twoFactorAuthentication"
id="field_twoFactorAuthentication"
formControlName="twoFactorAuthentication"
/>
<label
class="form-control-label two-factor-authentication-label"
i18n="@@settings.security.mfa.string"
for="field_twoFactorAuthentication"
>Two-factor authentication</label
>
</div>
</ng-container>
<ng-container *ngIf="!existentUser.mfaEnabled">
<div class="warning-message d-flex p-16 mb-40 mt-16">
<img src="./../../../../content/images/warning-sign.svg" alt="Warning sign" class="p-8" />
<div class="font-size-14 wide-text line-height-150" i18n="@@settings.security.disabledMfaNotice.string">
Users can enable 2FA from their account settings page
</div>
</ng-container>
</div>
</ng-container>
</div>
</ng-container>
</div>
<div class="form-group">
<button type="button" id="cancel-save" class="btn btn-outline-primary mr-2" (click)="navigateToUsersList()">
<fa-icon [icon]="faBan"></fa-icon>&nbsp;<span i18n="@@entity.action.cancel.string">Cancel</span>
Expand Down
Loading