Remove shortcode section

[MAILPOET-2639]
This commit is contained in:
Pavel Dohnal
2020-01-28 13:11:55 +01:00
committed by Jack Kitterhing
parent dce8d12942
commit 5baf21a644

View File

@@ -40,10 +40,7 @@ const FormPlacementPanel = ({ onToggle, isOpened }) => {
if (type === 'php') {
return setCopyAreaContent(formExports.php);
}
if (type === 'iframe') {
return setCopyAreaContent(formExports.iframe);
}
return setCopyAreaContent(formExports.shortcode);
});
const addFormWidgetHint = ReactStringReplace(
@@ -54,21 +51,6 @@ const FormPlacementPanel = ({ onToggle, isOpened }) => {
)
);
const addFormShortcodeHint = ReactStringReplace(
MailPoet.I18n.t('addFormShortcodeHint'),
/(\[link].*\[\/link])|(\[shortcode])/g,
(match) => {
if (match === '[shortcode]') {
return (<code key={match}>{formExports.shortcode}</code>);
}
if (typeof match === 'string' && match.includes('[link]')) {
const link = match.replace(/\[.?link]/g, '');
return (<a key={match} href="TODO KB link" target="_blank">{link}</a>);
}
return match;
}
);
const addFormPhpIframeHint = ReactStringReplace(
MailPoet.I18n.t('addFormPhpIframeHint'),
/\[link](.*?)\[\/link]/g,
@@ -106,7 +88,6 @@ const FormPlacementPanel = ({ onToggle, isOpened }) => {
checked={placeFormBellowAllPosts}
onChange={setPlaceFormBellowAllPosts}
/>
<p>{addFormShortcodeHint}</p>
<p>{addFormWidgetHint}</p>
<p>{addFormPhpIframeHint}</p>
{getCopyTextArea()}