Merge pull request #1482 from ONLYOFFICE/fix/bug-54910
[DE forms] Fix Bug 54910
This commit is contained in:
commit
f5c9860cb0
|
@ -508,6 +508,7 @@ define([
|
|||
|
||||
this.api.asc_registerCallback('asc_onGetEditorPermissions', _.bind(this.onEditorPermissions, this));
|
||||
this.api.asc_registerCallback('asc_onRunAutostartMacroses', _.bind(this.onRunAutostartMacroses, this));
|
||||
this.api.asc_registerCallback('asc_onLicenseChanged', _.bind(this.onLicenseChanged, this));
|
||||
this.api.asc_setDocInfo(docInfo);
|
||||
this.api.asc_getEditorPermissions(this.editorConfig.licenseUrl, this.editorConfig.customerId);
|
||||
this.api.asc_enableKeyEvents(true);
|
||||
|
@ -645,6 +646,17 @@ define([
|
|||
});
|
||||
},
|
||||
|
||||
onLicenseChanged: function(params) {
|
||||
var licType = params.asc_getLicenseType();
|
||||
if (licType !== undefined && this.appOptions.canFillForms &&
|
||||
(licType===Asc.c_oLicenseResult.Connections || licType===Asc.c_oLicenseResult.UsersCount || licType===Asc.c_oLicenseResult.ConnectionsOS || licType===Asc.c_oLicenseResult.UsersCountOS
|
||||
|| licType===Asc.c_oLicenseResult.SuccessLimit && (this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0))
|
||||
this._state.licenseType = licType;
|
||||
|
||||
if (this._isDocReady)
|
||||
this.applyLicense();
|
||||
},
|
||||
|
||||
applyLicense: function() {
|
||||
if (this._state.licenseType) {
|
||||
var license = this._state.licenseType,
|
||||
|
|
Loading…
Reference in a new issue