Rename sidebar form type to others
[MAILPOET-2743]
This commit is contained in:
committed by
Veljko V
parent
cd0b9d49c5
commit
d81c0d490b
@@ -79,7 +79,7 @@ const FormPreview = () => {
|
|||||||
value={previewSettings.formType}
|
value={previewSettings.formType}
|
||||||
data-automation-id="form_type_selection"
|
data-automation-id="form_type_selection"
|
||||||
>
|
>
|
||||||
<option value="sidebar">{MailPoet.I18n.t('placeFormSidebar')}</option>
|
<option value="others">{MailPoet.I18n.t('placeFormOthers')}</option>
|
||||||
<option value="below_post">{MailPoet.I18n.t('placeFormBellowPages')}</option>
|
<option value="below_post">{MailPoet.I18n.t('placeFormBellowPages')}</option>
|
||||||
<option value="fixed_bar">{MailPoet.I18n.t('placeFixedBarFormOnPages')}</option>
|
<option value="fixed_bar">{MailPoet.I18n.t('placeFixedBarFormOnPages')}</option>
|
||||||
<option value="popup">{MailPoet.I18n.t('placePopupFormOnPages')}</option>
|
<option value="popup">{MailPoet.I18n.t('placePopupFormOnPages')}</option>
|
||||||
@@ -102,11 +102,11 @@ const FormPreview = () => {
|
|||||||
title={MailPoet.I18n.t('formPreview')}
|
title={MailPoet.I18n.t('formPreview')}
|
||||||
onLoad={() => setIframeLoaded(true)}
|
onLoad={() => setIframeLoaded(true)}
|
||||||
data-automation-id="form_preview_iframe"
|
data-automation-id="form_preview_iframe"
|
||||||
scrolling={previewSettings.formType === 'sidebar' ? 'no' : 'yes'}
|
scrolling={previewSettings.formType === 'others' ? 'no' : 'yes'}
|
||||||
/>
|
/>
|
||||||
{previewSettings.formType === 'sidebar' && previewSettings.displayType === 'desktop' && (
|
{previewSettings.formType === 'others' && previewSettings.displayType === 'desktop' && (
|
||||||
<div className="mailpoet_form_preview_disclaimer">
|
<div className="mailpoet_form_preview_disclaimer">
|
||||||
{MailPoet.I18n.t('formPreviewSidebarDisclaimer')}
|
{MailPoet.I18n.t('formPreviewOthersDisclaimer')}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</Preview>
|
</Preview>
|
||||||
|
@@ -60,7 +60,7 @@ export default {
|
|||||||
// Otherwise create one based on settings
|
// Otherwise create one based on settings
|
||||||
const previewSettings = {
|
const previewSettings = {
|
||||||
displayType: 'desktop',
|
displayType: 'desktop',
|
||||||
formType: 'sidebar',
|
formType: 'others',
|
||||||
};
|
};
|
||||||
const settings = state.formData.settings;
|
const settings = state.formData.settings;
|
||||||
if (settings.placeFormBellowAllPages || settings.placeFormBellowAllPosts) {
|
if (settings.placeFormBellowAllPages || settings.placeFormBellowAllPosts) {
|
||||||
|
@@ -88,8 +88,8 @@ class PreviewPage {
|
|||||||
'styles' => $this->formRenderer->renderStyles($formData, '#' . $htmlId),
|
'styles' => $this->formRenderer->renderStyles($formData, '#' . $htmlId),
|
||||||
'html' => $this->formRenderer->renderHTML($formData),
|
'html' => $this->formRenderer->renderHTML($formData),
|
||||||
'form_element_styles' => $this->formRenderer->renderFormElementStyles($formData),
|
'form_element_styles' => $this->formRenderer->renderFormElementStyles($formData),
|
||||||
'success' => $formType === 'sidebar',
|
'success' => $formType === 'others',
|
||||||
'error' => $formType === 'sidebar',
|
'error' => $formType === 'others',
|
||||||
'delay' => 1,
|
'delay' => 1,
|
||||||
'position' => $formData['settings'][$formType . '_form_position'] ?? '',
|
'position' => $formData['settings'][$formType . '_form_position'] ?? '',
|
||||||
'backgroundColor' => $formData['settings']['backgroundColor'] ?? '',
|
'backgroundColor' => $formData['settings']['backgroundColor'] ?? '',
|
||||||
|
@@ -71,7 +71,7 @@
|
|||||||
'placeFormBellowPagesDescription': __('This form placement allows you to add this form at the end of all the pages or posts, below the content.'),
|
'placeFormBellowPagesDescription': __('This form placement allows you to add this form at the end of all the pages or posts, below the content.'),
|
||||||
'placeFormBellowAllPages': _x('Display on all pages', 'This is a text on a switch if a form should be displayed bellow all pages'),
|
'placeFormBellowAllPages': _x('Display on all pages', 'This is a text on a switch if a form should be displayed bellow all pages'),
|
||||||
'placeFormBellowAllPosts': _x('Display on all posts', 'This is a text on a switch if a form should be displayed bellow all posts'),
|
'placeFormBellowAllPosts': _x('Display on all posts', 'This is a text on a switch if a form should be displayed bellow all posts'),
|
||||||
'placeFormSidebar': _x('Sidebar (theme widget)', 'Placement of the form using theme widget'),
|
'placeFormOthers': _x('Others (widget)', 'Placement of the form using theme widget'),
|
||||||
'formPlacementDelay': _x('Display with a delay of', 'Label on a selection of different times'),
|
'formPlacementDelay': _x('Display with a delay of', 'Label on a selection of different times'),
|
||||||
'formPlacementPlacementPosition': _x('Position', 'Placement of a fixed bar form, on top of the page or on the bottom'),
|
'formPlacementPlacementPosition': _x('Position', 'Placement of a fixed bar form, on top of the page or on the bottom'),
|
||||||
'formPlacementPlacementPositionTop': _x('top', 'Placement of a fixed bar form, on top of the page or on the bottom'),
|
'formPlacementPlacementPositionTop': _x('top', 'Placement of a fixed bar form, on top of the page or on the bottom'),
|
||||||
@@ -155,7 +155,7 @@
|
|||||||
'formPreview': __('Form Preview'),
|
'formPreview': __('Form Preview'),
|
||||||
'formPreviewDesktop': _x('Desktop', 'Desktop browser preview mode'),
|
'formPreviewDesktop': _x('Desktop', 'Desktop browser preview mode'),
|
||||||
'formPreviewMobile': _x('Mobile', 'Mobile browser preview mode'),
|
'formPreviewMobile': _x('Mobile', 'Mobile browser preview mode'),
|
||||||
'formPreviewSidebarDisclaimer': __('Psssst. We try our best to show you what the widget might look like, but better check the final result on your website.'),
|
'formPreviewOthersDisclaimer': __('Psssst. We try our best to show you what the widget might look like, but better check the final result on your website.'),
|
||||||
'noName': _x('no name', 'fallback for forms without a name in a form list'),
|
'noName': _x('no name', 'fallback for forms without a name in a form list'),
|
||||||
}) %>
|
}) %>
|
||||||
<% endblock %>
|
<% endblock %>
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<% block content %>
|
<% block content %>
|
||||||
<% if(formType == 'sidebar') %>
|
<% if(formType == 'others') %>
|
||||||
<div id="mailpoet_widget_preview" class="mailpoet_widget_preview">
|
<div id="mailpoet_widget_preview" class="mailpoet_widget_preview">
|
||||||
<div id="sidebar" class="sidebar widget-area si-sidebar-container">
|
<div id="sidebar" class="sidebar widget-area si-sidebar-container">
|
||||||
<div class="widget si-widget">
|
<div class="widget si-widget">
|
||||||
|
Reference in New Issue
Block a user