Remove confirmation sender settings from UI
[MAILPOET-2328]
This commit is contained in:
committed by
Jack Kitterhing
parent
77322a08ce
commit
c51a894f94
@@ -1,7 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
import DefaultSender from 'settings/default_sender.jsx';
|
import DefaultSender from 'settings/default_sender.jsx';
|
||||||
import SignupConfirmationSender from 'settings/signup_confirmation_sender.jsx';
|
|
||||||
|
|
||||||
const settingsSenderContainer = document.getElementById('settings_sender_container');
|
const settingsSenderContainer = document.getElementById('settings_sender_container');
|
||||||
|
|
||||||
@@ -17,16 +16,3 @@ if (settingsSenderContainer) {
|
|||||||
settingsSenderContainer
|
settingsSenderContainer
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const settingsSignupConfirmationSenderContainer = document.getElementById('settings_signup_confirmation_sender_container');
|
|
||||||
|
|
||||||
if (settingsSignupConfirmationSenderContainer) {
|
|
||||||
ReactDOM.render(
|
|
||||||
React.createElement(SignupConfirmationSender, {
|
|
||||||
senderAddress: window.mailpoet_settings_signup_confirmation_address,
|
|
||||||
senderName: window.mailpoet_settings_signup_confirmation_name,
|
|
||||||
mssActive: window.mailpoet_mss_active,
|
|
||||||
}),
|
|
||||||
settingsSignupConfirmationSenderContainer
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
@@ -1,69 +0,0 @@
|
|||||||
import React from 'react';
|
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import { partial } from 'underscore';
|
|
||||||
import MailPoet from 'mailpoet';
|
|
||||||
import SenderEmailAddressWarning from 'common/sender_email_address_warning.jsx';
|
|
||||||
|
|
||||||
class SignupConfirmationSender extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
this.state = {
|
|
||||||
senderAddress: props.senderAddress,
|
|
||||||
senderName: props.senderName,
|
|
||||||
};
|
|
||||||
this.onChange = this.onChange.bind(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
onChange(field, e) {
|
|
||||||
const newState = {};
|
|
||||||
newState[field] = e.target.value;
|
|
||||||
this.setState(newState);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<th scope="row">
|
|
||||||
<label htmlFor="settings[signup_confirmation_from_name]">{MailPoet.I18n.t('from')}</label>
|
|
||||||
</th>
|
|
||||||
<td>
|
|
||||||
<p>
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
id="settings[signup_confirmation_from_name]"
|
|
||||||
name="signup_confirmation[from][name]"
|
|
||||||
data-automation-id="signup_confirmation_email_from_name"
|
|
||||||
value={this.state.senderName}
|
|
||||||
onChange={partial(this.onChange, 'senderName')}
|
|
||||||
placeholder={MailPoet.I18n.t('yourName')}
|
|
||||||
/>
|
|
||||||
<input
|
|
||||||
type="email"
|
|
||||||
id="settings[signup_confirmation_from_email]"
|
|
||||||
name="signup_confirmation[from][address]"
|
|
||||||
data-automation-id="signup_confirmation_email_from_email"
|
|
||||||
value={this.state.senderAddress}
|
|
||||||
onChange={partial(this.onChange, 'senderAddress')}
|
|
||||||
placeholder="confirmation@mydomain.com"
|
|
||||||
size="28"
|
|
||||||
/>
|
|
||||||
</p>
|
|
||||||
<div className="regular-text">
|
|
||||||
<SenderEmailAddressWarning
|
|
||||||
emailAddress={this.state.senderAddress}
|
|
||||||
mssActive={this.props.mssActive}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SignupConfirmationSender.propTypes = {
|
|
||||||
senderAddress: PropTypes.string.isRequired,
|
|
||||||
senderName: PropTypes.string.isRequired,
|
|
||||||
mssActive: PropTypes.bool.isRequired,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default SignupConfirmationSender;
|
|
@@ -54,34 +54,6 @@
|
|||||||
</table>
|
</table>
|
||||||
<table id="mailpoet_signup_options" class="form-table">
|
<table id="mailpoet_signup_options" class="form-table">
|
||||||
<tbody>
|
<tbody>
|
||||||
<!-- sign-up confirmation: from name & email -->
|
|
||||||
<tr id="settings_signup_confirmation_sender_container"></tr>
|
|
||||||
<!-- sign-up confirmation: reply_to name & email -->
|
|
||||||
<tr>
|
|
||||||
<th scope="row">
|
|
||||||
<label for="settings[signup_confirmation_reply_name]">
|
|
||||||
<%= __('Reply-to') %>
|
|
||||||
</label>
|
|
||||||
</th>
|
|
||||||
<td>
|
|
||||||
<p>
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
id="settings[signup_confirmation_reply_name]"
|
|
||||||
name="signup_confirmation[reply_to][name]"
|
|
||||||
value="<%= settings.signup_confirmation.reply_to.name %>"
|
|
||||||
placeholder="<%= __('Your name') %>"
|
|
||||||
/>
|
|
||||||
<input type="email"
|
|
||||||
id="settings[signup_confirmation_reply_email]"
|
|
||||||
name="signup_confirmation[reply_to][address]"
|
|
||||||
value="<%= settings.signup_confirmation.reply_to.address %>"
|
|
||||||
placeholder="confirmation@mydomain.com"
|
|
||||||
size="28"
|
|
||||||
/>
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<!-- confirmation email: title -->
|
<!-- confirmation email: title -->
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">
|
<th scope="row">
|
||||||
|
Reference in New Issue
Block a user