Prevent activating email without body

[MAILPOET-2366]
This commit is contained in:
Pavel Dohnal
2019-09-19 15:34:37 +02:00
committed by Jack Kitterhing
parent e56a654b2b
commit 35c9973c85
4 changed files with 25 additions and 2 deletions

View File

@@ -189,7 +189,7 @@ class NewsletterListNotification extends React.Component {
// force refresh of listing so that groups are updated
this.forceUpdate();
}).fail((response) => {
MailPoet.Notice.error(MailPoet.I18n.t('postNotificationActivationFailed'));
MailPoet.Notice.showApiErrorNotice(response);
// reset value to actual newsletter's status
e.target.value = response.status;

View File

@@ -184,7 +184,7 @@ class NewsletterListWelcome extends React.Component {
// force refresh of listing so that groups are updated
this.forceUpdate();
}).fail((response) => {
MailPoet.Notice.error(MailPoet.I18n.t('welcomeEmailActivationFailed'));
MailPoet.Notice.showApiErrorNotice(response);
// reset value to actual newsletter's status
e.target.value = response.status;