Skip to content

Commit

Permalink
Merge pull request #29 from NethServer/fix_cancel
Browse files Browse the repository at this point in the history
Clear errors and fields when hiding modal NethServer/dev#7052
  • Loading branch information
stephdl authored Oct 15, 2024
2 parents 4c13c47 + 6ee3e94 commit 45fd62c
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions ui/src/components/CreateOrEditTask.vue
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,8 @@ export default {
this.cronEnabled = this.task.cron_enabled;
} else {
// hiding modal

if (this.isEditing) {
this.clearFields();
}
this.clearErrors();
this.clearFields();
}
},
},
Expand Down Expand Up @@ -349,10 +347,7 @@ export default {
}
isValidationOk = false;
}
if (
this.folderSynchronization == "exclusion" &&
!this.exclude
) {
if (this.folderSynchronization == "exclusion" && !this.exclude) {
this.error.exclude = "common.required";

if (isValidationOk) {
Expand Down Expand Up @@ -455,6 +450,7 @@ export default {
},
onModalHidden() {
this.clearErrors();
this.clearFields();
this.$emit("hide");
},
},
Expand Down

0 comments on commit 45fd62c

Please sign in to comment.