Fix new code
This commit is contained in:
@ -56,7 +56,8 @@ const SenderEmailAddressWarning = ({ emailAddress }) => {
|
|||||||
const emailAddressDomain = emailAddress.split('@').pop().toLowerCase();
|
const emailAddressDomain = emailAddress.split('@').pop().toLowerCase();
|
||||||
if (badDomains.indexOf(emailAddressDomain) > -1) {
|
if (badDomains.indexOf(emailAddressDomain) > -1) {
|
||||||
const userHostDomain = window.location.hostname.replace('www.', '');
|
const userHostDomain = window.location.hostname.replace('www.', '');
|
||||||
return (<React.Fragment>
|
return (
|
||||||
|
<React.Fragment>
|
||||||
<p className="sender_email_address_warning">{MailPoet.I18n.t('senderEmailAddressWarning1')}</p>
|
<p className="sender_email_address_warning">{MailPoet.I18n.t('senderEmailAddressWarning1')}</p>
|
||||||
<p className="sender_email_address_warning">
|
<p className="sender_email_address_warning">
|
||||||
{ReactStringReplace(
|
{ReactStringReplace(
|
||||||
@ -78,7 +79,8 @@ const SenderEmailAddressWarning = ({ emailAddress }) => {
|
|||||||
{MailPoet.I18n.t('senderEmailAddressWarning3')}
|
{MailPoet.I18n.t('senderEmailAddressWarning3')}
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
</React.Fragment>);
|
</React.Fragment>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
@ -4,10 +4,9 @@ define('modal', ['mailpoet', 'jquery'],
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var MailPoet = mp;
|
var MailPoet = mp;
|
||||||
var closeModalImage =
|
var closeModalImage = '<svg viewBox="0 0 23 23" xmlns="http://www.w3.org/2000/svg">'
|
||||||
'<svg viewBox="0 0 23 23" xmlns="http://www.w3.org/2000/svg">' +
|
+ '<path d="M21.454 1.546L1.546 21.454M1.546 1.546L21.454 21.454" stroke-width="3" stroke-linecap="round" />'
|
||||||
'<path d="M21.454 1.546L1.546 21.454M1.546 1.546L21.454 21.454" stroke-width="3" stroke-linecap="round" />' +
|
+ '</svg>';
|
||||||
'</svg>';
|
|
||||||
|
|
||||||
/** *************************************************************************
|
/** *************************************************************************
|
||||||
MailPoet Modal:
|
MailPoet Modal:
|
||||||
@ -85,27 +84,27 @@ define('modal', ['mailpoet', 'jquery'],
|
|||||||
options: {},
|
options: {},
|
||||||
templates: {
|
templates: {
|
||||||
overlay: '<div id="mailpoet_modal_overlay" class="mailpoet_modal_overlay" style="display:none;"></div>',
|
overlay: '<div id="mailpoet_modal_overlay" class="mailpoet_modal_overlay" style="display:none;"></div>',
|
||||||
popup: '<div id="mailpoet_popup" class="mailpoet_popup" tabindex="-1">' +
|
popup: '<div id="mailpoet_popup" class="mailpoet_popup" tabindex="-1">'
|
||||||
'<div class="mailpoet_popup_wrapper">' +
|
+ '<div class="mailpoet_popup_wrapper">'
|
||||||
'<a href="javascript:;" id="mailpoet_modal_close" class="mailpoet_modal_close">' + closeModalImage + '</a>' +
|
+ '<a href="javascript:;" id="mailpoet_modal_close" class="mailpoet_modal_close">' + closeModalImage + '</a>'
|
||||||
'<div id="mailpoet_popup_title" class="mailpoet_popup_title"><h2></h2></div>' +
|
+ '<div id="mailpoet_popup_title" class="mailpoet_popup_title"><h2></h2></div>'
|
||||||
'<div class="mailpoet_popup_body clearfix"></div>' +
|
+ '<div class="mailpoet_popup_body clearfix"></div>'
|
||||||
'</div>' +
|
+ '</div>'
|
||||||
'</div>',
|
+ '</div>',
|
||||||
loading: '<div id="mailpoet_loading" class="mailpoet_loading" style="display:none;">' +
|
loading: '<div id="mailpoet_loading" class="mailpoet_loading" style="display:none;">'
|
||||||
'<div id="mailpoet_modal_loading_1" class="mailpoet_modal_loading mailpoet_modal_loading_1"></div>' +
|
+ '<div id="mailpoet_modal_loading_1" class="mailpoet_modal_loading mailpoet_modal_loading_1"></div>'
|
||||||
'<div id="mailpoet_modal_loading_2" class="mailpoet_modal_loading mailpoet_modal_loading_2"></div>' +
|
+ '<div id="mailpoet_modal_loading_2" class="mailpoet_modal_loading mailpoet_modal_loading_2"></div>'
|
||||||
'<div id="mailpoet_modal_loading_3" class="mailpoet_modal_loading mailpoet_modal_loading_3"></div>' +
|
+ '<div id="mailpoet_modal_loading_3" class="mailpoet_modal_loading mailpoet_modal_loading_3"></div>'
|
||||||
'</div>',
|
+ '</div>',
|
||||||
panel: '<div id="mailpoet_panel" class="mailpoet_panel">' +
|
panel: '<div id="mailpoet_panel" class="mailpoet_panel">'
|
||||||
'<a href="javascript:;" id="mailpoet_modal_close" class="mailpoet_modal_close">' + closeModalImage + '</a>' +
|
+ '<a href="javascript:;" id="mailpoet_modal_close" class="mailpoet_modal_close">' + closeModalImage + '</a>'
|
||||||
'<div class="mailpoet_panel_wrapper" tabindex="-1">' +
|
+ '<div class="mailpoet_panel_wrapper" tabindex="-1">'
|
||||||
'<div class="mailpoet_panel_body clearfix"></div>' +
|
+ '<div class="mailpoet_panel_body clearfix"></div>'
|
||||||
'</div>' +
|
+ '</div>'
|
||||||
'</div>',
|
+ '</div>',
|
||||||
subpanel: '<div class="mailpoet_panel_wrapper" tabindex="-1">' +
|
subpanel: '<div class="mailpoet_panel_wrapper" tabindex="-1">'
|
||||||
'<div class="mailpoet_panel_body clearfix"></div>' +
|
+ '<div class="mailpoet_panel_body clearfix"></div>'
|
||||||
'</div>'
|
+ '</div>'
|
||||||
},
|
},
|
||||||
getContentContainer: function () {
|
getContentContainer: function () {
|
||||||
return jQuery('.mailpoet_' + this.options.type + '_body');
|
return jQuery('.mailpoet_' + this.options.type + '_body');
|
||||||
|
@ -18,7 +18,8 @@ class SenderField extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (<React.Fragment>
|
return (
|
||||||
|
<React.Fragment>
|
||||||
<FormFieldText
|
<FormFieldText
|
||||||
{...this.props}
|
{...this.props}
|
||||||
onValueChange={this.onChange}
|
onValueChange={this.onChange}
|
||||||
@ -26,7 +27,8 @@ class SenderField extends React.Component {
|
|||||||
<div className="regular-text">
|
<div className="regular-text">
|
||||||
<SenderEmailAddressWarning emailAddress={this.state.emailAddress} />
|
<SenderEmailAddressWarning emailAddress={this.state.emailAddress} />
|
||||||
</div>
|
</div>
|
||||||
</React.Fragment>);
|
</React.Fragment>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ class AutomaticEmailEvent extends React.PureComponent {
|
|||||||
className="button button-primary"
|
className="button button-primary"
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
role="button"
|
role="presentation"
|
||||||
data-automation-id={`create_${event.slug}`}
|
data-automation-id={`create_${event.slug}`}
|
||||||
onKeyDown={(keyEvent) => {
|
onKeyDown={(keyEvent) => {
|
||||||
if ((['keydown', 'keypress'].includes(keyEvent.type) && ['Enter', ' '].includes(keyEvent.key))
|
if ((['keydown', 'keypress'].includes(keyEvent.type) && ['Enter', ' '].includes(keyEvent.key))
|
||||||
|
@ -23,7 +23,8 @@ class DefaultSender extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (<React.Fragment>
|
return (
|
||||||
|
<React.Fragment>
|
||||||
<p>
|
<p>
|
||||||
<label htmlFor="settings[from_name]">{MailPoet.I18n.t('from')}</label>
|
<label htmlFor="settings[from_name]">{MailPoet.I18n.t('from')}</label>
|
||||||
<input
|
<input
|
||||||
@ -38,8 +39,8 @@ class DefaultSender extends React.Component {
|
|||||||
<input
|
<input
|
||||||
type="email"
|
type="email"
|
||||||
id="settings[from_email]"
|
id="settings[from_email]"
|
||||||
data-automation-id="settings-page-from-email-field"
|
|
||||||
name="sender[address]"
|
name="sender[address]"
|
||||||
|
data-automation-id="settings-page-from-email-field"
|
||||||
value={this.state.senderAddress}
|
value={this.state.senderAddress}
|
||||||
onChange={partial(this.onChange, 'senderAddress')}
|
onChange={partial(this.onChange, 'senderAddress')}
|
||||||
placeholder="from@mydomain.com"
|
placeholder="from@mydomain.com"
|
||||||
@ -67,7 +68,8 @@ class DefaultSender extends React.Component {
|
|||||||
<div className="regular-text">
|
<div className="regular-text">
|
||||||
<SenderEmailAddressWarning emailAddress={this.state.senderAddress} />
|
<SenderEmailAddressWarning emailAddress={this.state.senderAddress} />
|
||||||
</div>
|
</div>
|
||||||
</React.Fragment>);
|
</React.Fragment>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,7 +46,8 @@ const WelcomeWizardSenderStep = props => (
|
|||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
<label htmlFor="replyToAddress">
|
<label htmlFor="replyToAddress">
|
||||||
{MailPoet.I18n.t('replyToAddress')}:
|
{MailPoet.I18n.t('replyToAddress')}
|
||||||
|
:
|
||||||
<input
|
<input
|
||||||
name="replyToAddress"
|
name="replyToAddress"
|
||||||
type="text"
|
type="text"
|
||||||
|
@ -80,9 +80,9 @@ class WelcomeWizardStepsController extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateReplyTo(data) {
|
updateReplyTo(data) {
|
||||||
this.setState({
|
this.setState(prevState => ({
|
||||||
replyTo: Object.assign({}, this.state.replyTo, data),
|
sender: Object.assign({}, prevState.replyTo, data),
|
||||||
});
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
submitSender() {
|
submitSender() {
|
||||||
|
3215
package-lock.json
generated
3215
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user