Hide success notice when unauthorized address notice is shown

[MAILPOET-1787]
This commit is contained in:
Ján Mikláš
2019-02-27 11:15:50 +01:00
committed by M. Shull
parent 602929356c
commit b65a54d93b
2 changed files with 3 additions and 1 deletions

View File

@ -392,6 +392,7 @@ const StatisticsMixin = {
const MailerMixin = {
checkMailerStatus: function checkMailerStatus(state) {
if (state.meta.mta_log.error && state.meta.mta_log.error.operation === 'authorization') {
MailPoet.Notice.hide('mailpoet_notice_being_sent');
MailPoet.Notice.error(
state.meta.mta_log.error.error_message,
{ static: true, id: 'mailpoet_authorization_error' }

View File

@ -184,7 +184,8 @@ const NewsletterSend = createReactClass({ // eslint-disable-line react/prefer-es
});
} else {
MailPoet.Notice.success(
MailPoet.I18n.t('newsletterBeingSent')
MailPoet.I18n.t('newsletterBeingSent'),
{ id: 'mailpoet_notice_being_sent' }
);
MailPoet.trackEvent('Emails > Newsletter sent', {
scheduled: false,