Sent onSubmit event when form is submitted successfully

This commit is contained in:
Julia Radzhabova
2024-06-03 19:29:12 +03:00
parent 57e509ec5e
commit 9df2fd0c80
4 changed files with 7 additions and 0 deletions

View File

@ -292,6 +292,7 @@
'onRequestReferenceSource': <try to change source for external link>, // used for external links in sse. must call setReferenceSource method,
'onSaveDocument': 'save document from binary',
'onRequestStartFilling': <try to start filling forms> // used in pdf-form edit mode. must call startFilling method
'onSubmit': <filled form is submitted> // send when filled form is submitted successfully
}
}

View File

@ -413,6 +413,10 @@ if (window.Common === undefined) {
}, data.buffer);
},
submitForm: function() {
_postMessage({event: 'onSubmit'});
},
on: function(event, handler){
var localHandler = function(event, data){
handler.call(me, data)

View File

@ -905,6 +905,7 @@ define([
this.view.btnSubmit.setDisabled(!_submitFail);
this.view.btnSubmit.cmpEl.css("pointer-events", "auto");
if (!_submitFail) {
Common.Gateway.submitForm();
this.view.btnSubmit.setCaption(this.textFilled);
this.view.btnSubmit.cmpEl.removeClass('yellow').removeClass('back-color').addClass('gray');
if (!this.submitedTooltip) {

View File

@ -462,6 +462,7 @@ define([
if (id==Asc.c_oAscAsyncAction['Submit'] && this.view.btnSubmit) {
Common.Utils.lockControls(Common.enumLock.submit, !this._submitFail, {array: [this.view.btnSubmit]})
if (!this._submitFail) {
Common.Gateway.submitForm();
this.view.btnSubmit.setCaption(this.view.textFilled);
if (!this.submitedTooltip) {
this.submitedTooltip = new Common.UI.SynchronizeTip({