var/cache/review/twig/84/840d629148c75a62f96aba910d6168f2.php line 40

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* security/register.html.twig */
  14. class __TwigTemplate_f0a3934f8c61b6441e8a76cae2be73c3 extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'title' => [$this'block_title'],
  24.             'mainContainer' => [$this'block_mainContainer'],
  25.             'javascripts' => [$this'block_javascripts'],
  26.         ];
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 1
  31.         return "layout.html.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  37.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""security/register.html.twig"));
  38.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  39.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""security/register.html.twig"));
  40.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  41.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""security/register.html.twig"));
  42.         $this->parent $this->loadTemplate("layout.html.twig""security/register.html.twig"1);
  43.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  44.         
  45.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  46.         
  47.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  48.         
  49.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  50.     }
  51.     // line 3
  52.     public function block_title($context, array $blocks = [])
  53.     {
  54.         $macros $this->macros;
  55.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  56.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  57.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  58.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  59.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  60.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  61.         echo " Регистрация ";
  62.         
  63.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  64.         
  65.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  66.         
  67.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  68.     }
  69.     // line 5
  70.     public function block_mainContainer($context, array $blocks = [])
  71.     {
  72.         $macros $this->macros;
  73.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  74.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""mainContainer"));
  75.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  76.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""mainContainer"));
  77.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  78.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""mainContainer"));
  79.         // line 6
  80.         echo "    <script src=\"https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit\" async defer></script>
  81.     <div class=\"choose-account-type\">
  82.         <button value=\"advertiser\">Advertiser</button>
  83.         <button value=\"customer\">Customer</button>
  84.     </div>
  85.     <div id=\"registration_form\" class=\"col text-center\">
  86.         <h1 class=\"h3\">Регистрация</h1>
  87.         ";
  88.         // line 13
  89.         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');
  90.         echo "
  91.         ";
  92.         // line 14
  93.         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"falsefalsefalse14), 'row');
  94.         echo "
  95.         ";
  96.         // line 15
  97.         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"falsefalsefalse15), 'row', ["label" => "Ник"]);
  98.         echo "
  99.         ";
  100.         // line 16
  101.         echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse16), "first", [], "any"falsefalsefalse16), 'row', ["label" => "Пароль"]);
  102.         echo "
  103.         ";
  104.         // line 17
  105.         echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse17), "second", [], "any"falsefalsefalse17), 'row', ["label" => "Повторите пароль"]);
  106.         echo "
  107.         ";
  108.         // line 18
  109.         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"falsefalsefalse18), 'row', ["label" => "E-mail"]);
  110.         echo "
  111.         ";
  112.         // line 19
  113.         if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "country", [], "any"truetruefalse19)) {
  114.             // line 20
  115.             echo "            ";
  116.             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"falsefalsefalse20), 'row', ["label" => "Страна"]);
  117.             echo "
  118.         ";
  119.         }
  120.         // line 22
  121.         echo "        ";
  122.         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"falsefalsefalse22), 'row', ["label" => "Город"]);
  123.         echo "
  124.         ";
  125.         // line 23
  126.         if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "captcha", [], "any"truetruefalse23)) {
  127.             // line 24
  128.             echo "            ";
  129.             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"falsefalsefalse24), 'row', ["label" => "Город"]);
  130.             echo "
  131.         ";
  132.         }
  133.         // line 26
  134.         echo "        <button type=\"submit\" class=\"btn btn-success\" formnovalidate>Зарегистрироваться</button>
  135.         ";
  136.         // line 27
  137.         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');
  138.         echo "
  139.     </div>
  140. ";
  141.         
  142.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  143.         
  144.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  145.         
  146.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  147.     }
  148.     // line 31
  149.     public function block_javascripts($context, array $blocks = [])
  150.     {
  151.         $macros $this->macros;
  152.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  153.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  154.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  155.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  156.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  157.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  158.         // line 32
  159.         echo "    <script type=\"text/javascript\">
  160.         document.addEventListener('DOMContentLoaded', function() {
  161.             var regForm = document.querySelector('#registration_form');
  162.             regForm.style.display = 'none';
  163.             if(document.querySelector('#";
  164.         // line 37
  165.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse37), "vars", [], "any"falsefalsefalse37), "id", [], "any"falsefalsefalse37), "html"nulltrue);
  166.         echo "').value)
  167.                 regForm.style.display = 'block';
  168.             document.querySelector('.choose-account-type').addEventListener('click', function(e) {
  169.                 console.log(e.target.tagName);
  170.                 if(e.target.tagName.toLowerCase() != 'button')
  171.                     return;
  172.                 document.querySelector('#";
  173.         // line 45
  174.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse45), "vars", [], "any"falsefalsefalse45), "id", [], "any"falsefalsefalse45), "html"nulltrue);
  175.         echo "').value = e.target.value;
  176.                 regForm.style.display = 'block';
  177.             });
  178.         });
  179.     </script>
  180.     <script type=\"text/javascript\">
  181.         var onloadCallback = function() {
  182.             grecaptcha.render('ewz_recaptcha_div', {
  183.                 'sitekey' : '";
  184.         // line 53
  185.         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"nulltrue);
  186.         echo "'
  187.             });
  188.         };
  189.     </script>
  190. ";
  191.         
  192.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  193.         
  194.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  195.         
  196.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  197.     }
  198.     /**
  199.      * @codeCoverageIgnore
  200.      */
  201.     public function getTemplateName()
  202.     {
  203.         return "security/register.html.twig";
  204.     }
  205.     /**
  206.      * @codeCoverageIgnore
  207.      */
  208.     public function isTraitable()
  209.     {
  210.         return false;
  211.     }
  212.     /**
  213.      * @codeCoverageIgnore
  214.      */
  215.     public function getDebugInfo()
  216.     {
  217.         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,);
  218.     }
  219.     public function getSourceContext()
  220.     {
  221.         return new Source("{% extends 'layout.html.twig' %}
  222. {% block title %} Регистрация {% endblock %}
  223. {% block mainContainer %}
  224.     <script src=\"https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit\" async defer></script>
  225.     <div class=\"choose-account-type\">
  226.         <button value=\"advertiser\">Advertiser</button>
  227.         <button value=\"customer\">Customer</button>
  228.     </div>
  229.     <div id=\"registration_form\" class=\"col text-center\">
  230.         <h1 class=\"h3\">Регистрация</h1>
  231.         {{ form_start(form) }}
  232.         {{ form_row(form.accountType) }}
  233.         {{ form_row(form.nickName, {'label': 'Ник'}) }}
  234.         {{ form_row(form.plainPassword.first, {'label': 'Пароль'}) }}
  235.         {{ form_row(form.plainPassword.second, {'label': 'Повторите пароль',}) }}
  236.         {{ form_row(form.email, {'label': 'E-mail'}) }}
  237.         {% if form.country is defined %}
  238.             {{ form_row(form.country, {'label': 'Страна'}) }}
  239.         {% endif %}
  240.         {{ form_row(form.city, {'label': 'Город'}) }}
  241.         {% if form.captcha is defined %}
  242.             {{ form_row(form.captcha, {'label': 'Город'}) }}
  243.         {% endif %}
  244.         <button type=\"submit\" class=\"btn btn-success\" formnovalidate>Зарегистрироваться</button>
  245.         {{ form_end(form) }}
  246.     </div>
  247. {% endblock %}
  248. {% block javascripts %}
  249.     <script type=\"text/javascript\">
  250.         document.addEventListener('DOMContentLoaded', function() {
  251.             var regForm = document.querySelector('#registration_form');
  252.             regForm.style.display = 'none';
  253.             if(document.querySelector('#{{ form.accountType.vars.id }}').value)
  254.                 regForm.style.display = 'block';
  255.             document.querySelector('.choose-account-type').addEventListener('click', function(e) {
  256.                 console.log(e.target.tagName);
  257.                 if(e.target.tagName.toLowerCase() != 'button')
  258.                     return;
  259.                 document.querySelector('#{{ form.accountType.vars.id }}').value = e.target.value;
  260.                 regForm.style.display = 'block';
  261.             });
  262.         });
  263.     </script>
  264.     <script type=\"text/javascript\">
  265.         var onloadCallback = function() {
  266.             grecaptcha.render('ewz_recaptcha_div', {
  267.                 'sitekey' : '{{ ewz_recaptcha_site_key }}'
  268.             });
  269.         };
  270.     </script>
  271. {% endblock %}
  272. ""security/register.html.twig""/app/templates/security/register.html.twig");
  273.     }
  274. }