var/cache/dev/twig/ce/ce90923b644fd6aa8e817d7b2a2a3c1aec8a871c80ee15da8c46588ca6bdfe44.php line 103

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. /* front/security/login.html.twig */
  14. class __TwigTemplate_e77e6c84a991435e2c44cc6ca4147a5da963aff34c2b7f3ede0d817ed73f7a59 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.             'leftButton' => [$this'block_leftButton'],
  25.             'card' => [$this'block_card'],
  26.             'addJs' => [$this'block_addJs'],
  27.         ];
  28.     }
  29.     protected function doGetParent(array $context)
  30.     {
  31.         // line 1
  32.         return "front/security/base.html.twig";
  33.     }
  34.     protected function doDisplay(array $context, array $blocks = [])
  35.     {
  36.         $macros $this->macros;
  37.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  38.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""front/security/login.html.twig"));
  39.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  40.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""front/security/login.html.twig"));
  41.         $this->parent $this->loadTemplate("front/security/base.html.twig""front/security/login.html.twig"1);
  42.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  43.         
  44.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  45.         
  46.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  47.     }
  48.     // line 3
  49.     public function block_title($context, array $blocks = [])
  50.     {
  51.         $macros $this->macros;
  52.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  53.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  54.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  55.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  56.         echo "BikingMan";
  57.         
  58.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  59.         
  60.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  61.     }
  62.     // line 5
  63.     public function block_leftButton($context, array $blocks = [])
  64.     {
  65.         $macros $this->macros;
  66.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  67.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""leftButton"));
  68.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  69.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""leftButton"));
  70.         // line 6
  71.         echo "    <a href=\"#\" onclick=\"\$('a#profile-tab').tab('show');\" class=\"btn btn-md btn-primary big-text-btn\">";
  72.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Créer mon compte"), "html"nulltrue);
  73.         echo "</a>
  74. ";
  75.         
  76.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  77.         
  78.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  79.     }
  80.     // line 9
  81.     public function block_card($context, array $blocks = [])
  82.     {
  83.         $macros $this->macros;
  84.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  85.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""card"));
  86.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  87.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""card"));
  88.         // line 10
  89.         echo "<div class=\"tab-pane fade show active\" id=\"login\" role=\"tabpanel\" aria-labelledby=\"login-tab\">
  90.     <div class=\"title h6\">";
  91.         // line 11
  92.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Login to your Account"), "html"nulltrue);
  93.         echo "</div>
  94.     <form class=\"content\" method=\"post\">
  95.         <div class=\"row\">
  96.             ";
  97.         // line 15
  98.         if ((isset($context["error"]) || array_key_exists("error"$context) ? $context["error"] : (function () { throw new RuntimeError('Variable "error" does not exist.'15$this->source); })())) {
  99.             // line 16
  100.             echo "                <div class=\"alert alert-danger\">";
  101.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env$this->source, (isset($context["error"]) || array_key_exists("error"$context) ? $context["error"] : (function () { throw new RuntimeError('Variable "error" does not exist.'16$this->source); })()), "messageKey", [], "any"falsefalsefalse16), twig_get_attribute($this->env$this->source, (isset($context["error"]) || array_key_exists("error"$context) ? $context["error"] : (function () { throw new RuntimeError('Variable "error" does not exist.'16$this->source); })()), "messageData", [], "any"falsefalsefalse16), "security"), "html"nulltrue);
  102.             echo "</div>
  103.             ";
  104.         }
  105.         // line 18
  106.         echo "
  107.             ";
  108.         // line 19
  109.         if (twig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'19$this->source); })()), "user", [], "any"falsefalsefalse19)) {
  110.             // line 20
  111.             echo "                <div class=\"mb-3\">
  112.                     <p>
  113.                         ";
  114.             // line 22
  115.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("You are logged in as"), "html"nulltrue);
  116.             echo " ";
  117.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'22$this->source); })()), "user", [], "any"falsefalsefalse22), "username", [], "any"falsefalsefalse22), "html"nulltrue);
  118.             echo ", <a href=\"";
  119.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_logout");
  120.             echo "\">Logout</a>
  121.                     </p>
  122.                 </div>
  123.             ";
  124.         }
  125.         // line 26
  126.         echo "            <div class=\"form-group label-floating\">
  127.                 <label class=\"control-label\" for=\"inputUsername\">Email</label>
  128.                 <input type=\"text\" value=\"";
  129.         // line 28
  130.         echo twig_escape_filter($this->env, (isset($context["last_username"]) || array_key_exists("last_username"$context) ? $context["last_username"] : (function () { throw new RuntimeError('Variable "last_username" does not exist.'28$this->source); })()), "html"nulltrue);
  131.         echo "\" placeholder=\"";
  132.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Enter Email"), "html"nulltrue);
  133.         echo "\" name=\"username\" id=\"inputUsername\" class=\"form-control\" required autofocus>
  134.             </div>
  135.             <div class=\"form-group label-floating\">
  136.                 <label class=\"control-label\" for=\"inputPassword\">";
  137.         // line 32
  138.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Password"), "html"nulltrue);
  139.         echo "</label>
  140.                 <input type=\"password\" name=\"password\" id=\"inputPassword\" placeholder=\"";
  141.         // line 33
  142.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Enter Password"), "html"nulltrue);
  143.         echo "\" class=\"form-control\" required>
  144.             </div>
  145.             <div class=\"remember\">
  146.                 <div class=\"row\">
  147.                     <div class=\"col-md-6\">
  148.                         <div class=\"form-check\">
  149.                             <input class=\"form-check-input\" type=\"checkbox\" name=\"_remember_me\" id=\"customControlInline\">
  150.                             <label class=\"form-check-label\" for=\"customControlInline\">
  151.                                 ";
  152.         // line 42
  153.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Remember Me"), "html"nulltrue);
  154.         echo "
  155.                             </label>
  156.                         </div>
  157.                     </div>
  158.                     <div class=\"col-md-6\">
  159.                         <a href=\"";
  160.         // line 47
  161.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("front.app_forgot_password_request");
  162.         echo "\" class=\"forgot\">";
  163.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Forgot my Password"), "html"nulltrue);
  164.         echo "</a>
  165.                     </div>
  166.                 </div>
  167.             </div>
  168.             <button class=\"btn btn-lg btn-primary full-width\" type=\"submit\">";
  169.         // line 54
  170.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Login"), "html"nulltrue);
  171.         echo "</button>
  172.             <input type=\"hidden\" name=\"_csrf_token\"
  173.                    value=\"";
  174.         // line 60
  175.         echo twig_escape_filter($this->env$this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderCsrfToken("authenticate"), "html"nulltrue);
  176.         echo "\"
  177.             >
  178.         </div>
  179.         <p>";
  180.         // line 63
  181.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Vous navez pas de compte"), "html"nulltrue);
  182.         echo " ?  <br>
  183.             <a href=\"#\" onclick=\"\$('a#profile-tab').tab('show');\" style=\"color:#b8232d !important\">";
  184.         // line 64
  185.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Créer mon compte maintenant"), "html"nulltrue);
  186.         echo "</a>  
  187.         </p>
  188.     </form>
  189.     
  190. </div>
  191. <div class=\"tab-pane fade\" id=\"profile\" role=\"tabpanel\" aria-labelledby=\"profile-tab\">
  192.     ";
  193.         // line 73
  194.         echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\Front\\RegistrationController::register"));
  195.         echo "
  196. </div>
  197. ";
  198.         
  199.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  200.         
  201.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  202.     }
  203.     // line 78
  204.     public function block_addJs($context, array $blocks = [])
  205.     {
  206.         $macros $this->macros;
  207.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  208.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""addJs"));
  209.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  210.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""addJs"));
  211.         // line 79
  212.         echo "    <script>
  213.         \$('.form-register').each(function () {
  214.             let form = \$(this);
  215.             form.submit(function () {
  216.                 \$(this).find('button[type=\"submit\"]').attr('disabled', 'disabled');
  217.             });
  218.             form.ajaxForm(function(response, sta, xhr, \$form) {
  219.                 form.find('button[type=\"submit\"]').attr('disabled', false);
  220.                 if (200 === xhr.status && -1 === response.indexOf('<!DOCTYPE html>')) {
  221.                     form.html(response);
  222.                     form.find('button[type=\"submit\"]').attr('disabled', false);
  223.                 } else {
  224.                     location.reload();
  225.                 }
  226.             });
  227.         });
  228.     </script>
  229. ";
  230.         
  231.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  232.         
  233.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  234.     }
  235.     public function getTemplateName()
  236.     {
  237.         return "front/security/login.html.twig";
  238.     }
  239.     public function isTraitable()
  240.     {
  241.         return false;
  242.     }
  243.     public function getDebugInfo()
  244.     {
  245.         return array (  255 => 79,  245 => 78,  231 => 73,  219 => 64,  215 => 63,  209 => 60,  200 => 54,  188 => 47,  180 => 42,  168 => 33,  164 => 32,  155 => 28,  151 => 26,  140 => 22,  136 => 20,  134 => 19,  131 => 18,  125 => 16,  123 => 15,  116 => 11,  113 => 10,  103 => 9,  90 => 6,  80 => 5,  61 => 3,  38 => 1,);
  246.     }
  247.     public function getSourceContext()
  248.     {
  249.         return new Source("{% extends 'front/security/base.html.twig' %}
  250. {% block title %}BikingMan{% endblock %}
  251. {% block leftButton %}
  252.     <a href=\"#\" onclick=\"\$('a#profile-tab').tab('show');\" class=\"btn btn-md btn-primary big-text-btn\">{{'Créer mon compte'|trans}}</a>
  253. {% endblock %}
  254. {% block card %}
  255. <div class=\"tab-pane fade show active\" id=\"login\" role=\"tabpanel\" aria-labelledby=\"login-tab\">
  256.     <div class=\"title h6\">{{'Login to your Account'|trans}}</div>
  257.     <form class=\"content\" method=\"post\">
  258.         <div class=\"row\">
  259.             {% if error %}
  260.                 <div class=\"alert alert-danger\">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
  261.             {% endif %}
  262.             {% if app.user %}
  263.                 <div class=\"mb-3\">
  264.                     <p>
  265.                         {{'You are logged in as'|trans}} {{ app.user.username }}, <a href=\"{{ path('app_logout') }}\">Logout</a>
  266.                     </p>
  267.                 </div>
  268.             {% endif %}
  269.             <div class=\"form-group label-floating\">
  270.                 <label class=\"control-label\" for=\"inputUsername\">Email</label>
  271.                 <input type=\"text\" value=\"{{ last_username }}\" placeholder=\"{{'Enter Email'|trans}}\" name=\"username\" id=\"inputUsername\" class=\"form-control\" required autofocus>
  272.             </div>
  273.             <div class=\"form-group label-floating\">
  274.                 <label class=\"control-label\" for=\"inputPassword\">{{\"Password\"|trans}}</label>
  275.                 <input type=\"password\" name=\"password\" id=\"inputPassword\" placeholder=\"{{'Enter Password'|trans}}\" class=\"form-control\" required>
  276.             </div>
  277.             <div class=\"remember\">
  278.                 <div class=\"row\">
  279.                     <div class=\"col-md-6\">
  280.                         <div class=\"form-check\">
  281.                             <input class=\"form-check-input\" type=\"checkbox\" name=\"_remember_me\" id=\"customControlInline\">
  282.                             <label class=\"form-check-label\" for=\"customControlInline\">
  283.                                 {{'Remember Me'|trans}}
  284.                             </label>
  285.                         </div>
  286.                     </div>
  287.                     <div class=\"col-md-6\">
  288.                         <a href=\"{{ path('front.app_forgot_password_request') }}\" class=\"forgot\">{{'Forgot my Password'|trans}}</a>
  289.                     </div>
  290.                 </div>
  291.             </div>
  292.             <button class=\"btn btn-lg btn-primary full-width\" type=\"submit\">{{'Login'|trans}}</button>
  293.             <input type=\"hidden\" name=\"_csrf_token\"
  294.                    value=\"{{ csrf_token('authenticate') }}\"
  295.             >
  296.         </div>
  297.         <p>{{'Vous navez pas de compte'|trans}} ?  <br>
  298.             <a href=\"#\" onclick=\"\$('a#profile-tab').tab('show');\" style=\"color:#b8232d !important\">{{'Créer mon compte maintenant'|trans}}</a>  
  299.         </p>
  300.     </form>
  301.     
  302. </div>
  303. <div class=\"tab-pane fade\" id=\"profile\" role=\"tabpanel\" aria-labelledby=\"profile-tab\">
  304.     {{ render(controller('App\\\\Controller\\\\Front\\\\RegistrationController::register')) }}
  305. </div>
  306. {% endblock %}
  307. {% block addJs %}
  308.     <script>
  309.         \$('.form-register').each(function () {
  310.             let form = \$(this);
  311.             form.submit(function () {
  312.                 \$(this).find('button[type=\"submit\"]').attr('disabled', 'disabled');
  313.             });
  314.             form.ajaxForm(function(response, sta, xhr, \$form) {
  315.                 form.find('button[type=\"submit\"]').attr('disabled', false);
  316.                 if (200 === xhr.status && -1 === response.indexOf('<!DOCTYPE html>')) {
  317.                     form.html(response);
  318.                     form.find('button[type=\"submit\"]').attr('disabled', false);
  319.                 } else {
  320.                     location.reload();
  321.                 }
  322.             });
  323.         });
  324.     </script>
  325. {% endblock %}
  326. ""front/security/login.html.twig""/srv/www/bm_dev_new/templates/front/security/login.html.twig");
  327.     }
  328. }