1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-01-09 19:28:06 +01:00

Confirmed inline form errors working and removing todo comments.

This commit is contained in:
Alec Rippberger 2024-10-01 14:36:51 -05:00
parent 4f11c2c914
commit f42a391b6f
No known key found for this signature in database
GPG Key ID: 9DD8DA583B28154A

View File

@ -180,21 +180,6 @@ export class LoginComponent implements OnInit, OnDestroy {
await this.setupCaptcha();
/**
* TODO-rr-bw: Verify the following
*
* In the original base login component there is a comment in the submit() method that says:
* "desktop, browser; This should be removed once all clients use reactive forms"
*
* Since we are now using reactive forms for all clients. I removed the Browser/Desktop specific
* toast error message.
*
* I also removed the `showToast` parameter from the submit() method entirely because my
* understanding is that now all errors will be visually handled by the reactive form via
* this.formGroup.markAllAsTouched()
*
* Therefore below I am simply checking if the form is invalid and returning if so.
*/
this.formGroup.markAllAsTouched();
if (this.formGroup.invalid) {
return;
@ -538,13 +523,6 @@ export class LoginComponent implements OnInit, OnDestroy {
}
});
/**
* TODO-rr-bw: Verify the following
*
* In the original web login component, this following code is called AFTER the base ngOnInit()
* runs. Verify that that previous order was not necessary, and that I can place all webOnInit()
* logic here BEFORE the defaultOnInit() call.
*/
// If there's an existing org invite, use it to get the password policies
const orgPolicies = await this.loginComponentService.getOrgPolicies();