diff --git a/apps/documenteditor/main/app/controller/FormsTab.js b/apps/documenteditor/main/app/controller/FormsTab.js index 47212c31bb..898cc0ee6e 100644 --- a/apps/documenteditor/main/app/controller/FormsTab.js +++ b/apps/documenteditor/main/app/controller/FormsTab.js @@ -513,11 +513,12 @@ define([ config.isEdit && config.canFeatureContentControl && config.isFormCreator && !config.isOForm && me.showHelpTip('create'); // show tip only when create form in docxf if (config.isRestrictedEdit && config.canFillForms && config.isPDFForm && me.api) { var oform = me.api.asc_GetOForm(); - if (!oform || !config.user.roles || config.user.roles.length<1 || !oform.asc_canFillRole(config.user.roles[0])) { - me.view && me.view.showFillingForms(false); + if (oform && config.user.roles && config.user.roles.length>0 && oform.asc_canFillRole(config.user.roles[0])) { + me.view && me.view.showFillingForms(true); + } else { var role = new AscCommon.CRestrictionSettings(); role.put_OFormNoRole(true); - this.api.asc_setRestriction(Asc.c_oAscRestrictionType.OnlyForms, role); + me.api.asc_setRestriction(Asc.c_oAscRestrictionType.OnlyForms, role); } } if (config.isRestrictedEdit && me.view && me.view.btnSubmit && me.api) { diff --git a/apps/documenteditor/main/app/view/FormsTab.js b/apps/documenteditor/main/app/view/FormsTab.js index f1a20a86ad..48e270bb1b 100644 --- a/apps/documenteditor/main/app/view/FormsTab.js +++ b/apps/documenteditor/main/app/view/FormsTab.js @@ -750,6 +750,7 @@ define([ this.btnSaveForm && this.btnSaveForm.render($host.find('#slot-btn-form-save')); (this.btnSubmit && !(this.appConfig.isRestrictedEdit && this.appConfig.canFillForms) || this.btnSaveForm) && $host.find('.save-separator').show(); + this.appConfig.isRestrictedEdit && this.appConfig.canFillForms && this.appConfig.isPDFForm && this.showFillingForms(false); return this.$el; }, @@ -816,8 +817,8 @@ define([ this.btnClear.setVisible(visible); this.btnPrevForm.setVisible(visible); this.btnNextForm.setVisible(visible); - this.view.btnRedo.$el.next().hide(); - this.btnPrevForm.cmpEl.parents('.group').hide().prev('.separator').hide(); + visible ? this.btnPrevForm.$el.parents('.group').show().prev('.separator').show() : + this.btnPrevForm.$el.parents('.group').hide().prev('.separator').hide(); this.btnSubmit && this.btnSubmit.setVisible(visible); },