import React from 'react'; import Typography from '@material-ui/core/Typography'; import Grid from '@material-ui/core/Grid'; import MailerSelect from './Forms/MailerSelect'; import CustomSMTP from './Forms/CustomSMTP'; import Mailgun from './Forms/Mailgun'; import SMTPCom from './Forms/SMTPCom'; import Sendinblue from './Forms/Sendinblue'; import Postmark from './Forms/Postmark'; import Checkbox from './Misc/Checkbox'; import BootstrapInput from './Misc/BootstrapInput' import Button from '@material-ui/core/Button'; // import PortStatus from './Misc/PortStatus'; const { __ } = wp.i18n; const SettingsPage = props => { const [provider, setProvider] = React.useState(props.settings.smtp_provider) const [emailLog, setEmailLog] = React.useState( props.settings.email_log === '1' ? true : false ) const [returnPath, setReturnPath] = React.useState(props.settings.return_path || '') /** * On initial load - move the setting fields here */ React.useEffect(() => { let settingsField = document.getElementById('kali-settings-fields'); document.getElementById('kali-email-form').appendChild(settingsField) return () => { document.getElementById('wpwrap').appendChild(settingsField) } }, []) return ( {__('General Settings', 'kaliforms')}
{__('Send emails using', 'kaliforms')} {__('Select the method or service for sending out your form emails.', 'kaliforms')} setEmailLog(evt.target.checked)} /> {__('Record each attempt to send out an email notification, this will help you resolve any potential errors with the email sending functionality or provide a confirmation that an email has been sent.', 'kaliforms')} setReturnPath(evt.target.value)} autoComplete={'off'} /> {__('When an email fails to be delivered, a notification will be received at this email in the form of a non-delivery receipt or bounce message. If you do not set an email in this field then bounce emails may be lost.', 'kaliforms')} {/* */}
); } export default SettingsPage;