Reorder form setting options [MAILPOET-3162]
This commit is contained in:
@@ -24,7 +24,6 @@ const BelowPostsSettings = () => {
|
|||||||
/>
|
/>
|
||||||
{isActive && (
|
{isActive && (
|
||||||
<>
|
<>
|
||||||
<PlacementSettings settingsPlacementKey="belowPosts" />
|
|
||||||
<SizeSettings
|
<SizeSettings
|
||||||
label={MailPoet.I18n.t('formSettingsWidth')}
|
label={MailPoet.I18n.t('formSettingsWidth')}
|
||||||
value={formSettings.formPlacement.belowPosts.styles.width}
|
value={formSettings.formPlacement.belowPosts.styles.width}
|
||||||
@@ -38,6 +37,7 @@ const BelowPostsSettings = () => {
|
|||||||
changeFormSettings(assocPath('formPlacement.belowPosts.styles.width', width, formSettings))
|
changeFormSettings(assocPath('formPlacement.belowPosts.styles.width', width, formSettings))
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
<PlacementSettings settingsPlacementKey="belowPosts" />
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
@@ -29,16 +29,6 @@ const FixedBarSettings = () => {
|
|||||||
{isActive && (
|
{isActive && (
|
||||||
<>
|
<>
|
||||||
<hr />
|
<hr />
|
||||||
<PlacementSettings settingsPlacementKey="fixedBar" />
|
|
||||||
<SelectControl
|
|
||||||
label={MailPoet.I18n.t('formPlacementDelay')}
|
|
||||||
value={formSettings.formPlacement.fixedBar.delay}
|
|
||||||
onChange={compose([changeFormSettings, assocPath('formPlacement.fixedBar.delay', __, formSettings)])}
|
|
||||||
options={delayValues.map((delayValue) => ({
|
|
||||||
value: delayValue,
|
|
||||||
label: MailPoet.I18n.t('formPlacementDelaySeconds').replace('%1s', delayValue),
|
|
||||||
}))}
|
|
||||||
/>
|
|
||||||
<RadioControl
|
<RadioControl
|
||||||
label={MailPoet.I18n.t('formPlacementPlacementPosition')}
|
label={MailPoet.I18n.t('formPlacementPlacementPosition')}
|
||||||
selected={formSettings.formPlacement.fixedBar.position}
|
selected={formSettings.formPlacement.fixedBar.position}
|
||||||
@@ -61,7 +51,17 @@ const FixedBarSettings = () => {
|
|||||||
changeFormSettings(assocPath('formPlacement.fixedBar.styles.width', width, formSettings))
|
changeFormSettings(assocPath('formPlacement.fixedBar.styles.width', width, formSettings))
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
<PlacementSettings settingsPlacementKey="fixedBar" />
|
||||||
<AnimationSettings settingsPlacementKey="fixedBar" />
|
<AnimationSettings settingsPlacementKey="fixedBar" />
|
||||||
|
<SelectControl
|
||||||
|
label={MailPoet.I18n.t('formPlacementDelay')}
|
||||||
|
value={formSettings.formPlacement.fixedBar.delay}
|
||||||
|
onChange={compose([changeFormSettings, assocPath('formPlacement.fixedBar.delay', __, formSettings)])}
|
||||||
|
options={delayValues.map((delayValue) => ({
|
||||||
|
value: delayValue,
|
||||||
|
label: MailPoet.I18n.t('formPlacementDelaySeconds').replace('%1s', delayValue),
|
||||||
|
}))}
|
||||||
|
/>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
@@ -30,7 +30,21 @@ const PopUpSettings = () => {
|
|||||||
{isActive && (
|
{isActive && (
|
||||||
<>
|
<>
|
||||||
<hr />
|
<hr />
|
||||||
|
<SizeSettings
|
||||||
|
label={MailPoet.I18n.t('formSettingsWidth')}
|
||||||
|
value={formSettings.formPlacement.popup.styles.width}
|
||||||
|
minPixels={200}
|
||||||
|
maxPixels={1200}
|
||||||
|
minPercents={10}
|
||||||
|
maxPercents={100}
|
||||||
|
defaultPixelValue={560}
|
||||||
|
defaultPercentValue={100}
|
||||||
|
onChange={(width) => (
|
||||||
|
changeFormSettings(assocPath('formPlacement.popup.styles.width', width, formSettings))
|
||||||
|
)}
|
||||||
|
/>
|
||||||
<PlacementSettings settingsPlacementKey="popup" />
|
<PlacementSettings settingsPlacementKey="popup" />
|
||||||
|
<AnimationSettings settingsPlacementKey="popup" />
|
||||||
<SelectControl
|
<SelectControl
|
||||||
label={MailPoet.I18n.t('formPlacementDelay')}
|
label={MailPoet.I18n.t('formPlacementDelay')}
|
||||||
value={formSettings.formPlacement.popup.delay}
|
value={formSettings.formPlacement.popup.delay}
|
||||||
@@ -49,20 +63,6 @@ const PopUpSettings = () => {
|
|||||||
onChange={compose([changeFormSettings, assocPath('formPlacement.popup.exitIntentEnabled', __, formSettings)])}
|
onChange={compose([changeFormSettings, assocPath('formPlacement.popup.exitIntentEnabled', __, formSettings)])}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<SizeSettings
|
|
||||||
label={MailPoet.I18n.t('formSettingsWidth')}
|
|
||||||
value={formSettings.formPlacement.popup.styles.width}
|
|
||||||
minPixels={200}
|
|
||||||
maxPixels={1200}
|
|
||||||
minPercents={10}
|
|
||||||
maxPercents={100}
|
|
||||||
defaultPixelValue={560}
|
|
||||||
defaultPercentValue={100}
|
|
||||||
onChange={(width) => (
|
|
||||||
changeFormSettings(assocPath('formPlacement.popup.styles.width', width, formSettings))
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
<AnimationSettings settingsPlacementKey="popup" />
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
@@ -29,16 +29,6 @@ const SlideInSettings = () => {
|
|||||||
{isActive && (
|
{isActive && (
|
||||||
<>
|
<>
|
||||||
<hr />
|
<hr />
|
||||||
<PlacementSettings settingsPlacementKey="slideIn" />
|
|
||||||
<SelectControl
|
|
||||||
label={MailPoet.I18n.t('formPlacementDelay')}
|
|
||||||
value={formSettings.formPlacement.slideIn.delay}
|
|
||||||
onChange={compose([changeFormSettings, assocPath('formPlacement.slideIn.delay', __, formSettings)])}
|
|
||||||
options={delayValues.map((delayValue) => ({
|
|
||||||
value: delayValue,
|
|
||||||
label: MailPoet.I18n.t('formPlacementDelaySeconds').replace('%1s', delayValue),
|
|
||||||
}))}
|
|
||||||
/>
|
|
||||||
<RadioControl
|
<RadioControl
|
||||||
label={MailPoet.I18n.t('formPlacementPlacementPosition')}
|
label={MailPoet.I18n.t('formPlacementPlacementPosition')}
|
||||||
selected={formSettings.formPlacement.slideIn.position}
|
selected={formSettings.formPlacement.slideIn.position}
|
||||||
@@ -61,7 +51,17 @@ const SlideInSettings = () => {
|
|||||||
changeFormSettings(assocPath('formPlacement.slideIn.styles.width', width, formSettings))
|
changeFormSettings(assocPath('formPlacement.slideIn.styles.width', width, formSettings))
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
<PlacementSettings settingsPlacementKey="slideIn" />
|
||||||
<AnimationSettings settingsPlacementKey="slideIn" />
|
<AnimationSettings settingsPlacementKey="slideIn" />
|
||||||
|
<SelectControl
|
||||||
|
label={MailPoet.I18n.t('formPlacementDelay')}
|
||||||
|
value={formSettings.formPlacement.slideIn.delay}
|
||||||
|
onChange={compose([changeFormSettings, assocPath('formPlacement.slideIn.delay', __, formSettings)])}
|
||||||
|
options={delayValues.map((delayValue) => ({
|
||||||
|
value: delayValue,
|
||||||
|
label: MailPoet.I18n.t('formPlacementDelaySeconds').replace('%1s', delayValue),
|
||||||
|
}))}
|
||||||
|
/>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
Reference in New Issue
Block a user