diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-09-22 12:13:44 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-12-09 11:32:39 +0100 |
commit | 539c0aeb04f3210654972548f51f8cf61fce49ae (patch) | |
tree | 8af2eac1818cedf019ee41a5f7bfb19f5d8e4d1a /core/js/share.js | |
parent | c36bac3abdd4b41620bdebbc3391612aac620fb8 (diff) | |
download | nextcloud-server-539c0aeb04f3210654972548f51f8cf61fce49ae.tar.gz nextcloud-server-539c0aeb04f3210654972548f51f8cf61fce49ae.zip |
Add an option to disallow sending sharing emails to non-owncloud users
Fix #10836
Diffstat (limited to 'core/js/share.js')
-rw-r--r-- | core/js/share.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/core/js/share.js b/core/js/share.js index b856363d157..80a2d7d169e 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -410,10 +410,14 @@ OC.Share={ html += '<label for="sharingDialogAllowPublicUpload">' + t('core', 'Allow Public Upload') + '</label>'; html += '</div>'; } - html += '</div><form id="emailPrivateLink" >'; - html += '<input id="email" style="display:none; width:62%;" value="" placeholder="'+t('core', 'Email link to person')+'" type="text" />'; - html += '<input id="emailButton" style="display:none;" type="submit" value="'+t('core', 'Send')+'" />'; - html += '</form>'; + html += '</div>'; + var mailPublicNotificationEnabled = $('input:hidden[name=mailPublicNotificationEnabled]').val(); + if (mailPublicNotificationEnabled === 'yes') { + html += '<form id="emailPrivateLink">'; + html += '<input id="email" style="display:none; width:62%;" value="" placeholder="'+t('core', 'Email link to person')+'" type="text" />'; + html += '<input id="emailButton" style="display:none;" type="submit" value="'+t('core', 'Send')+'" />'; + html += '</form>'; + } } html += '<div id="expiration">'; @@ -520,7 +524,7 @@ OC.Share={ .append( insert ) .appendTo( ul ); }; - if (link && linksAllowed) { + if (link && linksAllowed && $('#email').length != 0) { $('#email').autocomplete({ minLength: 1, source: function (search, response) { |