<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
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;
/* security/register.html.twig */
class __TwigTemplate_f0a3934f8c61b6441e8a76cae2be73c3 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'mainContainer' => [$this, 'block_mainContainer'],
'javascripts' => [$this, 'block_javascripts'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "layout.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", "security/register.html.twig"));
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "security/register.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "security/register.html.twig"));
$this->parent = $this->loadTemplate("layout.html.twig", "security/register.html.twig", 1);
$this->parent->display($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_title($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", "title"));
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
echo " Регистрация ";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
}
// line 5
public function block_mainContainer($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", "mainContainer"));
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "mainContainer"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "mainContainer"));
// line 6
echo " <script src=\"https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit\" async defer></script>
<div class=\"choose-account-type\">
<button value=\"advertiser\">Advertiser</button>
<button value=\"customer\">Customer</button>
</div>
<div id=\"registration_form\" class=\"col text-center\">
<h1 class=\"h3\">Регистрация</h1>
";
// line 13
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 13, $this->source); })()), 'form_start');
echo "
";
// line 14
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 14, $this->source); })()), "accountType", [], "any", false, false, false, 14), 'row');
echo "
";
// line 15
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 15, $this->source); })()), "nickName", [], "any", false, false, false, 15), 'row', ["label" => "Ник"]);
echo "
";
// line 16
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 16, $this->source); })()), "plainPassword", [], "any", false, false, false, 16), "first", [], "any", false, false, false, 16), 'row', ["label" => "Пароль"]);
echo "
";
// line 17
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 17, $this->source); })()), "plainPassword", [], "any", false, false, false, 17), "second", [], "any", false, false, false, 17), 'row', ["label" => "Повторите пароль"]);
echo "
";
// line 18
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 18, $this->source); })()), "email", [], "any", false, false, false, 18), 'row', ["label" => "E-mail"]);
echo "
";
// line 19
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "country", [], "any", true, true, false, 19)) {
// line 20
echo " ";
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 20, $this->source); })()), "country", [], "any", false, false, false, 20), 'row', ["label" => "Страна"]);
echo "
";
}
// line 22
echo " ";
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 22, $this->source); })()), "city", [], "any", false, false, false, 22), 'row', ["label" => "Город"]);
echo "
";
// line 23
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "captcha", [], "any", true, true, false, 23)) {
// line 24
echo " ";
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 24, $this->source); })()), "captcha", [], "any", false, false, false, 24), 'row', ["label" => "Город"]);
echo "
";
}
// line 26
echo " <button type=\"submit\" class=\"btn btn-success\" formnovalidate>Зарегистрироваться</button>
";
// line 27
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 27, $this->source); })()), 'form_end');
echo "
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
}
// line 31
public function block_javascripts($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", "javascripts"));
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
// line 32
echo " <script type=\"text/javascript\">
document.addEventListener('DOMContentLoaded', function() {
var regForm = document.querySelector('#registration_form');
regForm.style.display = 'none';
if(document.querySelector('#";
// line 37
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 37, $this->source); })()), "accountType", [], "any", false, false, false, 37), "vars", [], "any", false, false, false, 37), "id", [], "any", false, false, false, 37), "html", null, true);
echo "').value)
regForm.style.display = 'block';
document.querySelector('.choose-account-type').addEventListener('click', function(e) {
console.log(e.target.tagName);
if(e.target.tagName.toLowerCase() != 'button')
return;
document.querySelector('#";
// line 45
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 45, $this->source); })()), "accountType", [], "any", false, false, false, 45), "vars", [], "any", false, false, false, 45), "id", [], "any", false, false, false, 45), "html", null, true);
echo "').value = e.target.value;
regForm.style.display = 'block';
});
});
</script>
<script type=\"text/javascript\">
var onloadCallback = function() {
grecaptcha.render('ewz_recaptcha_div', {
'sitekey' : '";
// line 53
echo twig_escape_filter($this->env, (isset($context["ewz_recaptcha_site_key"]) || array_key_exists("ewz_recaptcha_site_key", $context) ? $context["ewz_recaptcha_site_key"] : (function () { throw new RuntimeError('Variable "ewz_recaptcha_site_key" does not exist.', 53, $this->source); })()), "html", null, true);
echo "'
});
};
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "security/register.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 219 => 53, 208 => 45, 197 => 37, 190 => 32, 177 => 31, 161 => 27, 158 => 26, 152 => 24, 150 => 23, 145 => 22, 139 => 20, 137 => 19, 133 => 18, 129 => 17, 125 => 16, 121 => 15, 117 => 14, 113 => 13, 104 => 6, 91 => 5, 66 => 3, 37 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'layout.html.twig' %}
{% block title %} Регистрация {% endblock %}
{% block mainContainer %}
<script src=\"https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit\" async defer></script>
<div class=\"choose-account-type\">
<button value=\"advertiser\">Advertiser</button>
<button value=\"customer\">Customer</button>
</div>
<div id=\"registration_form\" class=\"col text-center\">
<h1 class=\"h3\">Регистрация</h1>
{{ form_start(form) }}
{{ form_row(form.accountType) }}
{{ form_row(form.nickName, {'label': 'Ник'}) }}
{{ form_row(form.plainPassword.first, {'label': 'Пароль'}) }}
{{ form_row(form.plainPassword.second, {'label': 'Повторите пароль',}) }}
{{ form_row(form.email, {'label': 'E-mail'}) }}
{% if form.country is defined %}
{{ form_row(form.country, {'label': 'Страна'}) }}
{% endif %}
{{ form_row(form.city, {'label': 'Город'}) }}
{% if form.captcha is defined %}
{{ form_row(form.captcha, {'label': 'Город'}) }}
{% endif %}
<button type=\"submit\" class=\"btn btn-success\" formnovalidate>Зарегистрироваться</button>
{{ form_end(form) }}
</div>
{% endblock %}
{% block javascripts %}
<script type=\"text/javascript\">
document.addEventListener('DOMContentLoaded', function() {
var regForm = document.querySelector('#registration_form');
regForm.style.display = 'none';
if(document.querySelector('#{{ form.accountType.vars.id }}').value)
regForm.style.display = 'block';
document.querySelector('.choose-account-type').addEventListener('click', function(e) {
console.log(e.target.tagName);
if(e.target.tagName.toLowerCase() != 'button')
return;
document.querySelector('#{{ form.accountType.vars.id }}').value = e.target.value;
regForm.style.display = 'block';
});
});
</script>
<script type=\"text/javascript\">
var onloadCallback = function() {
grecaptcha.render('ewz_recaptcha_div', {
'sitekey' : '{{ ewz_recaptcha_site_key }}'
});
};
</script>
{% endblock %}
", "security/register.html.twig", "/app/templates/security/register.html.twig");
}
}