<?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;
/* front/security/login.html.twig */
class __TwigTemplate_e77e6c84a991435e2c44cc6ca4147a5da963aff34c2b7f3ede0d817ed73f7a59 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'leftButton' => [$this, 'block_leftButton'],
'card' => [$this, 'block_card'],
'addJs' => [$this, 'block_addJs'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "front/security/base.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/security/login.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/security/login.html.twig"));
$this->parent = $this->loadTemplate("front/security/base.html.twig", "front/security/login.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 3
public function block_title($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
echo "BikingMan";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 5
public function block_leftButton($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "leftButton"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "leftButton"));
// line 6
echo " <a href=\"#\" onclick=\"\$('a#profile-tab').tab('show');\" class=\"btn btn-md btn-primary big-text-btn\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Créer mon compte"), "html", null, true);
echo "</a>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 9
public function block_card($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "card"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "card"));
// line 10
echo "<div class=\"tab-pane fade show active\" id=\"login\" role=\"tabpanel\" aria-labelledby=\"login-tab\">
<div class=\"title h6\">";
// line 11
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Login to your Account"), "html", null, true);
echo "</div>
<form class=\"content\" method=\"post\">
<div class=\"row\">
";
// line 15
if ((isset($context["error"]) || array_key_exists("error", $context) ? $context["error"] : (function () { throw new RuntimeError('Variable "error" does not exist.', 15, $this->source); })())) {
// line 16
echo " <div class=\"alert alert-danger\">";
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", false, false, false, 16), 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", false, false, false, 16), "security"), "html", null, true);
echo "</div>
";
}
// line 18
echo "
";
// line 19
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", false, false, false, 19)) {
// line 20
echo " <div class=\"mb-3\">
<p>
";
// line 22
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("You are logged in as"), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, 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.', 22, $this->source); })()), "user", [], "any", false, false, false, 22), "username", [], "any", false, false, false, 22), "html", null, true);
echo ", <a href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_logout");
echo "\">Logout</a>
</p>
</div>
";
}
// line 26
echo " <div class=\"form-group label-floating\">
<label class=\"control-label\" for=\"inputUsername\">Email</label>
<input type=\"text\" value=\"";
// line 28
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", null, true);
echo "\" placeholder=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Enter Email"), "html", null, true);
echo "\" name=\"username\" id=\"inputUsername\" class=\"form-control\" required autofocus>
</div>
<div class=\"form-group label-floating\">
<label class=\"control-label\" for=\"inputPassword\">";
// line 32
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Password"), "html", null, true);
echo "</label>
<input type=\"password\" name=\"password\" id=\"inputPassword\" placeholder=\"";
// line 33
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Enter Password"), "html", null, true);
echo "\" class=\"form-control\" required>
</div>
<div class=\"remember\">
<div class=\"row\">
<div class=\"col-md-6\">
<div class=\"form-check\">
<input class=\"form-check-input\" type=\"checkbox\" name=\"_remember_me\" id=\"customControlInline\">
<label class=\"form-check-label\" for=\"customControlInline\">
";
// line 42
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Remember Me"), "html", null, true);
echo "
</label>
</div>
</div>
<div class=\"col-md-6\">
<a href=\"";
// line 47
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("front.app_forgot_password_request");
echo "\" class=\"forgot\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Forgot my Password"), "html", null, true);
echo "</a>
</div>
</div>
</div>
<button class=\"btn btn-lg btn-primary full-width\" type=\"submit\">";
// line 54
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Login"), "html", null, true);
echo "</button>
<input type=\"hidden\" name=\"_csrf_token\"
value=\"";
// line 60
echo twig_escape_filter($this->env, $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderCsrfToken("authenticate"), "html", null, true);
echo "\"
>
</div>
<p>";
// line 63
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Vous navez pas de compte"), "html", null, true);
echo " ? <br>
<a href=\"#\" onclick=\"\$('a#profile-tab').tab('show');\" style=\"color:#b8232d !important\">";
// line 64
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Créer mon compte maintenant"), "html", null, true);
echo "</a>
</p>
</form>
</div>
<div class=\"tab-pane fade\" id=\"profile\" role=\"tabpanel\" aria-labelledby=\"profile-tab\">
";
// line 73
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\Front\\RegistrationController::register"));
echo "
</div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 78
public function block_addJs($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "addJs"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "addJs"));
// line 79
echo " <script>
\$('.form-register').each(function () {
let form = \$(this);
form.submit(function () {
\$(this).find('button[type=\"submit\"]').attr('disabled', 'disabled');
});
form.ajaxForm(function(response, sta, xhr, \$form) {
form.find('button[type=\"submit\"]').attr('disabled', false);
if (200 === xhr.status && -1 === response.indexOf('<!DOCTYPE html>')) {
form.html(response);
form.find('button[type=\"submit\"]').attr('disabled', false);
} else {
location.reload();
}
});
});
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "front/security/login.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{% extends 'front/security/base.html.twig' %}
{% block title %}BikingMan{% endblock %}
{% block leftButton %}
<a href=\"#\" onclick=\"\$('a#profile-tab').tab('show');\" class=\"btn btn-md btn-primary big-text-btn\">{{'Créer mon compte'|trans}}</a>
{% endblock %}
{% block card %}
<div class=\"tab-pane fade show active\" id=\"login\" role=\"tabpanel\" aria-labelledby=\"login-tab\">
<div class=\"title h6\">{{'Login to your Account'|trans}}</div>
<form class=\"content\" method=\"post\">
<div class=\"row\">
{% if error %}
<div class=\"alert alert-danger\">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
{% endif %}
{% if app.user %}
<div class=\"mb-3\">
<p>
{{'You are logged in as'|trans}} {{ app.user.username }}, <a href=\"{{ path('app_logout') }}\">Logout</a>
</p>
</div>
{% endif %}
<div class=\"form-group label-floating\">
<label class=\"control-label\" for=\"inputUsername\">Email</label>
<input type=\"text\" value=\"{{ last_username }}\" placeholder=\"{{'Enter Email'|trans}}\" name=\"username\" id=\"inputUsername\" class=\"form-control\" required autofocus>
</div>
<div class=\"form-group label-floating\">
<label class=\"control-label\" for=\"inputPassword\">{{\"Password\"|trans}}</label>
<input type=\"password\" name=\"password\" id=\"inputPassword\" placeholder=\"{{'Enter Password'|trans}}\" class=\"form-control\" required>
</div>
<div class=\"remember\">
<div class=\"row\">
<div class=\"col-md-6\">
<div class=\"form-check\">
<input class=\"form-check-input\" type=\"checkbox\" name=\"_remember_me\" id=\"customControlInline\">
<label class=\"form-check-label\" for=\"customControlInline\">
{{'Remember Me'|trans}}
</label>
</div>
</div>
<div class=\"col-md-6\">
<a href=\"{{ path('front.app_forgot_password_request') }}\" class=\"forgot\">{{'Forgot my Password'|trans}}</a>
</div>
</div>
</div>
<button class=\"btn btn-lg btn-primary full-width\" type=\"submit\">{{'Login'|trans}}</button>
<input type=\"hidden\" name=\"_csrf_token\"
value=\"{{ csrf_token('authenticate') }}\"
>
</div>
<p>{{'Vous navez pas de compte'|trans}} ? <br>
<a href=\"#\" onclick=\"\$('a#profile-tab').tab('show');\" style=\"color:#b8232d !important\">{{'Créer mon compte maintenant'|trans}}</a>
</p>
</form>
</div>
<div class=\"tab-pane fade\" id=\"profile\" role=\"tabpanel\" aria-labelledby=\"profile-tab\">
{{ render(controller('App\\\\Controller\\\\Front\\\\RegistrationController::register')) }}
</div>
{% endblock %}
{% block addJs %}
<script>
\$('.form-register').each(function () {
let form = \$(this);
form.submit(function () {
\$(this).find('button[type=\"submit\"]').attr('disabled', 'disabled');
});
form.ajaxForm(function(response, sta, xhr, \$form) {
form.find('button[type=\"submit\"]').attr('disabled', false);
if (200 === xhr.status && -1 === response.indexOf('<!DOCTYPE html>')) {
form.html(response);
form.find('button[type=\"submit\"]').attr('disabled', false);
} else {
location.reload();
}
});
});
</script>
{% endblock %}
", "front/security/login.html.twig", "/srv/www/bm_dev_new/templates/front/security/login.html.twig");
}
}