Fix new code
This commit is contained in:
@@ -45,29 +45,29 @@ class ConfirmAlert extends React.Component {
|
||||
|
||||
return (this.state.show
|
||||
&& (
|
||||
<div className="mailpoet_modal_overlay">
|
||||
<div className="mailpoet_popup" tabIndex="-1">
|
||||
<div className="mailpoet_popup_wrapper">
|
||||
<button className="mailpoet_modal_close" onClick={this.onClose} type="button" />
|
||||
{title
|
||||
<div className="mailpoet_modal_overlay">
|
||||
<div className="mailpoet_popup" tabIndex="-1">
|
||||
<div className="mailpoet_popup_wrapper">
|
||||
<button className="mailpoet_modal_close" onClick={this.onClose} type="button" />
|
||||
{title
|
||||
&& (
|
||||
<div className="mailpoet_popup_title">
|
||||
<h2>{title}</h2>
|
||||
</div>
|
||||
<div className="mailpoet_popup_title">
|
||||
<h2>{title}</h2>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
<div className="mailpoet_popup_body clearfix">
|
||||
<p className="mailpoet_hp_email_label">{message}</p>
|
||||
<button className="button button-secondary" onClick={this.onClose} type="button">
|
||||
{cancelLabel}
|
||||
</button>
|
||||
<button className="button button-primary" onClick={this.onConfirm} type="submit">
|
||||
{confirmLabel}
|
||||
</button>
|
||||
}
|
||||
<div className="mailpoet_popup_body clearfix">
|
||||
<p className="mailpoet_hp_email_label">{message}</p>
|
||||
<button className="button button-secondary" onClick={this.onClose} type="button">
|
||||
{cancelLabel}
|
||||
</button>
|
||||
<button className="button button-primary" onClick={this.onConfirm} type="submit">
|
||||
{confirmLabel}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@@ -56,29 +56,31 @@ const SenderEmailAddressWarning = ({ emailAddress }) => {
|
||||
const emailAddressDomain = emailAddress.split('@').pop().toLowerCase();
|
||||
if (badDomains.indexOf(emailAddressDomain) > -1) {
|
||||
const userHostDomain = window.location.hostname.replace('www.', '');
|
||||
return (<React.Fragment>
|
||||
<p className="sender_email_address_warning">{MailPoet.I18n.t('senderEmailAddressWarning1')}</p>
|
||||
<p className="sender_email_address_warning">
|
||||
{ReactStringReplace(
|
||||
MailPoet.I18n.t('senderEmailAddressWarning2'),
|
||||
/(%suggested|%originalSender|<em>.*<\/em>)/,
|
||||
(match) => {
|
||||
if (match === '%suggested') return `info@${userHostDomain}`;
|
||||
if (match === '%originalSender') return <em key="sender-email">{ emailAddress }</em>;
|
||||
return <em key="reply-to">{match.replace(/<\/?em>/g, '')}</em>;
|
||||
}
|
||||
)}
|
||||
</p>
|
||||
<p className="sender_email_address_warning">
|
||||
<a
|
||||
href="https://kb.mailpoet.com/article/259-your-from-address-cannot-be-yahoo-com-gmail-com-outlook-com"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
{MailPoet.I18n.t('senderEmailAddressWarning3')}
|
||||
</a>
|
||||
</p>
|
||||
</React.Fragment>);
|
||||
return (
|
||||
<React.Fragment>
|
||||
<p className="sender_email_address_warning">{MailPoet.I18n.t('senderEmailAddressWarning1')}</p>
|
||||
<p className="sender_email_address_warning">
|
||||
{ReactStringReplace(
|
||||
MailPoet.I18n.t('senderEmailAddressWarning2'),
|
||||
/(%suggested|%originalSender|<em>.*<\/em>)/,
|
||||
(match) => {
|
||||
if (match === '%suggested') return `info@${userHostDomain}`;
|
||||
if (match === '%originalSender') return <em key="sender-email">{ emailAddress }</em>;
|
||||
return <em key="reply-to">{match.replace(/<\/?em>/g, '')}</em>;
|
||||
}
|
||||
)}
|
||||
</p>
|
||||
<p className="sender_email_address_warning">
|
||||
<a
|
||||
href="https://kb.mailpoet.com/article/259-your-from-address-cannot-be-yahoo-com-gmail-com-outlook-com"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
{MailPoet.I18n.t('senderEmailAddressWarning3')}
|
||||
</a>
|
||||
</p>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
Reference in New Issue
Block a user