summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2016-03-21 19:47:10 +0100
committerRoeland Jago Douma <rullzer@owncloud.com>2016-03-22 17:13:34 +0100
commitcf3e740ae8ac74a4f37b6701e4a9b2288be34404 (patch)
tree9720b5613e64ca0f1a63bacd5e54b12d3168a038 /core/js
parent6719f8ca60e10b0f1064935ecccf708383532a89 (diff)
downloadnextcloud-server-cf3e740ae8ac74a4f37b6701e4a9b2288be34404.tar.gz
nextcloud-server-cf3e740ae8ac74a4f37b6701e4a9b2288be34404.zip
Fix js strings if group sharing is disabled
Diffstat (limited to 'core/js')
-rw-r--r--core/js/config.php3
-rw-r--r--core/js/shareconfigmodel.js3
-rw-r--r--core/js/sharedialogview.js20
3 files changed, 20 insertions, 6 deletions
diff --git a/core/js/config.php b/core/js/config.php
index 1f0c756596d..7f2d0517460 100644
--- a/core/js/config.php
+++ b/core/js/config.php
@@ -162,7 +162,8 @@ $array = array(
'sharingDisabledForUser' => \OCP\Util::isSharingDisabledForUser(),
'resharingAllowed' => \OCP\Share::isResharingAllowed(),
'remoteShareAllowed' => $outgoingServer2serverShareEnabled,
- 'federatedCloudShareDoc' => \OC::$server->getURLGenerator()->linkToDocs('user-sharing-federated')
+ 'federatedCloudShareDoc' => \OC::$server->getURLGenerator()->linkToDocs('user-sharing-federated'),
+ 'allowGroupSharing' => \OC::$server->getShareManager()->allowGroupSharing()
)
)
),
diff --git a/core/js/shareconfigmodel.js b/core/js/shareconfigmodel.js
index 5494feaf7fa..b1bbde7a695 100644
--- a/core/js/shareconfigmodel.js
+++ b/core/js/shareconfigmodel.js
@@ -26,7 +26,8 @@
isDefaultExpireDateEnabled: oc_appconfig.core.defaultExpireDateEnabled === true,
isRemoteShareAllowed: oc_appconfig.core.remoteShareAllowed,
defaultExpireDate: oc_appconfig.core.defaultExpireDate,
- isResharingAllowed: oc_appconfig.core.resharingAllowed
+ isResharingAllowed: oc_appconfig.core.resharingAllowed,
+ allowGroupSharing: oc_appconfig.core.allowGroupSharing
},
/**
diff --git a/core/js/sharedialogview.js b/core/js/sharedialogview.js
index 5e1e14541c5..e5ef5bb1d6f 100644
--- a/core/js/sharedialogview.js
+++ b/core/js/sharedialogview.js
@@ -216,8 +216,12 @@
.autocomplete("option", "autoFocus", true);
response(suggestions);
} else {
+ var title = t('core', 'No users or groups found for {search}', {search: $('.shareWithField').val()});
+ if (!view.configModel.get('allowGroupSharing')) {
+ title = t('core', 'No users found for {search}', {search: $('.shareWithField').val()});
+ }
$('.shareWithField').addClass('error')
- .attr('data-original-title', t('core', 'No users or groups found for {search}', {search: $('.shareWithField').val()}))
+ .attr('data-original-title', title)
.tooltip('hide')
.tooltip({
placement: 'bottom',
@@ -386,10 +390,18 @@
},
_renderSharePlaceholderPart: function () {
- var sharePlaceholder = t('core', 'Share with users or groups …');
- if (this.configModel.get('isRemoteShareAllowed')) {
- sharePlaceholder = t('core', 'Share with users, groups or remote users …');
+ var sharePlaceholder = t('core', 'Share with users…');
+
+ if (this.configModel.get('allowGroupSharing')) {
+ if (this.configModel.get('isRemoteShareAllowed')) {
+ sharePlaceholder = t('core', 'Share with users, groups or remote users…');
+ } else {
+ sharePlaceholder = t('core', 'Share with users or groups…')
+ }
+ } else if (this.configModel.get('isRemoteShareAllowed')) {
+ sharePlaceholder = t('core', 'Share with users or remote users…');
}
+
return sharePlaceholder;
},