Replace email title after update status of automatic email
[MAILPOET-3371]
This commit is contained in:
@@ -178,7 +178,9 @@ class Listings extends React.Component {
|
|||||||
},
|
},
|
||||||
}).done((response) => {
|
}).done((response) => {
|
||||||
if (response.data.status === 'active') {
|
if (response.data.status === 'active') {
|
||||||
MailPoet.Notice.success(MailPoet.I18n.t('automaticEmailActivated'));
|
const newsletterGroup = e.target.getAttribute('data-group');
|
||||||
|
const email = automaticEmails[newsletterGroup];
|
||||||
|
MailPoet.Notice.success(MailPoet.I18n.t('automaticEmailActivated').replace('%1s', email.title));
|
||||||
}
|
}
|
||||||
// force refresh of listing so that groups are updated
|
// force refresh of listing so that groups are updated
|
||||||
this.forceUpdate();
|
this.forceUpdate();
|
||||||
@@ -202,6 +204,7 @@ class Listings extends React.Component {
|
|||||||
className="mailpoet-listing-status-toggle"
|
className="mailpoet-listing-status-toggle"
|
||||||
onCheck={this.updateStatus}
|
onCheck={this.updateStatus}
|
||||||
data-id={newsletter.id}
|
data-id={newsletter.id}
|
||||||
|
data-group={newsletter.options.group}
|
||||||
dimension="small"
|
dimension="small"
|
||||||
defaultChecked={newsletter.status === 'active'}
|
defaultChecked={newsletter.status === 'active'}
|
||||||
/>
|
/>
|
||||||
|
Reference in New Issue
Block a user