Add different rendering for sidebar widget preview type

[MAILPOET-2743]
This commit is contained in:
Rostislav Wolny
2020-04-16 09:31:35 +02:00
committed by Veljko V
parent e7b4ab1dfe
commit 4cb7ba2424
5 changed files with 75 additions and 1 deletions

View File

@@ -44,7 +44,14 @@ class PreviewPage {
if (!is_array($formData)) {
return '';
}
return $this->getPostContent() . $this->getFormContent($formData, $formId, $formType);
return $this->templateRenderer->render(
'form/form_preview.html',
[
'post' => $this->getPostContent(),
'form' => $this->getFormContent($formData, $formId, $formType),
'formType' => $formType,
]
);
}
public function renderTitle() {