mirror of
https://github.com/moodle/moodle.git
synced 2025-03-15 05:00:06 +01:00
MDL-64554 form: reset form change checker before triggering submit event
This commit is contained in:
parent
28dadc2fb9
commit
1e03a240b5
lib/form/amd
2
lib/form/amd/build/modalform.min.js
vendored
2
lib/form/amd/build/modalform.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -381,11 +381,14 @@ export default class ModalForm {
|
||||
} else {
|
||||
// Form was submitted properly. Hide the modal and execute callback.
|
||||
const data = JSON.parse(response.data);
|
||||
return this.notifyResetFormChanges()
|
||||
.then(() => {
|
||||
const event = this.trigger(this.events.FORM_SUBMITTED, data);
|
||||
if (!event.defaultPrevented) {
|
||||
this.modal.hide();
|
||||
}
|
||||
return null;
|
||||
});
|
||||
}
|
||||
return null;
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user