Add transactional emails field

[MAILPOET-2680]
This commit is contained in:
Amine Ben hammou
2020-03-20 01:21:24 +01:00
committed by Veljko V
parent 1c596e2e73
commit 83459261fd
2 changed files with 57 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ import BounceAddress from './bounce_address';
import TaskScheduler from './task_scheduler'; import TaskScheduler from './task_scheduler';
import Roles from './roles'; import Roles from './roles';
import Tracking from './tracking'; import Tracking from './tracking';
import Transactional from './transactional';
export default function Advanced() { export default function Advanced() {
return ( return (
@@ -11,6 +12,7 @@ export default function Advanced() {
<TaskScheduler /> <TaskScheduler />
<Roles /> <Roles />
<Tracking /> <Tracking />
<Transactional />
</div> </div>
); );
} }

View File

@@ -0,0 +1,55 @@
import React from 'react';
import { t, onChange } from 'common/functions';
import { useSetting } from 'settings/store/hooks';
import { Label, Inputs } from 'settings/components';
export default function Transactional() {
const [enabled, setEnabled] = useSetting('send_transactional_emails');
return (
<>
<Label
title={t('transactionalTitle')}
description={(
<>
{t('transactionalDescription')}
{' '}
<a
href="https://kb.mailpoet.com/article/292-choose-how-to-send-your-wordpress-websites-emails"
data-beacon-article="5ddbf92504286364bc9228c5"
rel="noopener noreferrer"
target="_blank"
>
{t('transactionalLink')}
</a>
</>
)}
htmlFor=""
/>
<Inputs>
<input
type="radio"
id="transactional-enabled"
value="1"
checked={enabled === '1'}
onChange={onChange(setEnabled)}
/>
<label htmlFor="transactional-enabled">
{t('transactionalCurrentMethod')}
</label>
<br />
<input
type="radio"
id="transactional-disabled"
value=""
checked={enabled === ''}
onChange={onChange(setEnabled)}
/>
<label htmlFor="transactional-disabled">
{t('transactionalWP')}
</label>
</Inputs>
</>
);
}