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 PreviousNextStepButtons from './previous_next_step_buttons.jsx';
|
||||||
import SelectMethod from './step_method_selection/select_import_method.jsx';
|
import SelectMethod from './step_method_selection/select_import_method.jsx';
|
||||||
|
|
||||||
|
|
||||||
function StepMethodSelection({
|
function StepMethodSelection({
|
||||||
navigate,
|
navigate,
|
||||||
isNewUser
|
|
||||||
}) {
|
}) {
|
||||||
const canGoNext = false;
|
const canGoNext = false;
|
||||||
const [method, setMethod] = useState(undefined);
|
const [method, setMethod] = useState(undefined);
|
||||||
@@ -28,7 +26,6 @@ function StepMethodSelection({
|
|||||||
<>
|
<>
|
||||||
<SelectMethod
|
<SelectMethod
|
||||||
activeMethod={method}
|
activeMethod={method}
|
||||||
isNewUser={isNewUser}
|
|
||||||
onMethodChange={setMethod}
|
onMethodChange={setMethod}
|
||||||
/>
|
/>
|
||||||
{showNextButton()}
|
{showNextButton()}
|
||||||
|
@@ -18,6 +18,8 @@ function SelectImportMethod({
|
|||||||
name="select_method"
|
name="select_method"
|
||||||
data-automation-id="import-paste-method"
|
data-automation-id="import-paste-method"
|
||||||
id="import-paste-method"
|
id="import-paste-method"
|
||||||
|
checked={activeMethod === 'import-paste-method'}
|
||||||
|
onChange={() => onMethodChange('import-paste-method')}
|
||||||
/>
|
/>
|
||||||
{MailPoet.I18n.t('methodPaste')}
|
{MailPoet.I18n.t('methodPaste')}
|
||||||
</label>
|
</label>
|
||||||
@@ -27,6 +29,8 @@ function SelectImportMethod({
|
|||||||
name="select_method"
|
name="select_method"
|
||||||
data-automation-id="import-csv-method"
|
data-automation-id="import-csv-method"
|
||||||
id="import-csv-method"
|
id="import-csv-method"
|
||||||
|
checked={activeMethod === 'import-csv-method'}
|
||||||
|
onChange={() => onMethodChange('import-csv-method')}
|
||||||
/>
|
/>
|
||||||
{MailPoet.I18n.t('methodUpload')}
|
{MailPoet.I18n.t('methodUpload')}
|
||||||
</label>
|
</label>
|
||||||
@@ -36,6 +40,8 @@ function SelectImportMethod({
|
|||||||
name="select_method"
|
name="select_method"
|
||||||
data-automation-id="import-mailchimp-method"
|
data-automation-id="import-mailchimp-method"
|
||||||
id="import-mailchimp-method"
|
id="import-mailchimp-method"
|
||||||
|
checked={activeMethod === 'import-mailchimp-method'}
|
||||||
|
onChange={() => onMethodChange('import-mailchimp-method')}
|
||||||
/>
|
/>
|
||||||
{MailPoet.I18n.t('methodMailChimp')}
|
{MailPoet.I18n.t('methodMailChimp')}
|
||||||
</label>
|
</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">
|
<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 -->
|
<!-- Paste -->
|
||||||
<div id="method_paste" class="mailpoet_hidden">
|
<div id="method_paste" class="mailpoet_hidden">
|
||||||
<table class="mailpoet_subscribers form-table">
|
<table class="mailpoet_subscribers form-table">
|
||||||
@@ -87,20 +79,5 @@
|
|||||||
<!-- Template data -->
|
<!-- Template data -->
|
||||||
</div>
|
</div>
|
||||||
</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>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user