diff --git a/apps/documenteditor/main/app/controller/FormsTab.js b/apps/documenteditor/main/app/controller/FormsTab.js index 28e15d94d..8864a7b0a 100644 --- a/apps/documenteditor/main/app/controller/FormsTab.js +++ b/apps/documenteditor/main/app/controller/FormsTab.js @@ -159,7 +159,7 @@ define([ }, onControlsSelect: function(type) { - if (!(this.toolbar.mode && this.toolbar.mode.canFeatureContentControl)) return; + if (!(this.toolbar.mode && this.toolbar.mode.canFeatureContentControl && this.toolbar.mode.canFeatureForms)) return; var oPr, oFormPr = new AscCommon.CSdtFormPr(); diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 02657cdb8..2493a1d55 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -371,6 +371,7 @@ define([ this.appOptions.compatibleFeatures = (typeof (this.appOptions.customization) == 'object') && !!this.appOptions.customization.compatibleFeatures; this.appOptions.canFeatureComparison = !!this.api.asc_isSupportFeature("comparison"); this.appOptions.canFeatureContentControl = !!this.api.asc_isSupportFeature("content-controls"); + this.appOptions.canFeatureForms = false; // hide in 6.2 this.appOptions.mentionShare = !((typeof (this.appOptions.customization) == 'object') && (this.appOptions.customization.mentionShare==false)); appHeader = this.getApplication().getController('Viewport').getView('Common.Views.Header'); diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 428ed6ffc..c49124b9c 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -3095,12 +3095,14 @@ define([ Array.prototype.push.apply(me.toolbar.toolbarControls, links.getView('Links').getButtons()); if (config.canFeatureContentControl) { - tab = {caption: me.textTabForms, action: 'forms'}; - var forms = me.getApplication().getController('FormsTab'); - forms.setApi(me.api).setConfig({toolbar: me}); - me.toolbar.addTab(tab, $panel, 4); - me.toolbar.setVisible('forms', true); - Array.prototype.push.apply(me.toolbar.toolbarControls, forms.getView('FormsTab').getButtons()); + if (config.canFeatureForms) { + tab = {caption: me.textTabForms, action: 'forms'}; + var forms = me.getApplication().getController('FormsTab'); + forms.setApi(me.api).setConfig({toolbar: me}); + me.toolbar.addTab(tab, $panel, 4); + me.toolbar.setVisible('forms', true); + Array.prototype.push.apply(me.toolbar.toolbarControls, forms.getView('FormsTab').getButtons()); + } me.onChangeSdtGlobalSettings(); } } diff --git a/apps/documenteditor/main/app/view/RightMenu.js b/apps/documenteditor/main/app/view/RightMenu.js index dfadc2c5c..974fc87e1 100644 --- a/apps/documenteditor/main/app/view/RightMenu.js +++ b/apps/documenteditor/main/app/view/RightMenu.js @@ -211,7 +211,7 @@ define([ this.signatureSettings = new DE.Views.SignatureSettings(); } - if (mode && mode.canFeatureContentControl && mode.canEditContentControl) { + if (mode && mode.canFeatureContentControl && mode.canEditContentControl && mode.canFeatureForms) { this.btnForm = new Common.UI.Button({ hint: this.txtFormSettings, asctype: Common.Utils.documentSettingsType.Form,