Remove 'This is a premium feature' text

[MAILPOET-2382]
This commit is contained in:
Jan Jakeš
2019-10-03 13:35:38 +02:00
committed by Jack Kitterhing
parent 50043472ee
commit cc0e90f38a

View File

@@ -36,10 +36,7 @@ class NewsletterTypes extends React.Component {
return _.map(window.mailpoet_automatic_emails, (automaticEmail) => { return _.map(window.mailpoet_automatic_emails, (automaticEmail) => {
const email = automaticEmail; const email = automaticEmail;
const onClick = window.mailpoet_premium_active const onClick = _.partial(this.setupNewsletter, automaticEmail.slug);
? _.partial(this.setupNewsletter, automaticEmail.slug)
: undefined;
email.disabled = !window.mailpoet_premium_active;
email.action = (() => ( email.action = (() => (
<div> <div>
<a <a
@@ -47,7 +44,7 @@ class NewsletterTypes extends React.Component {
onClick={onClick} onClick={onClick}
role="button" role="button"
tabIndex={0} tabIndex={0}
disabled={!window.mailpoet_premium_active || this.state.isCreating} disabled={this.state.isCreating}
onKeyDown={(event) => { onKeyDown={(event) => {
if ((['keydown', 'keypress'].includes(event.type) && ['Enter', ' '].includes(event.key)) if ((['keydown', 'keypress'].includes(event.type) && ['Enter', ' '].includes(event.key))
) { ) {
@@ -271,13 +268,6 @@ 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 data-automation-id={`${type.slug}_premium_feature_notice`}>
<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" />