Remove list management from settings page

MAILPOET-4669
This commit is contained in:
Oluwaseun Olorunsola
2022-11-02 13:28:16 +01:00
committed by Aschepikov
parent e64dc1669f
commit 07cf0cd79b
2 changed files with 20 additions and 15 deletions

View File

@@ -1,11 +1,10 @@
import ReactStringReplace from 'react-string-replace';
import { t } from 'common/functions';
import { useSetting } from 'settings/store/hooks';
import { Inputs, Label, PageSelect, SegmentsSelect } from 'settings/components';
import { Inputs, Label, PageSelect } from 'settings/components';
export function ManageSubscription() {
const [page, setPage] = useSetting('subscription', 'pages', 'manage');
const [segments, setSegments] = useSetting('subscription', 'segments');
return (
<>
<Label
@@ -42,18 +41,24 @@ export function ManageSubscription() {
automationId="subscription-manage-page-selection"
linkAutomationId="preview_manage_subscription_page_link"
/>
<label
className="mailpoet-settings-inputs-row"
htmlFor="subscription-segments"
>
{t('subscribersCanChooseFrom')}
</label>
<SegmentsSelect
id="subscription-segments"
value={segments}
setValue={setSegments}
placeholder={t('leaveEmptyToDisplayAll')}
/>
<p>
{ReactStringReplace(
t('hideListFromManageSubPage'),
/\[link\](.*?)\[\/link\]/,
(text) => (
<a
className="mailpoet-link"
key={text}
href="/wp-admin/admin.php?page=mailpoet-segments#/lists"
rel="noopener noreferrer"
target="_blank"
>
{text}
</a>
),
)}
</p>
</Inputs>
</>
);

View File

@@ -61,8 +61,8 @@
'manageSubDescription2': __('Want to use a custom Subscription page? Check out our [link]Knowledge Base[/link] for instructions.'),
'previewPage': __('Preview page'),
'preview': __('Preview'),
'subscribersCanChooseFrom': __('Subscribers can choose from these lists:'),
'leaveEmptyToDisplayAll': __('Leave this field empty to display all lists'),
'hideListFromManageSubPage': __('To hide a list from the Manage Subscription page, go to [link]Lists[/link] and edit the one you want to hide'),
'reEngagementTitle': __('Re-engagement page'),
'reEngagementDescription': __('Thank your subscribers reactivated by the Re-engagement email for their continued interest in your emails.'),