Add tracking field
[MAILPOET-2680]
This commit is contained in:
committed by
Veljko V
parent
e66b0c7f9a
commit
1c596e2e73
@@ -2,6 +2,7 @@ import React from 'react';
|
|||||||
import BounceAddress from './bounce_address';
|
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';
|
||||||
|
|
||||||
export default function Advanced() {
|
export default function Advanced() {
|
||||||
return (
|
return (
|
||||||
@@ -9,6 +10,7 @@ export default function Advanced() {
|
|||||||
<BounceAddress />
|
<BounceAddress />
|
||||||
<TaskScheduler />
|
<TaskScheduler />
|
||||||
<Roles />
|
<Roles />
|
||||||
|
<Tracking />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
42
assets/js/src/settings/pages/advanced/tracking.tsx
Normal file
42
assets/js/src/settings/pages/advanced/tracking.tsx
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
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 Tracking() {
|
||||||
|
const [enabled, setEnabled] = useSetting('tracking', 'enabled');
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Label
|
||||||
|
title={t('trackingTitle')}
|
||||||
|
description={t('trackingDescription')}
|
||||||
|
htmlFor=""
|
||||||
|
/>
|
||||||
|
<Inputs>
|
||||||
|
<input
|
||||||
|
type="radio"
|
||||||
|
id="tracking-enabled"
|
||||||
|
value="1"
|
||||||
|
checked={enabled === '1'}
|
||||||
|
onChange={onChange(setEnabled)}
|
||||||
|
/>
|
||||||
|
<label htmlFor="tracking-enabled">
|
||||||
|
{t('yes')}
|
||||||
|
</label>
|
||||||
|
{' '}
|
||||||
|
<input
|
||||||
|
type="radio"
|
||||||
|
id="tracking-disabled"
|
||||||
|
value=""
|
||||||
|
checked={enabled === ''}
|
||||||
|
onChange={onChange(setEnabled)}
|
||||||
|
/>
|
||||||
|
<label htmlFor="tracking-disabled">
|
||||||
|
{t('no')}
|
||||||
|
</label>
|
||||||
|
</Inputs>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
Reference in New Issue
Block a user