Add premium notice to automatic emails

This commit is contained in:
Amine Ben hammou
2019-08-14 17:49:36 +01:00
committed by M. Shull
parent 268cd4675d
commit d444a02feb
2 changed files with 10 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ class NewsletterTypes extends React.Component {
const onClick = window.mailpoet_premium_active const onClick = window.mailpoet_premium_active
? _.partial(this.setupNewsletter, automaticEmail.slug) ? _.partial(this.setupNewsletter, automaticEmail.slug)
: undefined; : undefined;
email.disabled = !window.mailpoet_premium_active;
email.action = (() => ( email.action = (() => (
<div> <div>
<a <a
@@ -190,6 +191,13 @@ class NewsletterTypes extends React.Component {
{type.beta ? `(${MailPoet.I18n.t('beta')})` : ''} {type.beta ? `(${MailPoet.I18n.t('beta')})` : ''}
</h3> </h3>
<p>{type.description}</p> <p>{type.description}</p>
{type.disabled && (
<p>
<span style={{ color: 'red' }}>{MailPoet.I18n.t('premiumFeature')}</span>
{' '}
<a href="?page=mailpoet-premium">{MailPoet.I18n.t('learnMore')}</a>
</p>
)}
{ type.videoGuide && ( { type.videoGuide && (
<a className={badgeClassName} href={type.videoGuide} data-beacon-article={type.videoGuideBeacon} target="_blank" rel="noopener noreferrer"> <a className={badgeClassName} href={type.videoGuide} data-beacon-article={type.videoGuideBeacon} target="_blank" rel="noopener noreferrer">
<span className="dashicons dashicons-format-video" /> <span className="dashicons dashicons-format-video" />

View File

@@ -156,6 +156,8 @@
'draftPostNotificationTitle': __('The last [newsletter:total] posts from our blog'), 'draftPostNotificationTitle': __('The last [newsletter:total] posts from our blog'),
'pickCampaignType': __('Select type of email'), 'pickCampaignType': __('Select type of email'),
'seeVideoGuide': __('See video guide'), 'seeVideoGuide': __('See video guide'),
'premiumFeature': __('This is a Premium feature.'),
'learnMore': __('Learn more'),
'regularNewsletterTypeTitle': __('Newsletter'), 'regularNewsletterTypeTitle': __('Newsletter'),
'regularNewsletterTypeDescription': __('Send a newsletter with images, buttons, dividers, and social bookmarks. Or, just send a basic text email.'), 'regularNewsletterTypeDescription': __('Send a newsletter with images, buttons, dividers, and social bookmarks. Or, just send a basic text email.'),
'create': __('Create'), 'create': __('Create'),