Use javascript notice
[MAILPOET-2643]
This commit is contained in:
@@ -7,6 +7,7 @@ import { checkMailerStatus, addStatsCTAAction } from 'newsletters/listings/utils
|
|||||||
import Statistics from 'newsletters/listings/statistics.jsx';
|
import Statistics from 'newsletters/listings/statistics.jsx';
|
||||||
import NewsletterTypes from 'newsletters/types.jsx';
|
import NewsletterTypes from 'newsletters/types.jsx';
|
||||||
import SubscribersLimitNotice from 'notices/subscribers_limit_notice.jsx';
|
import SubscribersLimitNotice from 'notices/subscribers_limit_notice.jsx';
|
||||||
|
import InvalidMssKeyNotice from 'notices/invalid_mss_key_notice';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import MailPoet from 'mailpoet';
|
import MailPoet from 'mailpoet';
|
||||||
import _ from 'underscore';
|
import _ from 'underscore';
|
||||||
@@ -370,6 +371,10 @@ class Listings extends React.Component {
|
|||||||
|
|
||||||
<FeatureAnnouncement hasNews={window.mailpoet_feature_announcement_has_news} />
|
<FeatureAnnouncement hasNews={window.mailpoet_feature_announcement_has_news} />
|
||||||
<SubscribersLimitNotice />
|
<SubscribersLimitNotice />
|
||||||
|
<InvalidMssKeyNotice
|
||||||
|
mssKeyInvalid={window.mailpoet_mss_key_invalid}
|
||||||
|
subscribersCount={window.mailpoet_subscribers_count}
|
||||||
|
/>
|
||||||
|
|
||||||
<ListingTabs tab="woocommerce" />
|
<ListingTabs tab="woocommerce" />
|
||||||
|
|
||||||
|
@@ -3,6 +3,8 @@ import MailPoet from 'mailpoet';
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Link, withRouter } from 'react-router-dom';
|
import { Link, withRouter } from 'react-router-dom';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import InvalidMssKeyNotice from 'notices/invalid_mss_key_notice';
|
||||||
|
|
||||||
import NewsletterGeneralStats from './newsletter_stats.jsx';
|
import NewsletterGeneralStats from './newsletter_stats.jsx';
|
||||||
import NewsletterStatsInfo from './newsletter_info.jsx';
|
import NewsletterStatsInfo from './newsletter_info.jsx';
|
||||||
import PremiumBanner from './premium_banner.jsx';
|
import PremiumBanner from './premium_banner.jsx';
|
||||||
@@ -96,6 +98,11 @@ class CampaignStatsPage extends React.Component {
|
|||||||
</Link>
|
</Link>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
<InvalidMssKeyNotice
|
||||||
|
mssKeyInvalid={window.mailpoet_mss_key_invalid}
|
||||||
|
subscribersCount={window.mailpoet_subscribers_count}
|
||||||
|
/>
|
||||||
|
|
||||||
<div className="mailpoet_stat_triple-spaced">
|
<div className="mailpoet_stat_triple-spaced">
|
||||||
<div className="mailpoet_stat_info">
|
<div className="mailpoet_stat_info">
|
||||||
<NewsletterStatsInfo newsletter={newsletter} />
|
<NewsletterStatsInfo newsletter={newsletter} />
|
||||||
|
@@ -23,6 +23,7 @@ import {
|
|||||||
nthWeekDayValues,
|
nthWeekDayValues,
|
||||||
} from 'newsletters/scheduling/common.jsx';
|
} from 'newsletters/scheduling/common.jsx';
|
||||||
import SubscribersLimitNotice from 'notices/subscribers_limit_notice.jsx';
|
import SubscribersLimitNotice from 'notices/subscribers_limit_notice.jsx';
|
||||||
|
import InvalidMssKeyNotice from 'notices/invalid_mss_key_notice';
|
||||||
|
|
||||||
const messages = {
|
const messages = {
|
||||||
onNoItemsFound: (group, search) => MailPoet.I18n.t(search ? 'noItemsFound' : 'emptyListing'),
|
onNoItemsFound: (group, search) => MailPoet.I18n.t(search ? 'noItemsFound' : 'emptyListing'),
|
||||||
@@ -339,6 +340,10 @@ class NewsletterListNotification extends React.Component {
|
|||||||
|
|
||||||
<FeatureAnnouncement hasNews={window.mailpoet_feature_announcement_has_news} />
|
<FeatureAnnouncement hasNews={window.mailpoet_feature_announcement_has_news} />
|
||||||
<SubscribersLimitNotice />
|
<SubscribersLimitNotice />
|
||||||
|
<InvalidMssKeyNotice
|
||||||
|
mssKeyInvalid={window.mailpoet_mss_key_invalid}
|
||||||
|
subscribersCount={window.mailpoet_subscribers_count}
|
||||||
|
/>
|
||||||
|
|
||||||
<ListingTabs tab="notification" />
|
<ListingTabs tab="notification" />
|
||||||
|
|
||||||
|
@@ -17,6 +17,7 @@ import {
|
|||||||
} from 'newsletters/listings/utils.jsx';
|
} from 'newsletters/listings/utils.jsx';
|
||||||
import NewsletterTypes from 'newsletters/types.jsx';
|
import NewsletterTypes from 'newsletters/types.jsx';
|
||||||
import SubscribersLimitNotice from 'notices/subscribers_limit_notice.jsx';
|
import SubscribersLimitNotice from 'notices/subscribers_limit_notice.jsx';
|
||||||
|
import InvalidMssKeyNotice from 'notices/invalid_mss_key_notice';
|
||||||
import TransactionalEmailsProposeOptInNotice from 'notices/transactional_emails_propose_opt_in_notice';
|
import TransactionalEmailsProposeOptInNotice from 'notices/transactional_emails_propose_opt_in_notice';
|
||||||
import { GlobalContext } from 'context/index.jsx';
|
import { GlobalContext } from 'context/index.jsx';
|
||||||
|
|
||||||
@@ -239,6 +240,10 @@ class NewsletterListStandard extends React.Component {
|
|||||||
apiVersion={window.mailpoet_api_version}
|
apiVersion={window.mailpoet_api_version}
|
||||||
noticeDismissed={window.mailpoet_transactional_emails_opt_in_notice_dismissed}
|
noticeDismissed={window.mailpoet_transactional_emails_opt_in_notice_dismissed}
|
||||||
/>
|
/>
|
||||||
|
<InvalidMssKeyNotice
|
||||||
|
mssKeyInvalid={window.mailpoet_mss_key_invalid}
|
||||||
|
subscribersCount={window.mailpoet_subscribers_count}
|
||||||
|
/>
|
||||||
|
|
||||||
<ListingTabs tab="standard" />
|
<ListingTabs tab="standard" />
|
||||||
|
|
||||||
|
@@ -15,6 +15,7 @@ import {
|
|||||||
} from 'newsletters/listings/utils.jsx';
|
} from 'newsletters/listings/utils.jsx';
|
||||||
import NewsletterTypes from 'newsletters/types.jsx';
|
import NewsletterTypes from 'newsletters/types.jsx';
|
||||||
import SubscribersLimitNotice from 'notices/subscribers_limit_notice.jsx';
|
import SubscribersLimitNotice from 'notices/subscribers_limit_notice.jsx';
|
||||||
|
import InvalidMssKeyNotice from 'notices/invalid_mss_key_notice';
|
||||||
|
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import MailPoet from 'mailpoet';
|
import MailPoet from 'mailpoet';
|
||||||
@@ -355,6 +356,10 @@ class NewsletterListWelcome extends React.Component {
|
|||||||
|
|
||||||
<FeatureAnnouncement hasNews={window.mailpoet_feature_announcement_has_news} />
|
<FeatureAnnouncement hasNews={window.mailpoet_feature_announcement_has_news} />
|
||||||
<SubscribersLimitNotice />
|
<SubscribersLimitNotice />
|
||||||
|
<InvalidMssKeyNotice
|
||||||
|
mssKeyInvalid={window.mailpoet_mss_key_invalid}
|
||||||
|
subscribersCount={window.mailpoet_subscribers_count}
|
||||||
|
/>
|
||||||
|
|
||||||
<ListingTabs tab="welcome" />
|
<ListingTabs tab="welcome" />
|
||||||
|
|
||||||
|
@@ -14,6 +14,7 @@ import PropTypes from 'prop-types';
|
|||||||
import { withRouter } from 'react-router-dom';
|
import { withRouter } from 'react-router-dom';
|
||||||
import ReactStringReplace from 'react-string-replace';
|
import ReactStringReplace from 'react-string-replace';
|
||||||
import SubscribersLimitNotice from 'notices/subscribers_limit_notice.jsx';
|
import SubscribersLimitNotice from 'notices/subscribers_limit_notice.jsx';
|
||||||
|
import InvalidMssKeyNotice from 'notices/invalid_mss_key_notice';
|
||||||
import slugify from 'slugify';
|
import slugify from 'slugify';
|
||||||
import { GlobalContext } from 'context/index.jsx';
|
import { GlobalContext } from 'context/index.jsx';
|
||||||
|
|
||||||
@@ -473,6 +474,10 @@ class NewsletterSend extends React.Component {
|
|||||||
onSubmit={this.handleSave}
|
onSubmit={this.handleSave}
|
||||||
>
|
>
|
||||||
<SubscribersLimitNotice />
|
<SubscribersLimitNotice />
|
||||||
|
<InvalidMssKeyNotice
|
||||||
|
mssKeyInvalid={window.mailpoet_mss_key_invalid}
|
||||||
|
subscribersCount={window.mailpoet_subscribers_count}
|
||||||
|
/>
|
||||||
<p className="submit">
|
<p className="submit">
|
||||||
{
|
{
|
||||||
isPaused
|
isPaused
|
||||||
|
30
assets/js/src/notices/invalid_mss_key_notice.tsx
Normal file
30
assets/js/src/notices/invalid_mss_key_notice.tsx
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import Notice from 'notices/notice';
|
||||||
|
import MailPoet from 'mailpoet';
|
||||||
|
|
||||||
|
type Props = {
|
||||||
|
mssKeyInvalid: boolean,
|
||||||
|
subscribersCount: number,
|
||||||
|
}
|
||||||
|
|
||||||
|
const InvalidMssKeyNotice = ({ mssKeyInvalid, subscribersCount }: Props) => {
|
||||||
|
if (!mssKeyInvalid) return null;
|
||||||
|
return (
|
||||||
|
<Notice type="error" timeout={false} closable={false} renderInPlace>
|
||||||
|
<h3>{MailPoet.I18n.t('allSendingPausedHeader')}</h3>
|
||||||
|
<p>{MailPoet.I18n.t('allSendingPausedBody')}</p>
|
||||||
|
<p>
|
||||||
|
<a
|
||||||
|
href={`https://account.mailpoet.com?s=${subscribersCount}`}
|
||||||
|
className="button button-primary"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
{MailPoet.I18n.t('allSendingPausedLink')}
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
</Notice>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default InvalidMssKeyNotice;
|
@@ -6,6 +6,7 @@ import PropTypes from 'prop-types';
|
|||||||
|
|
||||||
import Listing from 'listing/listing.jsx';
|
import Listing from 'listing/listing.jsx';
|
||||||
import SubscribersLimitNotice from 'notices/subscribers_limit_notice.jsx';
|
import SubscribersLimitNotice from 'notices/subscribers_limit_notice.jsx';
|
||||||
|
import InvalidMssKeyNotice from '../notices/invalid_mss_key_notice';
|
||||||
|
|
||||||
const isWPUsersSegment = (segment) => segment.type === 'wp_users';
|
const isWPUsersSegment = (segment) => segment.type === 'wp_users';
|
||||||
const isWooCommerceCustomersSegment = (segment) => segment.type === 'woocommerce_users';
|
const isWooCommerceCustomersSegment = (segment) => segment.type === 'woocommerce_users';
|
||||||
@@ -300,6 +301,10 @@ class SegmentList extends React.Component {
|
|||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<SubscribersLimitNotice />
|
<SubscribersLimitNotice />
|
||||||
|
<InvalidMssKeyNotice
|
||||||
|
mssKeyInvalid={window.mailpoet_mss_key_invalid}
|
||||||
|
subscribersCount={window.mailpoet_subscribers_count}
|
||||||
|
/>
|
||||||
|
|
||||||
<Listing
|
<Listing
|
||||||
limit={window.mailpoet_listing_per_page}
|
limit={window.mailpoet_listing_per_page}
|
||||||
|
@@ -9,6 +9,7 @@ import PropTypes from 'prop-types';
|
|||||||
import Listing from 'listing/listing.jsx';
|
import Listing from 'listing/listing.jsx';
|
||||||
import Selection from 'form/fields/selection.jsx';
|
import Selection from 'form/fields/selection.jsx';
|
||||||
import SubscribersLimitNotice from 'notices/subscribers_limit_notice.jsx';
|
import SubscribersLimitNotice from 'notices/subscribers_limit_notice.jsx';
|
||||||
|
import InvalidMssKeyNotice from 'notices/invalid_mss_key_notice';
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
@@ -384,6 +385,10 @@ class SubscriberList extends React.Component {
|
|||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<SubscribersLimitNotice />
|
<SubscribersLimitNotice />
|
||||||
|
<InvalidMssKeyNotice
|
||||||
|
mssKeyInvalid={window.mailpoet_mss_key_invalid}
|
||||||
|
subscribersCount={window.mailpoet_subscribers_count}
|
||||||
|
/>
|
||||||
|
|
||||||
<Listing
|
<Listing
|
||||||
limit={window.mailpoet_listing_per_page}
|
limit={window.mailpoet_listing_per_page}
|
||||||
|
@@ -146,6 +146,7 @@ class Newsletters {
|
|||||||
$lastAnnouncementSeen < $lastAnnouncementDate
|
$lastAnnouncementSeen < $lastAnnouncementDate
|
||||||
);
|
);
|
||||||
$data['last_announcement_seen'] = $lastAnnouncementSeen;
|
$data['last_announcement_seen'] = $lastAnnouncementSeen;
|
||||||
|
$data['mss_key_invalid'] = ($this->servicesChecker->isMailPoetAPIKeyValid() === false);
|
||||||
|
|
||||||
$data['automatic_emails'] = [
|
$data['automatic_emails'] = [
|
||||||
[
|
[
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
namespace MailPoet\AdminPages\Pages;
|
namespace MailPoet\AdminPages\Pages;
|
||||||
|
|
||||||
use MailPoet\AdminPages\PageRenderer;
|
use MailPoet\AdminPages\PageRenderer;
|
||||||
|
use MailPoet\Config\ServicesChecker;
|
||||||
use MailPoet\Listing\PageLimit;
|
use MailPoet\Listing\PageLimit;
|
||||||
use MailPoet\Models\Subscriber;
|
use MailPoet\Models\Subscriber;
|
||||||
use MailPoet\Util\License\Features\Subscribers as SubscribersFeature;
|
use MailPoet\Util\License\Features\Subscribers as SubscribersFeature;
|
||||||
@@ -17,10 +18,19 @@ class Segments {
|
|||||||
/** @var SubscribersFeature */
|
/** @var SubscribersFeature */
|
||||||
private $subscribersFeature;
|
private $subscribersFeature;
|
||||||
|
|
||||||
public function __construct(PageRenderer $pageRenderer, PageLimit $listingPageLimit, SubscribersFeature $subscribersFeature) {
|
/** @var ServicesChecker */
|
||||||
|
private $servicesChecker;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
PageRenderer $pageRenderer,
|
||||||
|
PageLimit $listingPageLimit,
|
||||||
|
ServicesChecker $servicesChecker,
|
||||||
|
SubscribersFeature $subscribersFeature
|
||||||
|
) {
|
||||||
$this->pageRenderer = $pageRenderer;
|
$this->pageRenderer = $pageRenderer;
|
||||||
$this->listingPageLimit = $listingPageLimit;
|
$this->listingPageLimit = $listingPageLimit;
|
||||||
$this->subscribersFeature = $subscribersFeature;
|
$this->subscribersFeature = $subscribersFeature;
|
||||||
|
$this->servicesChecker = $servicesChecker;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function render() {
|
public function render() {
|
||||||
@@ -32,6 +42,8 @@ class Segments {
|
|||||||
$data['has_valid_api_key'] = $this->subscribersFeature->hasValidApiKey();
|
$data['has_valid_api_key'] = $this->subscribersFeature->hasValidApiKey();
|
||||||
$data['subscriber_count'] = Subscriber::getTotalSubscribers();
|
$data['subscriber_count'] = Subscriber::getTotalSubscribers();
|
||||||
|
|
||||||
|
$data['mss_key_invalid'] = ($this->servicesChecker->isMailPoetAPIKeyValid() === false);
|
||||||
|
|
||||||
$this->pageRenderer->displayPage('segments.html', $data);
|
$this->pageRenderer->displayPage('segments.html', $data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
namespace MailPoet\AdminPages\Pages;
|
namespace MailPoet\AdminPages\Pages;
|
||||||
|
|
||||||
use MailPoet\AdminPages\PageRenderer;
|
use MailPoet\AdminPages\PageRenderer;
|
||||||
|
use MailPoet\Config\ServicesChecker;
|
||||||
use MailPoet\Form\Block;
|
use MailPoet\Form\Block;
|
||||||
use MailPoet\Listing\PageLimit;
|
use MailPoet\Listing\PageLimit;
|
||||||
use MailPoet\Models\CustomField;
|
use MailPoet\Models\CustomField;
|
||||||
@@ -30,11 +31,15 @@ class Subscribers {
|
|||||||
/** @var Block\Date */
|
/** @var Block\Date */
|
||||||
private $dateBlock;
|
private $dateBlock;
|
||||||
|
|
||||||
|
/** @var ServicesChecker */
|
||||||
|
private $servicesChecker;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
PageRenderer $pageRenderer,
|
PageRenderer $pageRenderer,
|
||||||
PageLimit $listingPageLimit,
|
PageLimit $listingPageLimit,
|
||||||
SubscribersFeature $subscribersFeature,
|
SubscribersFeature $subscribersFeature,
|
||||||
WPFunctions $wp,
|
WPFunctions $wp,
|
||||||
|
ServicesChecker $servicesChecker,
|
||||||
Block\Date $dateBlock
|
Block\Date $dateBlock
|
||||||
) {
|
) {
|
||||||
$this->pageRenderer = $pageRenderer;
|
$this->pageRenderer = $pageRenderer;
|
||||||
@@ -42,6 +47,7 @@ class Subscribers {
|
|||||||
$this->subscribersFeature = $subscribersFeature;
|
$this->subscribersFeature = $subscribersFeature;
|
||||||
$this->wp = $wp;
|
$this->wp = $wp;
|
||||||
$this->dateBlock = $dateBlock;
|
$this->dateBlock = $dateBlock;
|
||||||
|
$this->servicesChecker = $servicesChecker;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function render() {
|
public function render() {
|
||||||
@@ -75,6 +81,8 @@ class Subscribers {
|
|||||||
$data['premium_plugin_active'] = License::getLicense();
|
$data['premium_plugin_active'] = License::getLicense();
|
||||||
$data['mss_active'] = Bridge::isMPSendingServiceEnabled();
|
$data['mss_active'] = Bridge::isMPSendingServiceEnabled();
|
||||||
|
|
||||||
|
$data['mss_key_invalid'] = ($this->servicesChecker->isMailPoetAPIKeyValid() === false);
|
||||||
|
|
||||||
$data['max_confirmation_emails'] = ConfirmationEmailMailer::MAX_CONFIRMATION_EMAILS;
|
$data['max_confirmation_emails'] = ConfirmationEmailMailer::MAX_CONFIRMATION_EMAILS;
|
||||||
|
|
||||||
$data['subscribers_limit'] = $this->subscribersFeature->getSubscribersLimit();
|
$data['subscribers_limit'] = $this->subscribersFeature->getSubscribersLimit();
|
||||||
|
@@ -56,7 +56,6 @@ class Menu {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function init() {
|
public function init() {
|
||||||
$this->checkMailPoetAPIKey();
|
|
||||||
$this->checkPremiumKey();
|
$this->checkPremiumKey();
|
||||||
|
|
||||||
$this->wp->addAction(
|
$this->wp->addAction(
|
||||||
@@ -552,20 +551,6 @@ class Menu {
|
|||||||
// Used for displaying admin notices only
|
// Used for displaying admin notices only
|
||||||
}
|
}
|
||||||
|
|
||||||
public function checkMailPoetAPIKey(ServicesChecker $checker = null) {
|
|
||||||
if (self::isOnMailPoetAdminPage()) {
|
|
||||||
$showNotices = isset($_REQUEST['page'])
|
|
||||||
&& (
|
|
||||||
stripos($_REQUEST['page'], self::MAIN_PAGE_SLUG) !== false
|
|
||||||
|| stripos($_REQUEST['page'], 'mailpoet-segments') !== false
|
|
||||||
|| stripos($_REQUEST['page'], 'mailpoet-subscribers') !== false
|
|
||||||
);
|
|
||||||
$checker = $checker ?: $this->servicesChecker;
|
|
||||||
$checker = $checker ?: $this->servicesChecker;
|
|
||||||
$this->mpApiKeyValid = $checker->isMailPoetAPIKeyValid($showNotices);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function checkPremiumKey(ServicesChecker $checker = null) {
|
public function checkPremiumKey(ServicesChecker $checker = null) {
|
||||||
$showNotices = isset($_SERVER['SCRIPT_NAME'])
|
$showNotices = isset($_SERVER['SCRIPT_NAME'])
|
||||||
&& stripos($_SERVER['SCRIPT_NAME'], 'plugins.php') !== false;
|
&& stripos($_SERVER['SCRIPT_NAME'], 'plugins.php') !== false;
|
||||||
|
@@ -39,27 +39,6 @@ class MenuTest extends \MailPoetTest {
|
|||||||
expect($result)->false();
|
expect($result)->false();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testItChecksMailpoetAPIKey() {
|
|
||||||
$menu = $this->getMenu();
|
|
||||||
|
|
||||||
$_REQUEST['page'] = 'mailpoet-newsletters';
|
|
||||||
$checker = Stub::make(
|
|
||||||
new ServicesChecker(),
|
|
||||||
['isMailPoetAPIKeyValid' => true],
|
|
||||||
$this
|
|
||||||
);
|
|
||||||
$menu->checkMailPoetAPIKey($checker);
|
|
||||||
expect($menu->mpApiKeyValid)->true();
|
|
||||||
|
|
||||||
$checker = Stub::make(
|
|
||||||
new ServicesChecker(),
|
|
||||||
['isMailPoetAPIKeyValid' => false],
|
|
||||||
$this
|
|
||||||
);
|
|
||||||
$menu->checkMailPoetAPIKey($checker);
|
|
||||||
expect($menu->mpApiKeyValid)->false();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testItChecksPremiumKey() {
|
public function testItChecksPremiumKey() {
|
||||||
$menu = $this->getMenu();
|
$menu = $this->getMenu();
|
||||||
|
|
||||||
|
@@ -28,6 +28,7 @@
|
|||||||
var mailpoet_tracking_enabled = <%= json_encode(tracking_enabled) %>;
|
var mailpoet_tracking_enabled = <%= json_encode(tracking_enabled) %>;
|
||||||
var mailpoet_premium_active = <%= json_encode(premium_plugin_active) %>;
|
var mailpoet_premium_active = <%= json_encode(premium_plugin_active) %>;
|
||||||
var mailpoet_transactional_emails_opt_in_notice_dismissed = '<%= transactional_emails_opt_in_notice_dismissed %>';
|
var mailpoet_transactional_emails_opt_in_notice_dismissed = '<%= transactional_emails_opt_in_notice_dismissed %>';
|
||||||
|
var mailpoet_mss_key_invalid = <%= mss_key_invalid ? 'true' : 'false' %>;
|
||||||
|
|
||||||
var has_mss_key_specified = <%= json_encode(has_mss_key_specified) %>;
|
var has_mss_key_specified = <%= json_encode(has_mss_key_specified) %>;
|
||||||
var MSS_pitch_illustration_url = '<%= cdn_url('welcome-wizard/illu-pitch-mss.20190912.png') %>';
|
var MSS_pitch_illustration_url = '<%= cdn_url('welcome-wizard/illu-pitch-mss.20190912.png') %>';
|
||||||
@@ -252,6 +253,10 @@
|
|||||||
'noScheduledDateError': __('Please enter the scheduled date.'),
|
'noScheduledDateError': __('Please enter the scheduled date.'),
|
||||||
'schedule': __('Schedule'),
|
'schedule': __('Schedule'),
|
||||||
|
|
||||||
|
'allSendingPausedHeader': __('All sending is currently paused!'),
|
||||||
|
'allSendingPausedBody': __('Your key to send with MailPoet is invalid.'),
|
||||||
|
'allSendingPausedLink': __('Purchase a key'),
|
||||||
|
|
||||||
'close': __('Close'),
|
'close': __('Close'),
|
||||||
'today': __('Today'),
|
'today': __('Today'),
|
||||||
'january': __('January'),
|
'january': __('January'),
|
||||||
|
@@ -14,6 +14,7 @@
|
|||||||
var mailpoet_subscribers_limit_reached = <%= subscribers_limit_reached ? 'true' : 'false' %>;
|
var mailpoet_subscribers_limit_reached = <%= subscribers_limit_reached ? 'true' : 'false' %>;
|
||||||
var mailpoet_has_valid_api_key = <%= has_valid_api_key ? 'true' : 'false' %>;
|
var mailpoet_has_valid_api_key = <%= has_valid_api_key ? 'true' : 'false' %>;
|
||||||
var mailpoet_subscribers_count = <%= subscriber_count %>;
|
var mailpoet_subscribers_count = <%= subscriber_count %>;
|
||||||
|
var mailpoet_mss_key_invalid = <%= mss_key_invalid ? 'true' : 'false' %>;
|
||||||
</script>
|
</script>
|
||||||
<% endblock %>
|
<% endblock %>
|
||||||
|
|
||||||
@@ -74,6 +75,9 @@
|
|||||||
'pageOutOf': __('of'),
|
'pageOutOf': __('of'),
|
||||||
'numberOfItemsSingular': __('1 item'),
|
'numberOfItemsSingular': __('1 item'),
|
||||||
'numberOfItemsMultiple': __('%$1d items'),
|
'numberOfItemsMultiple': __('%$1d items'),
|
||||||
|
'allSendingPausedHeader': __('All sending is currently paused!'),
|
||||||
|
'allSendingPausedBody': __('Your key to send with MailPoet is invalid.'),
|
||||||
|
'allSendingPausedLink': __('Purchase a key'),
|
||||||
|
|
||||||
'segmentDescriptionTip': __('This text box is for your own use and is never shown to your subscribers.'),
|
'segmentDescriptionTip': __('This text box is for your own use and is never shown to your subscribers.'),
|
||||||
'backToList': __('Back')
|
'backToList': __('Back')
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
var mailpoet_subscribers_limit = <%= subscribers_limit ? subscribers_limit : 'false' %>;
|
var mailpoet_subscribers_limit = <%= subscribers_limit ? subscribers_limit : 'false' %>;
|
||||||
var mailpoet_subscribers_limit_reached = <%= subscribers_limit_reached ? 'true' : 'false' %>;
|
var mailpoet_subscribers_limit_reached = <%= subscribers_limit_reached ? 'true' : 'false' %>;
|
||||||
var mailpoet_has_valid_api_key = <%= has_valid_api_key ? 'true' : 'false' %>;
|
var mailpoet_has_valid_api_key = <%= has_valid_api_key ? 'true' : 'false' %>;
|
||||||
|
var mailpoet_mss_key_invalid = <%= mss_key_invalid ? 'true' : 'false' %>;
|
||||||
var mailpoet_subscribers_count = <%= subscriber_count %>;
|
var mailpoet_subscribers_count = <%= subscriber_count %>;
|
||||||
</script>
|
</script>
|
||||||
<% endblock %>
|
<% endblock %>
|
||||||
@@ -100,6 +101,9 @@
|
|||||||
'listsToWhichSubscriberWasSubscribed': __('Lists to which the subscriber was subscribed.'),
|
'listsToWhichSubscriberWasSubscribed': __('Lists to which the subscriber was subscribed.'),
|
||||||
'WPUsersSegment': __('WordPress Users'),
|
'WPUsersSegment': __('WordPress Users'),
|
||||||
'WPUserEditNotice': __('This subscriber is a registered WordPress user. [link]Edit his/her profile[/link] to change his/her email.'),
|
'WPUserEditNotice': __('This subscriber is a registered WordPress user. [link]Edit his/her profile[/link] to change his/her email.'),
|
||||||
|
'allSendingPausedHeader': __('All sending is currently paused!'),
|
||||||
|
'allSendingPausedBody': __('Your key to send with MailPoet is invalid.'),
|
||||||
|
'allSendingPausedLink': __('Purchase a key'),
|
||||||
'tip': __('Tip:'),
|
'tip': __('Tip:'),
|
||||||
'customFieldsTip': __('Need to add new fields, like a telephone number or street address? You can add custom fields by editing the subscription form on the Forms page.'),
|
'customFieldsTip': __('Need to add new fields, like a telephone number or street address? You can add custom fields by editing the subscription form on the Forms page.'),
|
||||||
'year': __('Year'),
|
'year': __('Year'),
|
||||||
|
Reference in New Issue
Block a user