<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @FactorySupport/newsletter/index.html.twig */
class __TwigTemplate_2a03caaf1472b1db5549d96d6ee50943 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'contentBlock' => [$this, 'block_contentBlock'],
];
$this->sandbox = $this->env->getExtension(SandboxExtension::class);
$this->checkSecurity();
}
protected function doGetParent(array $context)
{
// line 1
return "layout/default.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_b91a4435ea3baf1e2b6bfda56133dace = $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
$__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@FactorySupport/newsletter/index.html.twig"));
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@FactorySupport/newsletter/index.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@FactorySupport/newsletter/index.html.twig"));
$this->parent = $this->loadTemplate("layout/default.html.twig", "@FactorySupport/newsletter/index.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
public function block_contentBlock($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_b91a4435ea3baf1e2b6bfda56133dace = $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
$__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "contentBlock"));
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "contentBlock"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "contentBlock"));
// line 4
yield " <script src=\"https://www.google.com/recaptcha/api.js?render=";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed((isset($context["recaptcha_v3_site_key"]) || array_key_exists("recaptcha_v3_site_key", $context) ? $context["recaptcha_v3_site_key"] : (function () { throw new RuntimeError('Variable "recaptcha_v3_site_key" does not exist.', 4, $this->source); })()), 4, $this->source), "html", null, true);
yield "\"></script>
<main class=\"staticPage\">
<div class=\"container my-5 my-lg-5 my-md-5\">
";
// line 8
yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock($this->sandbox->ensureToStringAllowed((isset($context["newsletterForm"]) || array_key_exists("newsletterForm", $context) ? $context["newsletterForm"] : (function () { throw new RuntimeError('Variable "newsletterForm" does not exist.', 8, $this->source); })()), 8, $this->source), 'form_start', ["attr" => ["novalidate" => "novalidate", "id" => "newsletter-form-type"]]);
yield "
<div class=\"row\">
<div class=\"col-lg-4 col-md-6 col-sm-9 offset-sm-1 offset-md-0 offset-lg-1\">
<div class=\"d-flex flex-column\">
<h1 class=\"font-weight-bold mb-4 mb-lg-4 mb-md-4 font-italic\">";
// line 12
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("newsletter.heading"), "html", null, true);
yield "</h1>
<h4 class=\"font-weight-bold mb-4 mb-lg-4 mb-md-4\">";
// line 13
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("newsletter.sub.heading"), "html", null, true);
yield "</h4>
</div>
<div class=\"d-flex flex-column mb-3 mb-lg-3 mb-md-3 ";
// line 16
yield (($this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["newsletterForm"]) || array_key_exists("newsletterForm", $context) ? $context["newsletterForm"] : (function () { throw new RuntimeError('Variable "newsletterForm" does not exist.', 16, $this->source); })()), "Email", [], "any", false, false, true, 16), 16, $this->source), 'errors')) ? ("input-error") : (""));
yield "\">
<div class=\"ml-3 ml-lg-3 ml-md-3 text-deepGray\">
";
// line 18
yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["newsletterForm"]) || array_key_exists("newsletterForm", $context) ? $context["newsletterForm"] : (function () { throw new RuntimeError('Variable "newsletterForm" does not exist.', 18, $this->source); })()), "Email", [], "any", false, false, true, 18), 18, $this->source), 'label');
yield "
</div>
";
// line 21
yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["newsletterForm"]) || array_key_exists("newsletterForm", $context) ? $context["newsletterForm"] : (function () { throw new RuntimeError('Variable "newsletterForm" does not exist.', 21, $this->source); })()), "Email", [], "any", false, false, true, 21), 21, $this->source), 'widget');
yield "
";
// line 22
yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["newsletterForm"]) || array_key_exists("newsletterForm", $context) ? $context["newsletterForm"] : (function () { throw new RuntimeError('Variable "newsletterForm" does not exist.', 22, $this->source); })()), "Email", [], "any", false, false, true, 22), 22, $this->source), 'errors');
yield "
</div>
<div class=\"d-flex flex-column mb-3 mb-lg-3 mb-md-3 ";
// line 25
yield (($this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["newsletterForm"]) || array_key_exists("newsletterForm", $context) ? $context["newsletterForm"] : (function () { throw new RuntimeError('Variable "newsletterForm" does not exist.', 25, $this->source); })()), "Firstname", [], "any", false, false, true, 25), 25, $this->source), 'errors')) ? ("input-error") : (""));
yield "\">
<div class=\"ml-3 ml-lg-3 ml-md-3 text-deepGray\">
";
// line 27
yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["newsletterForm"]) || array_key_exists("newsletterForm", $context) ? $context["newsletterForm"] : (function () { throw new RuntimeError('Variable "newsletterForm" does not exist.', 27, $this->source); })()), "Firstname", [], "any", false, false, true, 27), 27, $this->source), 'label');
yield "
</div>
";
// line 30
yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["newsletterForm"]) || array_key_exists("newsletterForm", $context) ? $context["newsletterForm"] : (function () { throw new RuntimeError('Variable "newsletterForm" does not exist.', 30, $this->source); })()), "Firstname", [], "any", false, false, true, 30), 30, $this->source), 'widget');
yield "
";
// line 31
yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["newsletterForm"]) || array_key_exists("newsletterForm", $context) ? $context["newsletterForm"] : (function () { throw new RuntimeError('Variable "newsletterForm" does not exist.', 31, $this->source); })()), "Firstname", [], "any", false, false, true, 31), 31, $this->source), 'errors');
yield "
</div>
</div>
</div>
<div class=\"row\">
<div class=\"col-lg-6 col-md-8 col-sm-9 offset-sm-1 offset-md-0 offset-lg-1\">
<p class=\"mb-0 mt-4 mt-lg-4 mt-md-4\">Select Categories of interest</p>
<p class=\"mb-3 mb-lg-3 mb-md-3\">
<small>
Select all that apply.
</small>
</p>
";
// line 43
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["lists"]) || array_key_exists("lists", $context) ? $context["lists"] : (function () { throw new RuntimeError('Variable "lists" does not exist.', 43, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["list"]) {
// line 44
yield "
<div class=\"top-position-checkmark position-relative checkbox-container my-0 py-1 py-lg-1 py-md-1\">
<input type=\"checkbox\" name=\"lists[]\" id=\"";
// line 46
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["list"], "id", [], "any", false, false, true, 46), 46, $this->source), "html", null, true);
yield "\" value=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["list"], "id", [], "any", false, false, true, 46), 46, $this->source), "html", null, true);
yield "\">
<span class=\"checkmark\"></span>
<div class=\"d-flex ml-1 ml-lg-1 ml-md-1\">
<label for=\"";
// line 49
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["list"], "id", [], "any", false, false, true, 49), 49, $this->source), "html", null, true);
yield "\">
";
// line 50
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["list"], "title", [], "any", false, false, true, 50), 50, $this->source), "html", null, true);
yield "
</label>
</div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['list'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 57
yield " <div class=\"d-flex flex-column align-items-start mt-4 mt-lg-4 mt-md-3 mb-3 mb-lg-3 mb-md-3\">
";
// line 58
yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["newsletterForm"]) || array_key_exists("newsletterForm", $context) ? $context["newsletterForm"] : (function () { throw new RuntimeError('Variable "newsletterForm" does not exist.', 58, $this->source); })()), "_submit", [], "any", false, false, true, 58), 58, $this->source), 'widget');
yield "
</div>
</div>
</div>
";
// line 62
yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock($this->sandbox->ensureToStringAllowed((isset($context["newsletterForm"]) || array_key_exists("newsletterForm", $context) ? $context["newsletterForm"] : (function () { throw new RuntimeError('Variable "newsletterForm" does not exist.', 62, $this->source); })()), 62, $this->source), 'form_end');
yield "
</div>
</main>
<script>
\$(\"#newsletter-form-type button[type=submit]\").on('click', function(e) {
e.preventDefault();
grecaptcha.ready(function() {
let action = document.getElementById('action').value;
grecaptcha.execute('";
// line 71
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed((isset($context["recaptcha_v3_site_key"]) || array_key_exists("recaptcha_v3_site_key", $context) ? $context["recaptcha_v3_site_key"] : (function () { throw new RuntimeError('Variable "recaptcha_v3_site_key" does not exist.', 71, $this->source); })()), 71, $this->source), "html", null, true);
yield "', { action: action })
.then(function(token) {
// add token value to form
document.getElementById('g-recaptcha-response').value = token;
\$('#newsletter-form-type').submit();
});
});
});
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "@FactorySupport/newsletter/index.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 211 => 71, 199 => 62, 192 => 58, 189 => 57, 176 => 50, 172 => 49, 164 => 46, 160 => 44, 156 => 43, 141 => 31, 137 => 30, 131 => 27, 126 => 25, 120 => 22, 116 => 21, 110 => 18, 105 => 16, 99 => 13, 95 => 12, 88 => 8, 80 => 4, 67 => 3, 38 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'layout/default.html.twig' %}
{% block contentBlock %}
<script src=\"https://www.google.com/recaptcha/api.js?render={{ recaptcha_v3_site_key }}\"></script>
<main class=\"staticPage\">
<div class=\"container my-5 my-lg-5 my-md-5\">
{{ form_start(newsletterForm,{'attr': {'novalidate': 'novalidate','id': 'newsletter-form-type'}}) }}
<div class=\"row\">
<div class=\"col-lg-4 col-md-6 col-sm-9 offset-sm-1 offset-md-0 offset-lg-1\">
<div class=\"d-flex flex-column\">
<h1 class=\"font-weight-bold mb-4 mb-lg-4 mb-md-4 font-italic\">{{ 'newsletter.heading' | trans }}</h1>
<h4 class=\"font-weight-bold mb-4 mb-lg-4 mb-md-4\">{{ 'newsletter.sub.heading' | trans }}</h4>
</div>
<div class=\"d-flex flex-column mb-3 mb-lg-3 mb-md-3 {{ form_errors(newsletterForm.Email) ? 'input-error' }}\">
<div class=\"ml-3 ml-lg-3 ml-md-3 text-deepGray\">
{{ form_label(newsletterForm.Email) }}
</div>
{{ form_widget(newsletterForm.Email) }}
{{ form_errors(newsletterForm.Email) }}
</div>
<div class=\"d-flex flex-column mb-3 mb-lg-3 mb-md-3 {{ form_errors(newsletterForm.Firstname) ? 'input-error' }}\">
<div class=\"ml-3 ml-lg-3 ml-md-3 text-deepGray\">
{{ form_label(newsletterForm.Firstname) }}
</div>
{{ form_widget(newsletterForm.Firstname) }}
{{ form_errors(newsletterForm.Firstname) }}
</div>
</div>
</div>
<div class=\"row\">
<div class=\"col-lg-6 col-md-8 col-sm-9 offset-sm-1 offset-md-0 offset-lg-1\">
<p class=\"mb-0 mt-4 mt-lg-4 mt-md-4\">Select Categories of interest</p>
<p class=\"mb-3 mb-lg-3 mb-md-3\">
<small>
Select all that apply.
</small>
</p>
{% for list in lists %}
<div class=\"top-position-checkmark position-relative checkbox-container my-0 py-1 py-lg-1 py-md-1\">
<input type=\"checkbox\" name=\"lists[]\" id=\"{{ list.id }}\" value=\"{{ list.id }}\">
<span class=\"checkmark\"></span>
<div class=\"d-flex ml-1 ml-lg-1 ml-md-1\">
<label for=\"{{ list.id }}\">
{{ list.title }}
</label>
</div>
</div>
{% endfor %}
<div class=\"d-flex flex-column align-items-start mt-4 mt-lg-4 mt-md-3 mb-3 mb-lg-3 mb-md-3\">
{{ form_widget(newsletterForm._submit) }}
</div>
</div>
</div>
{{ form_end(newsletterForm) }}
</div>
</main>
<script>
\$(\"#newsletter-form-type button[type=submit]\").on('click', function(e) {
e.preventDefault();
grecaptcha.ready(function() {
let action = document.getElementById('action').value;
grecaptcha.execute('{{ recaptcha_v3_site_key }}', { action: action })
.then(function(token) {
// add token value to form
document.getElementById('g-recaptcha-response').value = token;
\$('#newsletter-form-type').submit();
});
});
});
</script>
{% endblock %}", "@FactorySupport/newsletter/index.html.twig", "/var/www/webovi/stoelting/pimcore/templates/newsletter/index.html.twig");
}
public function checkSecurity()
{
static $tags = array("for" => 43);
static $filters = array("escape" => 4, "trans" => 12);
static $functions = array("form_start" => 8, "form_errors" => 16, "form_label" => 18, "form_widget" => 21, "form_end" => 62);
try {
$this->sandbox->checkSecurity(
['for'],
['escape', 'trans'],
['form_start', 'form_errors', 'form_label', 'form_widget', 'form_end'],
$this->source
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}