mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-04-07 14:06:16 +08:00
Sent onSubmit event when form is submitted successfully
This commit is contained in:
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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({
|
||||
|
||||
Reference in New Issue
Block a user