Block users with old list

[MAILPOET-2129]
This commit is contained in:
Pavel Dohnal
2019-07-22 15:42:39 +02:00
committed by M. Shull
parent 6362a8a881
commit 7dde2149dd
3 changed files with 37 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ import PropTypes from 'prop-types';
import InitialQuestion from './step_input_validation/initial_question.jsx';
import WrongSourceBlock from './step_input_validation/wrong_source_block.jsx';
import OldListBlock from './step_input_validation/old_list_block.jsx';
import LastSentQuestion from './step_input_validation/last_sent_question.jsx';
function StepInputValidation({ stepMethodSelectionData, history }) {
@@ -19,6 +20,13 @@ function StepInputValidation({ stepMethodSelectionData, history }) {
[stepMethodSelectionData, history],
);
function lastSentSubmit(when) {
setLastSent(when);
if (when === 'recently') {
history.push('step_data_manipulation');
}
}
return (
<div className="mailpoet_import_validation_step">
{importSource === undefined && (
@@ -34,9 +42,13 @@ function StepInputValidation({ stepMethodSelectionData, history }) {
{importSource === 'existing-list' && lastSent === undefined && (
<LastSentQuestion
onSubmit={() => {}}
onSubmit={lastSentSubmit}
/>
)}
{importSource === 'existing-list' && lastSent === 'notRecently' && (
<OldListBlock />
)}
</div>
);
}

View File

@@ -0,0 +1,22 @@
import React from 'react';
import MailPoet from 'mailpoet';
function OldListBlock() {
return (
<div className="mailpoet_import_block">
<p>{MailPoet.I18n.t('validationStepBlock1')}</p>
<p>{MailPoet.I18n.t('validationStepBlock3')}</p>
<p>{MailPoet.I18n.t('validationStepBlock4')}</p>
<a
href="https://kb.mailpoet.com/article/269-reconfirm-subscribers-to-your-list"
target="_blank"
rel="noopener noreferrer"
className="button button-primary"
>
{MailPoet.I18n.t('validationStepBlockButton')}
</a>
</div>
);
}
export default OldListBlock;

View File

@@ -85,6 +85,8 @@
'validationStepRadio2': _x('An email list from another email marketing tool', 'User choice to import his address book contacts'),
'validationStepBlock1': _x('You will need to ask your contacts to join your list instead of importing them. This is a standard practice to ensure good email deliverability.', 'Paragraph explaining the user what to do when importing his contacts.'),
'validationStepBlock2': _x('If you send with MailPoet, we will detect if you import subscribers without their explicit consent and suspend your account.', 'Paragraph warning what happens if user imports his contacts and sends with MailPoet'),
'validationStepBlock3': __('Lists quickly start having invalid addresses because people change jobs and stop using their addresses. This is known as hard bounces and is a primary factor for detecting bad sending practices.'),
'validationStepBlock4': _x('If you send with MailPoet, we will quickly detect and suspend your account, even if you have just 5% of hard bounces.', 'Paragraph explaining the user how that MailPoet will ban users with list that have invalid email addresses'),
'validationStepBlockButton': _x('How to ask your contacts to join your list', 'Button to visit a support article'),
'validationStepLastSentHeading': _x('When did you last send an email to this list?', 'Question for users importing their list'),
'validationStepLastSentOption1': __('Over 2 years ago'),