diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2016-01-08 14:15:06 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2016-01-08 14:15:06 +0100 |
commit | 334a6d57a37de6416bdb70126d446ae66439647c (patch) | |
tree | b3824d69559356f2710cf37757ba20ece05867a6 /core | |
parent | 48ae3997d46b1f5393a79499a6520cdf7d0881e1 (diff) | |
download | nextcloud-server-334a6d57a37de6416bdb70126d446ae66439647c.tar.gz nextcloud-server-334a6d57a37de6416bdb70126d446ae66439647c.zip |
Check the correct config for displaying the "notify by email" option
Diffstat (limited to 'core')
-rw-r--r-- | core/js/shareconfigmodel.js | 7 | ||||
-rw-r--r-- | core/js/sharedialogshareelistview.js | 4 | ||||
-rw-r--r-- | core/js/tests/specs/sharedialogshareelistview.js | 2 |
3 files changed, 10 insertions, 3 deletions
diff --git a/core/js/shareconfigmodel.js b/core/js/shareconfigmodel.js index 8729698d136..64f18558267 100644 --- a/core/js/shareconfigmodel.js +++ b/core/js/shareconfigmodel.js @@ -52,6 +52,13 @@ /** * @returns {boolean} */ + isMailNotificationEnabled: function() { + return $('input:hidden[name=mailNotificationEnabled]').val() === 'yes'; + }, + + /** + * @returns {boolean} + */ isShareWithLinkAllowed: function() { return $('#allowShareWithLink').val() === 'yes'; }, diff --git a/core/js/sharedialogshareelistview.js b/core/js/sharedialogshareelistview.js index daed8a439bb..5728fbfd210 100644 --- a/core/js/sharedialogshareelistview.js +++ b/core/js/sharedialogshareelistview.js @@ -26,7 +26,7 @@ ' <div class="avatar {{#if modSeed}}imageplaceholderseed{{/if}}" data-username="{{shareWith}}" {{#if modSeed}}data-seed="{{shareWith}} {{shareType}}"{{/if}}></div>' + ' {{/if}}' + ' <span class="username">{{shareWithDisplayName}}</span>' + - ' {{#if mailPublicNotificationEnabled}} {{#unless isRemoteShare}}' + + ' {{#if mailNotificationEnabled}} {{#unless isRemoteShare}}' + ' <input id="mail-{{cid}}-{{shareWith}}" type="checkbox" name="mailNotification" class="mailNotification checkbox" {{#if wasMailSent}}checked="checked"{{/if}} />' + ' <label for="mail-{{cid}}-{{shareWith}}">{{notifyByMailLabel}}</label>' + ' {{/unless}} {{/if}}' + @@ -164,7 +164,7 @@ getShareeList: function() { var universal = { avatarEnabled: this.configModel.areAvatarsEnabled(), - mailPublicNotificationEnabled: this.configModel.isMailPublicNotificationEnabled(), + mailNotificationEnabled: this.configModel.isMailNotificationEnabled(), notifyByMailLabel: t('core', 'notify by email'), unshareLabel: t('core', 'Unshare'), unshareImage: OC.imagePath('core', 'actions/delete'), diff --git a/core/js/tests/specs/sharedialogshareelistview.js b/core/js/tests/specs/sharedialogshareelistview.js index d468ce790dc..44611d0d964 100644 --- a/core/js/tests/specs/sharedialogshareelistview.js +++ b/core/js/tests/specs/sharedialogshareelistview.js @@ -34,7 +34,7 @@ describe('OC.Share.ShareDialogShareeListView', function () { oldAppConfig = _.extend({}, oc_appconfig.core); oc_appconfig.core.enforcePasswordForPublicLink = false; - $('#testArea').append('<input id="mailPublicNotificationEnabled" name="mailPublicNotificationEnabled" type="hidden" value="yes">'); + $('#testArea').append('<input id="mailNotificationEnabled" name="mailNotificationEnabled" type="hidden" value="yes">'); fileInfoModel = new OCA.Files.FileInfoModel({ id: 123, |