From 77c6babff6662cf462cbce25cfc834daf352dafa Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Mon, 27 Apr 2020 09:43:33 +0300 Subject: [PATCH] Fix tenant isolated checkbox fields --- .../modules/home/pages/tenant/tenant.component.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ui-ngx/src/app/modules/home/pages/tenant/tenant.component.ts b/ui-ngx/src/app/modules/home/pages/tenant/tenant.component.ts index f624a5d5cf..8a76830093 100644 --- a/ui-ngx/src/app/modules/home/pages/tenant/tenant.component.ts +++ b/ui-ngx/src/app/modules/home/pages/tenant/tenant.component.ts @@ -69,6 +69,20 @@ export class TenantComponent extends ContactBasedComponent { this.entityForm.patchValue({additionalInfo: {description: entity.additionalInfo ? entity.additionalInfo.description : ''}}); } + updateFormState() { + if (this.entityForm) { + if (this.isEditValue) { + this.entityForm.enable({emitEvent: false}); + if (!this.isAdd) { + this.entityForm.get('isolatedTbCore').disable({emitEvent: false}); + this.entityForm.get('isolatedTbRuleEngine').disable({emitEvent: false}); + } + } else { + this.entityForm.disable({emitEvent: false}); + } + } + } + onTenantIdCopied(event) { this.store.dispatch(new ActionNotificationShow( {