1
0
mirror of https://github.com/dkmstr/openuds-gui.git synced 2024-10-26 08:55:23 +03:00

Added MFA input page

This commit is contained in:
Adolfo Gómez García 2022-06-23 15:16:44 +02:00
parent 4e0796c5e9
commit cf713a333e
4 changed files with 5 additions and 5 deletions

View File

@ -17,6 +17,6 @@
{{ error }}
</p>
<a mat-raised-button color="warn" routerLink="/"><uds-translate>Return</uds-translate></a>
<a mat-raised-button color="warn" [routerLink]="returnUrl"><uds-translate>Return</uds-translate></a>
</div>

View File

@ -12,6 +12,7 @@ declare const udsData: any;
})
export class ErrorComponent implements OnInit {
error: string;
returnUrl: string;
constructor(public api: UDSApiService, private route: ActivatedRoute) {}
@ -21,6 +22,9 @@ export class ErrorComponent implements OnInit {
getError(): void {
const id = this.route.snapshot.paramMap.get('id');
if (id === '19') {
this.returnUrl = '/mfa';
}
this.error = '';
// Request error string from UDS
this.api.getErrorInformation(id).subscribe((errInfo) => {

View File

@ -1,5 +1,4 @@
<form id="mfaform" method="post" (ngSubmit)="launch()">
<input name="" id="token" value="" type="hidden" />
<div class="mfa-container">
<div class="mfa-brand">
<img [src]="api.staticURL('modern/img/login-img.png')" />

View File

@ -16,9 +16,6 @@ export class MfaComponent implements OnInit {
// adapt form to post the correct values the correct way
const form = document.getElementById('mfaform') as HTMLFormElement;
form.action = this.api.config.urls.mfa;
const input = document.getElementById('token') as HTMLInputElement;
input.name = this.api.csrfField;
input.value = this.api.csrfToken;
if (this.api.errors.length > 0) {
this.api.gui.alert(