From b2e8afec07487ec2176595ae2ccc226f1d5809e6 Mon Sep 17 00:00:00 2001 From: Boris Vasilenko Date: Thu, 4 Apr 2024 10:25:33 +0200 Subject: [PATCH] Revert encryption value when Cancel button is pressed (#9922) Co-authored-by: Boris Vasilenko --- .../volumes/datasets/dataset-form/dataset-form.component.ts | 2 ++ .../pages/storage/volumes/zvol/zvol-form/zvol-form.component.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/app/pages/storage/volumes/datasets/dataset-form/dataset-form.component.ts b/src/app/pages/storage/volumes/datasets/dataset-form/dataset-form.component.ts index 91f26068cdf..92c116b1b1e 100644 --- a/src/app/pages/storage/volumes/datasets/dataset-form/dataset-form.component.ts +++ b/src/app/pages/storage/volumes/datasets/dataset-form/dataset-form.component.ts @@ -1137,6 +1137,8 @@ export class DatasetFormComponent implements Formconfiguration { this.entityForm.setDisabled(all_encryption_fields[i], true, true); } } + } else { + encryption_fg.setValue(!encryption); } }); } else { diff --git a/src/app/pages/storage/volumes/zvol/zvol-form/zvol-form.component.ts b/src/app/pages/storage/volumes/zvol/zvol-form/zvol-form.component.ts index 032f06229d6..27972e06532 100644 --- a/src/app/pages/storage/volumes/zvol/zvol-form/zvol-form.component.ts +++ b/src/app/pages/storage/volumes/zvol/zvol-form/zvol-form.component.ts @@ -518,6 +518,8 @@ export class ZvolFormComponent implements Formconfiguration { this.entityForm.setDisabled(all_encryption_fields[i], true, true); } } + } else { + encryption_fg.setValue(!encryption); } }); } else {