Add email content field
[MAILPOET-2678]
This commit is contained in:
committed by
Veljko V
parent
390a8619ff
commit
7755dd6d81
@@ -0,0 +1,35 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { t, onChange } from 'common/functions';
|
||||||
|
import { Label, Inputs } from 'settings/components';
|
||||||
|
import { useSetting } from 'settings/store/hooks';
|
||||||
|
|
||||||
|
export default function EmailContent() {
|
||||||
|
const [enabled] = useSetting('signup_confirmation', 'enabled');
|
||||||
|
const [body, setBody] = useSetting('signup_confirmation', 'body');
|
||||||
|
|
||||||
|
if (!enabled) return null;
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Label
|
||||||
|
title={t('emailContent')}
|
||||||
|
description={t('emailContentDescription').split('<br />').map((line) => (
|
||||||
|
<>
|
||||||
|
{line}
|
||||||
|
<br />
|
||||||
|
</>
|
||||||
|
))}
|
||||||
|
htmlFor="signup_confirmation-body"
|
||||||
|
/>
|
||||||
|
<Inputs>
|
||||||
|
<textarea
|
||||||
|
id="signup_confirmation-body"
|
||||||
|
cols={50}
|
||||||
|
rows={15}
|
||||||
|
data-automation-id="signup_confirmation_email_body"
|
||||||
|
value={body}
|
||||||
|
onChange={onChange(setBody)}
|
||||||
|
/>
|
||||||
|
</Inputs>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
@@ -1,12 +1,14 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import EnableSignupConfirmation from './enable_signup_confirmation';
|
import EnableSignupConfirmation from './enable_signup_confirmation';
|
||||||
import EmailSubject from './email_subject';
|
import EmailSubject from './email_subject';
|
||||||
|
import EmailContent from './email_content';
|
||||||
|
|
||||||
export default function SignupConfirmation() {
|
export default function SignupConfirmation() {
|
||||||
return (
|
return (
|
||||||
<div className="mailpoet-settings-grid">
|
<div className="mailpoet-settings-grid">
|
||||||
<EnableSignupConfirmation />
|
<EnableSignupConfirmation />
|
||||||
<EmailSubject />
|
<EmailSubject />
|
||||||
|
<EmailContent />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user