bug fixed in case several emails subscribed for same pad & authorId
This commit is contained in:
parent
af7fa15060
commit
e79b95af3f
1 changed files with 14 additions and 10 deletions
|
@ -101,6 +101,9 @@ exports.handleClientMessage_emailUnsubscriptionSuccess = function(hook, context)
|
||||||
|
|
||||||
exports.handleClientMessage_emailNotificationGetUserInfo = function (hook, context) { // return the existing options for this userId
|
exports.handleClientMessage_emailNotificationGetUserInfo = function (hook, context) { // return the existing options for this userId
|
||||||
var result = context.payload;
|
var result = context.payload;
|
||||||
|
|
||||||
|
// Only use first data from the server. (case when 2 emails subscribed for the same pad & authorId)
|
||||||
|
if ($('.ep_email_settings').is(':visible') == false) {
|
||||||
if(result.success == true){ // If data found, set the options with them
|
if(result.success == true){ // If data found, set the options with them
|
||||||
$('[name=ep_email]').val(result.email);
|
$('[name=ep_email]').val(result.email);
|
||||||
$('[name=ep_email_onStart]').prop('checked', result.onStart);
|
$('[name=ep_email_onStart]').prop('checked', result.onStart);
|
||||||
|
@ -113,6 +116,7 @@ exports.handleClientMessage_emailNotificationGetUserInfo = function (hook, conte
|
||||||
if (result.formName == 'ep_email_form_mysettings') {
|
if (result.formName == 'ep_email_form_mysettings') {
|
||||||
$('.ep_email_settings').slideToggle();
|
$('.ep_email_settings').slideToggle();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.handleClientMessage_emailNotificationMissingParams = function (hook, context) { // Settings are missing in settings.json file
|
exports.handleClientMessage_emailNotificationMissingParams = function (hook, context) { // Settings are missing in settings.json file
|
||||||
|
|
Loading…
Reference in a new issue