diff options
Diffstat (limited to 'core/js/sharedialogview.js')
-rw-r--r-- | core/js/sharedialogview.js | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/core/js/sharedialogview.js b/core/js/sharedialogview.js index 129206b0931..3b2a7480c47 100644 --- a/core/js/sharedialogview.js +++ b/core/js/sharedialogview.js @@ -416,19 +416,33 @@ }, _renderSharePlaceholderPart: function () { - var sharePlaceholder = t('core', 'Share with users, or by mail...'); + var allowGroupSharing = this.configModel.get('allowGroupSharing'); + var allowRemoteSharing = this.configModel.get('isRemoteShareAllowed'); + var allowMailSharing = this.configModel.get('isMailShareAllowed'); - if (this.configModel.get('allowGroupSharing')) { - if (this.configModel.get('isRemoteShareAllowed')) { - sharePlaceholder = t('core', 'Share with users, groups, remote users, or by mail…'); - } else { - sharePlaceholder = t('core', 'Share with users, groups or by mail...'); - } - } else if (this.configModel.get('isRemoteShareAllowed')) { - sharePlaceholder = t('core', 'Share with users, remote users or by mail...'); + if (!allowGroupSharing && !allowRemoteSharing && allowMailSharing) { + return t('core', 'Share with users or by mail...'); + } + if (!allowGroupSharing && allowRemoteSharing && !allowMailSharing) { + return t('core', 'Share with users or remote users...'); + } + if (!allowGroupSharing && allowRemoteSharing && allowMailSharing) { + return t('core', 'Share with users, remote users or by mail...'); + } + if (allowGroupSharing && !allowRemoteSharing && !allowMailSharing) { + return t('core', 'Share with users or groups...'); + } + if (allowGroupSharing && !allowRemoteSharing && allowMailSharing) { + return t('core', 'Share with users, groups or by mail...'); + } + if (allowGroupSharing && allowRemoteSharing && !allowMailSharing) { + return t('core', 'Share with users, groups or remote users...'); + } + if (allowGroupSharing && allowRemoteSharing && allowMailSharing) { + return t('core', 'Share with users, groups, remote users or by mail...'); } - return sharePlaceholder; + return t('core', 'Share with users...'); }, /** |