Merge pull request #10406 from scmmishra/wfrom-events

feat: trigger events in web forms
This commit is contained in:
mergify[bot] 2020-05-20 08:34:18 +00:00 committed by GitHub
commit 2c8f1b5e1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,6 +29,7 @@ export default class WebForm extends frappe.ui.FieldGroup {
// webform client script
frappe.init_client_script && frappe.init_client_script();
frappe.web_form.events.trigger('after_load');
this.after_load && this.after_load();
}
@ -136,6 +137,7 @@ export default class WebForm extends frappe.ui.FieldGroup {
if (!response.exc) {
// Success
this.handle_success(response.message);
frappe.web_form.events.trigger('after_save');
this.after_save && this.after_save();
}
},