From fb36397fbd49cb586a15efe467bd39fc264d859b Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 22 Oct 2021 17:17:05 +0300 Subject: [PATCH] [DE] Fix fillForms mode --- apps/documenteditor/main/app/controller/Main.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 428a94113c..74c7ead81e 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -483,9 +483,10 @@ define([ this.appOptions.canFeatureForms = !!(type && typeof type[1] === 'string'); type = data.doc ? /^(?:(oform))$/.exec(data.doc.fileType) : false; - if (type && typeof type[1] === 'string') // open oform files in forms editor or in viewer - this.permissions.edit = this.permissions.review = this.permissions.comment = this.permissions.fillForms = false; - + if (type && typeof type[1] === 'string') { + (this.permissions.fillForms===undefined) && (this.permissions.fillForms = (this.permissions.edit!==false)); + this.permissions.edit = this.permissions.review = this.permissions.comment = false; + } this.api.asc_registerCallback('asc_onGetEditorPermissions', _.bind(this.onEditorPermissions, this)); this.api.asc_registerCallback('asc_onLicenseChanged', _.bind(this.onLicenseChanged, this)); this.api.asc_registerCallback('asc_onRunAutostartMacroses', _.bind(this.onRunAutostartMacroses, this));