From afa602bf3992cfbcc6c8079acc1b68fe92420d3a Mon Sep 17 00:00:00 2001 From: George Kalampokis Date: Wed, 4 May 2022 10:25:13 +0300 Subject: [PATCH] Fix issue with Dataset Editor when trying to save an incomplete or invalid form, the save buttons stay locked (ref #7725) --- .../app/ui/dataset/dataset-wizard/dataset-wizard.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts b/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts index f7377c335..970b65d80 100644 --- a/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts +++ b/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts @@ -775,6 +775,7 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme const errorMessages = this._buildSemiFormErrorMessages(); this.showValidationErrorsDialog(undefined, errorMessages); this.hintErrors = true; + this.saving = false; return; } this.submit(saveType); @@ -853,7 +854,7 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme saveFinalize() { // this.formService.touchAllFormFields(this.formGroup); - + this.saving = true; if (!this.isSemiFormValid(this.formGroup) || (this.table0fContents && this.table0fContents.hasVisibleInvalidFields())) { // this.showValidationErrorsDialog(); this.dialog.open(FormValidationErrorsDialogComponent, { @@ -865,6 +866,7 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme this.touchForm(); this.hintErrors = true; + this.saving = false; return; } const dialogRef = this.dialog.open(ConfirmationDialogComponent, {