Connect method selcetion component
[MAILPOET-1808]
This commit is contained in:
@@ -3,10 +3,8 @@ import PropTypes from 'prop-types';
|
||||
import PreviousNextStepButtons from './previous_next_step_buttons.jsx';
|
||||
import SelectMethod from './step_method_selection/select_import_method.jsx';
|
||||
|
||||
|
||||
function StepMethodSelection({
|
||||
navigate,
|
||||
isNewUser
|
||||
}) {
|
||||
const canGoNext = false;
|
||||
const [method, setMethod] = useState(undefined);
|
||||
@@ -28,7 +26,6 @@ function StepMethodSelection({
|
||||
<>
|
||||
<SelectMethod
|
||||
activeMethod={method}
|
||||
isNewUser={isNewUser}
|
||||
onMethodChange={setMethod}
|
||||
/>
|
||||
{showNextButton()}
|
||||
|
@@ -18,6 +18,8 @@ function SelectImportMethod({
|
||||
name="select_method"
|
||||
data-automation-id="import-paste-method"
|
||||
id="import-paste-method"
|
||||
checked={activeMethod === 'import-paste-method'}
|
||||
onChange={() => onMethodChange('import-paste-method')}
|
||||
/>
|
||||
{MailPoet.I18n.t('methodPaste')}
|
||||
</label>
|
||||
@@ -27,6 +29,8 @@ function SelectImportMethod({
|
||||
name="select_method"
|
||||
data-automation-id="import-csv-method"
|
||||
id="import-csv-method"
|
||||
checked={activeMethod === 'import-csv-method'}
|
||||
onChange={() => onMethodChange('import-csv-method')}
|
||||
/>
|
||||
{MailPoet.I18n.t('methodUpload')}
|
||||
</label>
|
||||
@@ -36,6 +40,8 @@ function SelectImportMethod({
|
||||
name="select_method"
|
||||
data-automation-id="import-mailchimp-method"
|
||||
id="import-mailchimp-method"
|
||||
checked={activeMethod === 'import-mailchimp-method'}
|
||||
onChange={() => onMethodChange('import-mailchimp-method')}
|
||||
/>
|
||||
{MailPoet.I18n.t('methodMailChimp')}
|
||||
</label>
|
||||
|
@@ -1,13 +1,5 @@
|
||||
<div id="step_method_selection" class="mailpoet_hidden">
|
||||
<div id="step_method_selection" class="mailpoet_hidden method_selection_step">
|
||||
<div class="inside">
|
||||
<!-- Method selection -->
|
||||
|
||||
|
||||
<% set badgeClassName = (is_new_user == true) ? 'mailpoet_badge mailpoet_badge_video' : 'mailpoet_badge mailpoet_badge_video mailpoet_badge_video_grey' %>
|
||||
<a class="<%= badgeClassName %>" href="https://beta.docs.mailpoet.com/article/242-video-guide-importing-subscribers-using-a-csv-file" target="_blank">
|
||||
<span class="dashicons dashicons-format-video"></span><%= __('See video guide') %>
|
||||
</a>
|
||||
|
||||
<!-- Paste -->
|
||||
<div id="method_paste" class="mailpoet_hidden">
|
||||
<table class="mailpoet_subscribers form-table">
|
||||
@@ -87,20 +79,5 @@
|
||||
<!-- Template data -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Next button -->
|
||||
<script id="method_process_template" type="text/x-handlebars-template">
|
||||
<table class="mailpoet_subscribers form-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<a href="javascript:;"
|
||||
data-automation-id="import-next-step"
|
||||
class="button-primary button-disabled wysija mailpoet_process"><%= __('Next step') %> </a>
|
||||
</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user