diff --git a/src/app/institutional/pages/institutional/institutional.component.ts b/src/app/institutional/pages/institutional/institutional.component.ts index 8bef33b8f..fc3d57cbb 100644 --- a/src/app/institutional/pages/institutional/institutional.component.ts +++ b/src/app/institutional/pages/institutional/institutional.component.ts @@ -26,6 +26,7 @@ import { DisplayName, Institutional, } from '../../../types/institutional.endpoint' +import { path } from '@angular-devkit/core' @Component({ selector: 'app-institutional', @@ -120,9 +121,11 @@ export class InstitutionalComponent implements OnInit { ngOnInit() {} - onSubmit() { - this.institutionFormControl.markAllAsTouched() - this.institutionFormControl.markAsDirty() + onSubmit(bypassInlineErrors = false) { + if (!bypassInlineErrors) { + this.institutionFormControl.markAllAsTouched() + this.institutionFormControl.markAsDirty() + } if (this.institutionalForm.valid || this.entityID) { this.loading = true @@ -188,15 +191,11 @@ export class InstitutionalComponent implements OnInit { institutions.push(btoa(this.entityID)) } // Encode cookie base 64 - this._cookie.set( - '_saml_institutional', - institutions.join('%20'), - dateCookie !== null ? dateCookie : this.cookieExpirationTime - ) + localStorage.setItem('_saml_institutional', institutions.join('%20')) } retrieveUserSelectedIdPs() { - let cookieValues = this._cookie.get('_saml_institutional') + let cookieValues = localStorage.getItem('_saml_institutional') if (cookieValues) { cookieValues = cookieValues.replace(/^\s+|\s+$/g, '') cookieValues = cookieValues.replace('+', '%20') @@ -217,7 +216,7 @@ export class InstitutionalComponent implements OnInit { selectInstitution(institution: Institutional) { this.entityID = institution.entityID - this.onSubmit() + this.onSubmit(true) } navigateTo(val) {