Fix issue with Dataset Editor when trying to save an incomplete or invalid form, the save buttons stay locked (ref #7725)

This commit is contained in:
George Kalampokis 2022-05-04 10:25:13 +03:00
parent a5061759b8
commit afa602bf39
1 changed files with 3 additions and 1 deletions

View File

@ -775,6 +775,7 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
const errorMessages = this._buildSemiFormErrorMessages(); const errorMessages = this._buildSemiFormErrorMessages();
this.showValidationErrorsDialog(undefined, errorMessages); this.showValidationErrorsDialog(undefined, errorMessages);
this.hintErrors = true; this.hintErrors = true;
this.saving = false;
return; return;
} }
this.submit(saveType); this.submit(saveType);
@ -853,7 +854,7 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
saveFinalize() { saveFinalize() {
// this.formService.touchAllFormFields(this.formGroup); // this.formService.touchAllFormFields(this.formGroup);
this.saving = true;
if (!this.isSemiFormValid(this.formGroup) || (this.table0fContents && this.table0fContents.hasVisibleInvalidFields())) { if (!this.isSemiFormValid(this.formGroup) || (this.table0fContents && this.table0fContents.hasVisibleInvalidFields())) {
// this.showValidationErrorsDialog(); // this.showValidationErrorsDialog();
this.dialog.open(FormValidationErrorsDialogComponent, { this.dialog.open(FormValidationErrorsDialogComponent, {
@ -865,6 +866,7 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
this.touchForm(); this.touchForm();
this.hintErrors = true; this.hintErrors = true;
this.saving = false;
return; return;
} }
const dialogRef = this.dialog.open(ConfirmationDialogComponent, { const dialogRef = this.dialog.open(ConfirmationDialogComponent, {