mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
Add default OrganizationUpdateRequest values when FormControls are disabled (#9774)
This commit is contained in:
@@ -153,8 +153,17 @@ export class AccountComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const request = new OrganizationUpdateRequest();
|
const request = new OrganizationUpdateRequest();
|
||||||
request.name = this.formGroup.value.orgName;
|
|
||||||
request.billingEmail = this.formGroup.value.billingEmail;
|
/*
|
||||||
|
* When you disable a FormControl, it is removed from formGroup.values, so we have to use
|
||||||
|
* the original value.
|
||||||
|
* */
|
||||||
|
request.name = this.formGroup.get("orgName").disabled
|
||||||
|
? this.org.name
|
||||||
|
: this.formGroup.value.orgName;
|
||||||
|
request.billingEmail = this.formGroup.get("billingEmail").disabled
|
||||||
|
? this.org.billingEmail
|
||||||
|
: this.formGroup.value.billingEmail;
|
||||||
|
|
||||||
// Backfill pub/priv key if necessary
|
// Backfill pub/priv key if necessary
|
||||||
if (!this.org.hasPublicAndPrivateKeys) {
|
if (!this.org.hasPublicAndPrivateKeys) {
|
||||||
|
|||||||
Reference in New Issue
Block a user