Check the correct config for displaying the "notify by email" option

This commit is contained in:
Joas Schilling 2016-01-08 14:15:06 +01:00
parent 48ae3997d4
commit 334a6d57a3
3 changed files with 10 additions and 3 deletions

View file

@ -49,6 +49,13 @@
return $('input:hidden[name=mailPublicNotificationEnabled]').val() === 'yes';
},
/**
* @returns {boolean}
*/
isMailNotificationEnabled: function() {
return $('input:hidden[name=mailNotificationEnabled]').val() === 'yes';
},
/**
* @returns {boolean}
*/

View file

@ -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'),

View file

@ -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,