Add settings for re-engagement page

[MAILPOET-3856]
This commit is contained in:
Pavel Dohnal
2021-10-22 11:35:52 +02:00
committed by Veljko V
parent 04052d7d9c
commit 49e98ea88e
6 changed files with 36 additions and 1 deletions

View File

@@ -9,7 +9,7 @@ type Props = {
automationId?: string;
linkAutomationId?: string;
setValue: (x: string) => void;
preview: 'manage' | 'unsubscribe' | 'confirm' | 'confirm_unsubscribe';
preview: 'manage' | 'unsubscribe' | 'confirm' | 'confirm_unsubscribe' | 're_engagement';
}
export default (props: Props) => {

View File

@@ -9,6 +9,7 @@ import StatsNotifications from './stats_notifications';
import NewSubscriberNotifications from './new_subscriber_notifications';
import Shortcode from './shortcode';
import GdprCompliant from './gdpr_compliant';
import { ReEngagementPage } from './re_engagement_page';
export default function Basics() {
return (
@@ -26,6 +27,7 @@ export default function Basics() {
/>
<ManageSubscription />
<UnsubscribePage />
<ReEngagementPage />
<StatsNotifications />
<NewSubscriberNotifications />
<Shortcode

View File

@@ -0,0 +1,26 @@
import React from 'react';
import { t } from 'common/functions';
import { useSetting } from 'settings/store/hooks';
import { Label, Inputs, PagesSelect } from 'settings/components';
export function ReEngagementPage(): JSX.Element {
const [reEngagementPage, setReEngagementPage] = useSetting('reEngagement', 'page');
return (
<>
<Label
title={t('reEngagementTitle')}
description={t('reEngagementDescription')}
htmlFor="re-engagement-page"
/>
<Inputs>
<PagesSelect
value={reEngagementPage}
preview="re_engagement"
setValue={setReEngagementPage}
id="re-engagement-page"
/>
</Inputs>
</>
);
}

View File

@@ -22,6 +22,9 @@ export type Settings = {
segments: string[];
};
};
reEngagement: {
page: string;
};
subscription: {
pages: {
manage: string;

View File

@@ -108,6 +108,7 @@ class Pages {
'manage' => $subscriptionUrlFactory->getSubscriptionUrl($page, 'manage'),
'confirm' => $subscriptionUrlFactory->getSubscriptionUrl($page, 'confirm'),
'confirm_unsubscribe' => $subscriptionUrlFactory->getSubscriptionUrl($page, 'confirm_unsubscribe'),
're_engagement' => $subscriptionUrlFactory->getSubscriptionUrl($page, 're_engagement'),
],
];
}

View File

@@ -65,6 +65,9 @@
'subscribersCanChooseFrom': __('Subscribers can choose from these lists:'),
'leaveEmptyToDisplayAll': __('Leave this field empty to display all lists'),
'reEngagementTitle': __('Re-engagement page'),
'reEngagementDescription': __('Thank your subscribers reactivated by the Re-engagement email for their continued interest in your emails.'),
'unsubscribeTitle': __('Unsubscribe page'),
'unsubscribeDescription1': __('When your subscribers click the "Unsubscribe" link, they will be directed to a confirmation page. After confirming, the success page will be shown. These pages must contain the [mailpoet_page] shortcode.'),
'unsubscribeDescription2': _x('[link]Learn more about customizing these pages.[/link]', 'Unsubscribe pages customization link'),