<?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;
/* acoa/security/login.html.twig */
class __TwigTemplate_e2c976afab2411b9ef683c733f13072c extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'content' => [$this, 'block_content'],
'javascripts' => [$this, 'block_javascripts'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "base.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "acoa/security/login.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "acoa/security/login.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "acoa/security/login.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 2
public function block_title($context, array $blocks = [])
{
$macros = $this->macros;
$__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 "Inscription";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 3
public function block_content($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 4
echo "<div id=\"maininscription\">
<!-- CONTAINER -->
<div class=\"w-full pt-16 pb-6\">
<div id=\"boxincription\" class=\"bg-white maxWidthM w-11/12 mt-10 mb-16 ml-auto mr-auto text-white\">
<!-- box left -->
<div id=\"boxleft\" class=\"h-fit float-left pt-16 pl-4 pr-4 lg:pl-10 lg:pr-10 bg-header-lgblue Poppins\">
<!--<div id=\"toptitle\" class=\"text-xl font-bold\">ACOA</div>-->
<!--<div class=\"mb-12 text-xs\">Votre partenaire Conseil et Formation en Guadeloupe, Martinique et Guyane</div>-->
<div class=\"text-xl font-bold\">Authentification</div>
<div class=\"text-xs mb-12\">Vous avez déjà un compte, authentifiez vous</div>
<div id=\"loginForm\" class=\"boxLogin boxIpuntM mb-10\">
<form method=\"post\">
<div class=\"heightForm\">
";
// line 17
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(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.', 17, $this->source); })()), "flashes", [0 => "success"], "method", false, false, false, 17));
foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
// line 18
echo " <div class=\"bg-green-100 border border-green-400 text-green-700 text-sm px-4 py-3 rounded relative\" role=\"alert\">
<span class=\"block sm:inline\">";
// line 19
echo twig_escape_filter($this->env, $context["message"], "html", null, true);
echo "</span>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['message'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 22
echo " <div class=\"blockHeight\">
<label for=\"inputEmail\">Email utilisateur*</label> <br />
";
// line 24
if (( !(null === (isset($context["_email"]) || array_key_exists("_email", $context) ? $context["_email"] : (function () { throw new RuntimeError('Variable "_email" does not exist.', 24, $this->source); })())) && ((isset($context["exist"]) || array_key_exists("exist", $context) ? $context["exist"] : (function () { throw new RuntimeError('Variable "exist" does not exist.', 24, $this->source); })()) == 1))) {
// line 25
echo " <input class=\"border pl-2 rounded-lg w-full h-6\" placeholder=\"Email utilisateur\"
type=\"email\" value=\"";
// line 26
echo twig_escape_filter($this->env, (isset($context["_email"]) || array_key_exists("_email", $context) ? $context["_email"] : (function () { throw new RuntimeError('Variable "_email" does not exist.', 26, $this->source); })()), "html", null, true);
echo "\" name=\"email\" id=\"inputEmail\"
class=\"form-control\" autocomplete=\"email\" required autofocus readonly>
";
} else {
// line 29
echo " <input class=\"border pl-2 rounded-lg w-full h-6\" placeholder=\"Email utilisateur\"
type=\"email\" value=\"";
// line 30
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.', 30, $this->source); })()), "html", null, true);
echo "\" name=\"email\" id=\"inputEmail\"
class=\"form-control\" autocomplete=\"email\" required autofocus>
";
}
// line 33
echo " </div>
<div class=\"mt-4 text-xs\">
<label for=\"inputPassword\">Mot de passe*</label>
<div class=\"input-eye relative\">
<input class=\"border pl-2 rounded-lg w-full h-6\" placeholder=\"Mot de passe\"
type=\"password\" name=\"password\" id=\"inputPassword\" class=\"form-control\"
autocomplete=\"current-password\" required>
<i class=\"fa-solid fa-eye\"></i>
</div>
<input type=\"hidden\" name=\"_csrf_token\" value=\"";
// line 42
echo twig_escape_filter($this->env, $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderCsrfToken("authenticate"), "html", null, true);
echo "\">
</div>
";
// line 44
if ((isset($context["error"]) || array_key_exists("error", $context) ? $context["error"] : (function () { throw new RuntimeError('Variable "error" does not exist.', 44, $this->source); })())) {
// line 45
echo " <div class=\"bg-red-100 border border-red-400 text-red-700 text-sm px-4 py-3 rounded relative\" role=\"alert\">
<span class=\"block sm:inline\">";
// line 46
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.', 46, $this->source); })()), "messageKey", [], "any", false, false, false, 46), 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.', 46, $this->source); })()), "messageData", [], "any", false, false, false, 46), "security"), "html", null, true);
echo "</span>
</div>
";
}
// line 49
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(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.', 49, $this->source); })()), "flashes", [0 => "alert"], "method", false, false, false, 49));
foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
// line 50
echo " <div class=\"bg-red-100 border border-red-400 text-red-700 text-sm px-4 py-3 rounded relative\" role=\"alert\">
<span class=\"block sm:inline\">";
// line 51
echo twig_escape_filter($this->env, $context["message"], "html", null, true);
echo "</span>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['message'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 54
echo " </div>
<div class=\"button mt-16\">
<button class=\"buttonM rounded-full text-center font-bold text-white pt-2 pb-2 w-full text-sm\"
type=\"submit\">Authentifier</button>
</div>
<div class=\"mt-4\">
<a class=\"text-xs aHover\" href=\"";
// line 60
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("forgot_password");
echo "\"><span>Mot de passe oublié ?</span></a>
</div>
<label>
<input type=\"checkbox\" class=\"mt-4 checkboxM\" name=\"_remember_me\"/>
Se souvenir de moi
</label>
</form>
</div>
</div>
<!-- box Right -->
<div id=\"boxright\" class=\"h-full float-right pt-16 pl-4 pr-4 lg:pl-10 lg:pr-10 relative text-black text-sm Poppins\">
<div id=\"toptitle\" class=\"text-xl font-bold\">Inscription</div>
<div class=\"text-xs mb-12\">Inscrivez-vous pour commencer</div>
<div class=\"w-full boxIpuntM\">
";
// line 74
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\RegistrationController::register"));
// line 76
echo "
</div>
</div>
<div class=\"clear-both\"></div>
</div>
</div>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 84
public function block_javascripts($context, array $blocks = [])
{
$macros = $this->macros;
$__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 85
$this->displayParentBlock("javascripts", $context, $blocks);
echo "
<script type=\"application/javascript\">
document.querySelector(\"#alert-pwd-length\").hidden = true;
document.querySelector(\"#alert-pwd-not-same\").hidden = true;
var isSubmitable = true;
/**
* Vérifie la longueur du 1er mot de passe et affiche un message d'erreur si < 6 caractères.
*/
const checkLength = (e) => {
if(e.currentTarget.value.length < 6) {
document.querySelector(\"#alert-pwd-length\").hidden = false;
isSubmitable = false;
}
else {
document.querySelector(\"#alert-pwd-length\").hidden = true;
isSubmitable = true;
}
};
/**
* Vérifie si le formulaire est correct :
* Compare les 2 mots de passe et bloque le submit si différent.
* Bloque la validation si erreur.
*/
const checkFormRegister = (e) => {
document.querySelector(\"#alert-pwd-not-same\").hidden = true;
let pass1 = document.querySelector(\"#registration_form_plainPassword\").value;
let pass2 = document.querySelector(\"#registration_form_plainPasswordConfirm\").value;
if(pass1 != pass2 ) {
e.preventDefault();
document.querySelector(\"#alert-pwd-not-same\").hidden = false;
}
if(!isSubmitable) {
e.preventDefault();
}
};
document
.querySelector(\"#registration_form_plainPassword\")
.addEventListener(\"keyup\", checkLength);
document
.querySelector(\"#form-register\")
.addEventListener(\"submit\", checkFormRegister);
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "acoa/security/login.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 242 => 85, 232 => 84, 215 => 76, 213 => 74, 196 => 60, 188 => 54, 179 => 51, 176 => 50, 171 => 49, 165 => 46, 162 => 45, 160 => 44, 155 => 42, 144 => 33, 138 => 30, 135 => 29, 129 => 26, 126 => 25, 124 => 24, 120 => 22, 111 => 19, 108 => 18, 104 => 17, 89 => 4, 79 => 3, 60 => 2, 37 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'base.html.twig' %}
{% block title %}Inscription{% endblock %}
{% block content %}
<div id=\"maininscription\">
<!-- CONTAINER -->
<div class=\"w-full pt-16 pb-6\">
<div id=\"boxincription\" class=\"bg-white maxWidthM w-11/12 mt-10 mb-16 ml-auto mr-auto text-white\">
<!-- box left -->
<div id=\"boxleft\" class=\"h-fit float-left pt-16 pl-4 pr-4 lg:pl-10 lg:pr-10 bg-header-lgblue Poppins\">
<!--<div id=\"toptitle\" class=\"text-xl font-bold\">ACOA</div>-->
<!--<div class=\"mb-12 text-xs\">Votre partenaire Conseil et Formation en Guadeloupe, Martinique et Guyane</div>-->
<div class=\"text-xl font-bold\">Authentification</div>
<div class=\"text-xs mb-12\">Vous avez déjà un compte, authentifiez vous</div>
<div id=\"loginForm\" class=\"boxLogin boxIpuntM mb-10\">
<form method=\"post\">
<div class=\"heightForm\">
{% for message in app.flashes('success') %}
<div class=\"bg-green-100 border border-green-400 text-green-700 text-sm px-4 py-3 rounded relative\" role=\"alert\">
<span class=\"block sm:inline\">{{ message }}</span>
</div>
{% endfor %}
<div class=\"blockHeight\">
<label for=\"inputEmail\">Email utilisateur*</label> <br />
{% if _email is not null and exist==1 %}
<input class=\"border pl-2 rounded-lg w-full h-6\" placeholder=\"Email utilisateur\"
type=\"email\" value=\"{{ _email }}\" name=\"email\" id=\"inputEmail\"
class=\"form-control\" autocomplete=\"email\" required autofocus readonly>
{% else %}
<input class=\"border pl-2 rounded-lg w-full h-6\" placeholder=\"Email utilisateur\"
type=\"email\" value=\"{{ last_username }}\" name=\"email\" id=\"inputEmail\"
class=\"form-control\" autocomplete=\"email\" required autofocus>
{% endif %}
</div>
<div class=\"mt-4 text-xs\">
<label for=\"inputPassword\">Mot de passe*</label>
<div class=\"input-eye relative\">
<input class=\"border pl-2 rounded-lg w-full h-6\" placeholder=\"Mot de passe\"
type=\"password\" name=\"password\" id=\"inputPassword\" class=\"form-control\"
autocomplete=\"current-password\" required>
<i class=\"fa-solid fa-eye\"></i>
</div>
<input type=\"hidden\" name=\"_csrf_token\" value=\"{{ csrf_token('authenticate') }}\">
</div>
{% if error %}
<div class=\"bg-red-100 border border-red-400 text-red-700 text-sm px-4 py-3 rounded relative\" role=\"alert\">
<span class=\"block sm:inline\">{{ error.messageKey|trans(error.messageData, 'security') }}</span>
</div>
{% endif %}
{% for message in app.flashes('alert') %}
<div class=\"bg-red-100 border border-red-400 text-red-700 text-sm px-4 py-3 rounded relative\" role=\"alert\">
<span class=\"block sm:inline\">{{ message }}</span>
</div>
{% endfor %}
</div>
<div class=\"button mt-16\">
<button class=\"buttonM rounded-full text-center font-bold text-white pt-2 pb-2 w-full text-sm\"
type=\"submit\">Authentifier</button>
</div>
<div class=\"mt-4\">
<a class=\"text-xs aHover\" href=\"{{ path('forgot_password') }}\"><span>Mot de passe oublié ?</span></a>
</div>
<label>
<input type=\"checkbox\" class=\"mt-4 checkboxM\" name=\"_remember_me\"/>
Se souvenir de moi
</label>
</form>
</div>
</div>
<!-- box Right -->
<div id=\"boxright\" class=\"h-full float-right pt-16 pl-4 pr-4 lg:pl-10 lg:pr-10 relative text-black text-sm Poppins\">
<div id=\"toptitle\" class=\"text-xl font-bold\">Inscription</div>
<div class=\"text-xs mb-12\">Inscrivez-vous pour commencer</div>
<div class=\"w-full boxIpuntM\">
{{ render(controller(
'App\\\\Controller\\\\RegistrationController::register'
)) }}
</div>
</div>
<div class=\"clear-both\"></div>
</div>
</div>
</div>
{% endblock %}
{% block javascripts %}
{{ parent()}}
<script type=\"application/javascript\">
document.querySelector(\"#alert-pwd-length\").hidden = true;
document.querySelector(\"#alert-pwd-not-same\").hidden = true;
var isSubmitable = true;
/**
* Vérifie la longueur du 1er mot de passe et affiche un message d'erreur si < 6 caractères.
*/
const checkLength = (e) => {
if(e.currentTarget.value.length < 6) {
document.querySelector(\"#alert-pwd-length\").hidden = false;
isSubmitable = false;
}
else {
document.querySelector(\"#alert-pwd-length\").hidden = true;
isSubmitable = true;
}
};
/**
* Vérifie si le formulaire est correct :
* Compare les 2 mots de passe et bloque le submit si différent.
* Bloque la validation si erreur.
*/
const checkFormRegister = (e) => {
document.querySelector(\"#alert-pwd-not-same\").hidden = true;
let pass1 = document.querySelector(\"#registration_form_plainPassword\").value;
let pass2 = document.querySelector(\"#registration_form_plainPasswordConfirm\").value;
if(pass1 != pass2 ) {
e.preventDefault();
document.querySelector(\"#alert-pwd-not-same\").hidden = false;
}
if(!isSubmitable) {
e.preventDefault();
}
};
document
.querySelector(\"#registration_form_plainPassword\")
.addEventListener(\"keyup\", checkLength);
document
.querySelector(\"#form-register\")
.addEventListener(\"submit\", checkFormRegister);
</script>
{% endblock %}", "acoa/security/login.html.twig", "/var/www/html/acoa/templates/acoa/security/login.html.twig");
}
}