var/cache/dev/twig/a2/a29327bf104a63fc9b67b4bf2177b6b2.php line 54

  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* security/lost-my-password.html.twig */
  16. class __TwigTemplate_1362b8e3709d26bda27f4a41a257f566 extends Template
  17. {
  18.     private Source $source;
  19.     /**
  20.      * @var array<string, Template>
  21.      */
  22.     private array $macros = [];
  23.     public function __construct(Environment $env)
  24.     {
  25.         parent::__construct($env);
  26.         $this->source $this->getSourceContext();
  27.         $this->blocks = [
  28.             'title' => [$this'block_title'],
  29.             'body' => [$this'block_body'],
  30.         ];
  31.     }
  32.     protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  33.     {
  34.         // line 1
  35.         return "base.html.twig";
  36.     }
  37.     protected function doDisplay(array $context, array $blocks = []): iterable
  38.     {
  39.         $macros $this->macros;
  40.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  41.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""security/lost-my-password.html.twig"));
  42.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  43.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""security/lost-my-password.html.twig"));
  44.         $this->parent $this->load("base.html.twig"1);
  45.         yield from $this->parent->unwrap()->yield($contextarray_merge($this->blocks$blocks));
  46.         
  47.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  48.         
  49.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  50.     }
  51.     // line 3
  52.     /**
  53.      * @return iterable<null|scalar|\Stringable>
  54.      */
  55.     public function block_title(array $context, array $blocks = []): iterable
  56.     {
  57.         $macros $this->macros;
  58.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  59.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  60.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  61.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  62.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Lost my password or first login"), "html"nulltrue);
  63.         
  64.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  65.         
  66.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  67.         yield from [];
  68.     }
  69.     // line 5
  70.     /**
  71.      * @return iterable<null|scalar|\Stringable>
  72.      */
  73.     public function block_body(array $context, array $blocks = []): iterable
  74.     {
  75.         $macros $this->macros;
  76.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  77.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  78.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  79.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  80.         // line 6
  81.         yield "  <div class=\"switch\">
  82.   <select id=\"language-toggle\">
  83.     <option value=\"fr\" ";
  84.         // line 8
  85.         if ((CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'8$this->source); })()), "request", [], "any"falsefalsefalse8), "locale", [], "any"falsefalsefalse8) == "fr")) {
  86.             yield " selected ";
  87.         }
  88.         yield ">FR</option>
  89.     <option value=\"en\" ";
  90.         // line 9
  91.         if ((CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'9$this->source); })()), "request", [], "any"falsefalsefalse9), "locale", [], "any"falsefalsefalse9) != "fr")) {
  92.             yield " selected ";
  93.         }
  94.         yield ">EN</option>
  95.   </select>
  96.   </div>
  97.   <div class=\"container\">
  98.     <div class=\"logo\">
  99.     ";
  100.         // line 14
  101.         if ((($tmp = (isset($context["showMessage"]) || array_key_exists("showMessage"$context) ? $context["showMessage"] : (function () { throw new RuntimeError('Variable "showMessage" does not exist.'14$this->source); })())) && $tmp instanceof Markup ? (string) $tmp $tmp)) {
  102.             // line 15
  103.             yield "      <div class=\"alert alert-success\" role=\"alert\">
  104.         ";
  105.             // line 16
  106.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("An email has been sent to you"), "html"nulltrue);
  107.             yield "
  108.       </div>
  109.     ";
  110.         }
  111.         // line 19
  112.         yield "      <img src=\"";
  113.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("images/logo-2.png"), "html"nulltrue);
  114.         yield "\"/>
  115.       <h2>
  116.         ";
  117.         // line 21
  118.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Lost my password or first login"), "html"nulltrue);
  119.         yield "
  120.       </h2>
  121.     ";
  122.         // line 23
  123.         if ((($tmp = (isset($context["showMessage"]) || array_key_exists("showMessage"$context) ? $context["showMessage"] : (function () { throw new RuntimeError('Variable "showMessage" does not exist.'23$this->source); })())) && $tmp instanceof Markup ? (string) $tmp $tmp)) {
  124.             // line 24
  125.             yield "      <div class=\"alert alert-chrysippe\">
  126.         ";
  127.             // line 25
  128.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Please check your mailbox and click on the sent link"), "html"nulltrue);
  129.             yield "
  130.       </div>
  131.       <div class=\"buttons\">
  132.         <a class=\"btn btn-link float-end\" href=\"";
  133.             // line 28
  134.             yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_login");
  135.             yield "\">";
  136.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Return to Login"), "html"nulltrue);
  137.             yield "</a>
  138.       </div>
  139.     </div>
  140.     ";
  141.         } else {
  142.             // line 33
  143.             yield "      ";
  144.             yield             $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.'33$this->source); })()), 'form_start');
  145.             yield "
  146.       ";
  147.             // line 34
  148.             yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'34$this->source); })()), 'widget');
  149.             yield "
  150.       <div class=\"buttons\">
  151.         <button class=\"btn btn-cyellow\">";
  152.             // line 36
  153.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((array_key_exists("button_label"$context)) ? (Twig\Extension\CoreExtension::default((isset($context["button_label"]) || array_key_exists("button_label"$context) ? $context["button_label"] : (function () { throw new RuntimeError('Variable "button_label" does not exist.'36$this->source); })()), $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Submit"))) : ($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Submit"))), "html"nulltrue);
  154.             yield "</button>
  155.         <a class=\"btn btn-link float-end\" href=\"";
  156.             // line 37
  157.             yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_login");
  158.             yield "\">";
  159.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Return to Login"), "html"nulltrue);
  160.             yield "</a>
  161.       </div>
  162.       ";
  163.             // line 39
  164.             yield             $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.'39$this->source); })()), 'form_end');
  165.             yield "
  166.     </div>
  167.     ";
  168.         }
  169.         // line 43
  170.         yield "  </div>
  171.   <style>
  172.     .container {
  173.       display: flex;
  174.       flex-direction: column;
  175.       justify-content: center;
  176.       align-items: center;
  177.       min-height: 80vh;
  178.     }
  179.     img {
  180.       width: 60%;
  181.     }
  182.     .logo {
  183.       display: flex;
  184.       flex-direction: column;
  185.       max-width: 600px;
  186.     }
  187.     .logo img {
  188.       align-self: center;
  189.       margin-bottom: 3%;
  190.     }
  191.     .logo h2 {
  192.       width: 113%;
  193.       margin-bottom: 3%;
  194.     }
  195.     .logo p, .logo h2 {
  196.       align-self: flex-start;
  197.     }
  198.     .switch {
  199.       position: absolute;
  200.       top: 2%;
  201.       right: 1%;
  202.     }
  203.     .buttons {
  204.       display: flex;
  205.       margin-top: 3rem;
  206.     }
  207.     .btn-cyellow {
  208.       border-radius: 3px;
  209.       margin-right: 3%;
  210.     }
  211.     .alert-success {
  212.       text-align: center;
  213.     }
  214.     @media(max-width: 600px) {
  215.       .container-md {
  216.         padding-left: 4px;
  217.       }
  218.       img {
  219.         width: 100%;
  220.       }
  221.       .buttons {
  222.         flex-direction:column;
  223.         align-items: stretch;
  224.         justify-content: center;
  225.       }
  226.       .btn-cyellow {
  227.         margin-bottom: 4%;
  228.       }
  229.       .logo h2 {
  230.         font-size: 17px;
  231.       }
  232.       .logo p {
  233.         font-size: 12px;
  234.       }
  235.       .logo img {
  236.         margin-bottom: 10%;
  237.       }
  238.       .mb-3 {
  239.         margin-top: 15%;
  240.       }
  241.     }
  242.   </style>
  243.   <script>
  244.     const languageToggle = document.getElementById('language-toggle');
  245.     languageToggle.onchange = function () {
  246.       const elem = (typeof this.selectedIndex === \"undefined\" ? window.event.srcElement : this);
  247.       const value = elem.value || elem.options[elem.selectedIndex].value;
  248.       changeLanguage(value);
  249.     }
  250.     function changeLanguage(lang) {
  251.         console.log(lang);
  252.         const url = new URL(window.location.href);
  253.         url.searchParams.set('lang', lang);
  254.         window.location.href = url.href;
  255.     }
  256.   </script>
  257. ";
  258.         
  259.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  260.         
  261.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  262.         yield from [];
  263.     }
  264.     /**
  265.      * @codeCoverageIgnore
  266.      */
  267.     public function getTemplateName(): string
  268.     {
  269.         return "security/lost-my-password.html.twig";
  270.     }
  271.     /**
  272.      * @codeCoverageIgnore
  273.      */
  274.     public function isTraitable(): bool
  275.     {
  276.         return false;
  277.     }
  278.     /**
  279.      * @codeCoverageIgnore
  280.      */
  281.     public function getDebugInfo(): array
  282.     {
  283.         return array (  191 => 43,  184 => 39,  177 => 37,  173 => 36,  168 => 34,  163 => 33,  153 => 28,  147 => 25,  144 => 24,  142 => 23,  137 => 21,  131 => 19,  125 => 16,  122 => 15,  120 => 14,  110 => 9,  104 => 8,  100 => 6,  87 => 5,  64 => 3,  41 => 1,);
  284.     }
  285.     public function getSourceContext(): Source
  286.     {
  287.         return new Source("{% extends 'base.html.twig' %}
  288. {% block title %}{{'Lost my password or first login' | trans}}{% endblock %}
  289. {% block body %}
  290.   <div class=\"switch\">
  291.   <select id=\"language-toggle\">
  292.     <option value=\"fr\" {% if app.request.locale == \"fr\" %} selected {% endif %}>FR</option>
  293.     <option value=\"en\" {% if app.request.locale != \"fr\" %} selected {% endif %}>EN</option>
  294.   </select>
  295.   </div>
  296.   <div class=\"container\">
  297.     <div class=\"logo\">
  298.     {% if showMessage %}
  299.       <div class=\"alert alert-success\" role=\"alert\">
  300.         {{ 'An email has been sent to you' | trans }}
  301.       </div>
  302.     {% endif %}
  303.       <img src=\"{{ asset('images/logo-2.png')}}\"/>
  304.       <h2>
  305.         {{'Lost my password or first login' | trans}}
  306.       </h2>
  307.     {% if showMessage %}
  308.       <div class=\"alert alert-chrysippe\">
  309.         {{'Please check your mailbox and click on the sent link' | trans}}
  310.       </div>
  311.       <div class=\"buttons\">
  312.         <a class=\"btn btn-link float-end\" href=\"{{ path('app_login') }}\">{{'Return to Login' | trans}}</a>
  313.       </div>
  314.     </div>
  315.     {% else %}
  316.       {{ form_start(form) }}
  317.       {{ form_widget(form) }}
  318.       <div class=\"buttons\">
  319.         <button class=\"btn btn-cyellow\">{{ button_label|default('Submit'|trans) }}</button>
  320.         <a class=\"btn btn-link float-end\" href=\"{{ path('app_login') }}\">{{'Return to Login' | trans}}</a>
  321.       </div>
  322.       {{ form_end(form) }}
  323.     </div>
  324.     {% endif %}
  325.   </div>
  326.   <style>
  327.     .container {
  328.       display: flex;
  329.       flex-direction: column;
  330.       justify-content: center;
  331.       align-items: center;
  332.       min-height: 80vh;
  333.     }
  334.     img {
  335.       width: 60%;
  336.     }
  337.     .logo {
  338.       display: flex;
  339.       flex-direction: column;
  340.       max-width: 600px;
  341.     }
  342.     .logo img {
  343.       align-self: center;
  344.       margin-bottom: 3%;
  345.     }
  346.     .logo h2 {
  347.       width: 113%;
  348.       margin-bottom: 3%;
  349.     }
  350.     .logo p, .logo h2 {
  351.       align-self: flex-start;
  352.     }
  353.     .switch {
  354.       position: absolute;
  355.       top: 2%;
  356.       right: 1%;
  357.     }
  358.     .buttons {
  359.       display: flex;
  360.       margin-top: 3rem;
  361.     }
  362.     .btn-cyellow {
  363.       border-radius: 3px;
  364.       margin-right: 3%;
  365.     }
  366.     .alert-success {
  367.       text-align: center;
  368.     }
  369.     @media(max-width: 600px) {
  370.       .container-md {
  371.         padding-left: 4px;
  372.       }
  373.       img {
  374.         width: 100%;
  375.       }
  376.       .buttons {
  377.         flex-direction:column;
  378.         align-items: stretch;
  379.         justify-content: center;
  380.       }
  381.       .btn-cyellow {
  382.         margin-bottom: 4%;
  383.       }
  384.       .logo h2 {
  385.         font-size: 17px;
  386.       }
  387.       .logo p {
  388.         font-size: 12px;
  389.       }
  390.       .logo img {
  391.         margin-bottom: 10%;
  392.       }
  393.       .mb-3 {
  394.         margin-top: 15%;
  395.       }
  396.     }
  397.   </style>
  398.   <script>
  399.     const languageToggle = document.getElementById('language-toggle');
  400.     languageToggle.onchange = function () {
  401.       const elem = (typeof this.selectedIndex === \"undefined\" ? window.event.srcElement : this);
  402.       const value = elem.value || elem.options[elem.selectedIndex].value;
  403.       changeLanguage(value);
  404.     }
  405.     function changeLanguage(lang) {
  406.         console.log(lang);
  407.         const url = new URL(window.location.href);
  408.         url.searchParams.set('lang', lang);
  409.         window.location.href = url.href;
  410.     }
  411.   </script>
  412. {% endblock %}
  413. ""security/lost-my-password.html.twig""/app/templates/security/lost-my-password.html.twig");
  414.     }
  415. }