Render form styles in twig template correctly

[MAILPOET-3415]
This commit is contained in:
Rostislav Wolny
2021-02-10 17:33:47 +01:00
committed by Veljko V
parent 0d6a068351
commit 6e911ffd1d
2 changed files with 6 additions and 5 deletions

View File

@@ -36,12 +36,9 @@ class Renderer {
public function renderStyles(array $form, string $prefix, string $displayType): string {
$this->customFonts->enqueueStyle();
$html = '<style type="text/css">';
$html .= '.mailpoet_hp_email_label{display:none!important;}'; // move honeypot field out of sight
$html = '.mailpoet_hp_email_label{display:none!important;}'; // move honeypot field out of sight
$html .= $this->styleUtils->prefixStyles($this->getCustomStyles($form), $prefix);
$html .= $this->styleUtils->renderFormSettingsStyles($form, $prefix, $displayType);
$html .= '</style>';
return $html;
}

View File

@@ -36,7 +36,11 @@
src='<%= image_url("form_close_icon/" ~ close_button_icon ~ ".svg") %>'
>
<% endif %>
<%= styles | raw %>
<style type="text/css">
<%= styles %>
</style>
<form
target="_self"
method="post"