From 803479bb43a07a8e7dcefd68dce8666959a23a1b Mon Sep 17 00:00:00 2001 From: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com> Date: Wed, 6 Nov 2024 10:12:24 -0600 Subject: [PATCH] fix: refactor enabled state of org name field, refs PM-14533 (#11879) --- .../organizations/settings/account.component.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/web/src/app/admin-console/organizations/settings/account.component.ts b/apps/web/src/app/admin-console/organizations/settings/account.component.ts index ffcf0cef9cf..2d97f95e519 100644 --- a/apps/web/src/app/admin-console/organizations/settings/account.component.ts +++ b/apps/web/src/app/admin-console/organizations/settings/account.component.ts @@ -123,20 +123,22 @@ export class AccountComponent implements OnInit, OnDestroy { this.canEditSubscription = organization.canEditSubscription; this.canUseApi = organization.useApi; - // Update disabled states - reactive forms prefers not using disabled attribute // Disabling these fields for self hosted orgs is deprecated // This block can be completely removed as part of // https://bitwarden.atlassian.net/browse/PM-10863 if (!this.limitCollectionCreationDeletionSplitFeatureFlagIsEnabled) { if (!this.selfHosted) { - this.formGroup.get("orgName").enable(); this.collectionManagementFormGroup.get("limitCollectionCreationDeletion").enable(); this.collectionManagementFormGroup.get("allowAdminAccessToAllCollectionItems").enable(); } } - if (!this.selfHosted && this.canEditSubscription) { - this.formGroup.get("billingEmail").enable(); + // Update disabled states - reactive forms prefers not using disabled attribute + if (!this.selfHosted) { + this.formGroup.get("orgName").enable(); + if (this.canEditSubscription) { + this.formGroup.get("billingEmail").enable(); + } } // Org Response