mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-23 21:01:03 +08:00
[DE] Fix hiding buttons
This commit is contained in:
@ -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) {
|
||||
|
||||
@ -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);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user