Skip to content

Commit

Permalink
Merge pull request #2995 from ONLYOFFICE/fix/hide-roles
Browse files Browse the repository at this point in the history
[DE] Change license for hiding roles (customization option)
  • Loading branch information
JuliaRadzhabova authored May 20, 2024
2 parents e3ebe95 + ba31091 commit 75ca47d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions apps/documenteditor/main/app/controller/FormsTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ define([
},

onRefreshRolesList: function(roles) {
if (!Common.UI.FeaturesManager.isFeatureEnabled('roles')) return;
if (!Common.UI.FeaturesManager.isFeatureEnabled('roles', true)) return;

if (!roles) {
var oform = this.api.asc_GetOForm();
Expand All @@ -584,7 +584,7 @@ define([
},

showRolesList: function(callback) {
if (!Common.UI.FeaturesManager.isFeatureEnabled('roles')) {
if (!Common.UI.FeaturesManager.isFeatureEnabled('roles', true)) {
callback.call(this);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion apps/documenteditor/main/app/view/FormSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ define([
this.DefValueText = el.find('#form-txt-def-value').closest('tr');
this.DefValueDropDown = el.find('#form-combo-def-value').closest('tr');

!Common.UI.FeaturesManager.isFeatureEnabled('roles') && el.find('#form-combo-roles').closest('tr').hide();
!Common.UI.FeaturesManager.isFeatureEnabled('roles', true) && el.find('#form-combo-roles').closest('tr').hide();
},

createDelayedElements: function() {
Expand Down
8 changes: 4 additions & 4 deletions apps/documenteditor/main/app/view/FormsTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ define([
iconCls: 'toolbar__icon btn-ic-sharing',
lock: [ _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView, _set.docLockForms, _set.docLockComments, _set.viewMode],
caption: this.capBtnManager,
visible: Common.UI.FeaturesManager.isFeatureEnabled('roles'),
visible: Common.UI.FeaturesManager.isFeatureEnabled('roles', true),
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'small'
Expand Down Expand Up @@ -489,8 +489,8 @@ define([
iconCls: 'toolbar__icon btn-big-sheet-view',
lock: [ _set.previewReviewMode, _set.formsNoRoles, _set.lostConnect, _set.disableOnStart, _set.docLockView, _set.docLockForms, _set.docLockComments, _set.viewMode],
caption: this.capBtnView,
split: Common.UI.FeaturesManager.isFeatureEnabled('roles'),
menu: Common.UI.FeaturesManager.isFeatureEnabled('roles') ? new Common.UI.Menu({
split: Common.UI.FeaturesManager.isFeatureEnabled('roles', true),
menu: Common.UI.FeaturesManager.isFeatureEnabled('roles', true) ? new Common.UI.Menu({
cls: 'menu-roles',
maxHeight: 270,
style: 'max-width: 400px;',
Expand Down Expand Up @@ -722,7 +722,7 @@ define([
this.btnSubmit && this.btnSubmit.render($host.find('#slot-btn-form-submit'));

$host.find('.forms-buttons').show();
!Common.UI.FeaturesManager.isFeatureEnabled('roles') && this.btnManager.cmpEl.parents('.group').hide().prev('.separator').hide();
!Common.UI.FeaturesManager.isFeatureEnabled('roles', true) && this.btnManager.cmpEl.parents('.group').hide().prev('.separator').hide();
}
this.btnClear.render($host.find('#slot-btn-form-clear'));
this.btnPrevForm.render($host.find('#slot-btn-form-prev'));
Expand Down

0 comments on commit 75ca47d

Please sign in to comment.