var/cache/dev/twig/19/193166093586f5ae91d62a93d98fcf0f.php line 92

Open in your IDE?
  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. /* registration/register.html.twig */
  16. class __TwigTemplate_0f6bc640edefd47ff3951ea73acbbdaf 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.             'stylesheets' => [$this'block_stylesheets'],
  30.             'body' => [$this'block_body'],
  31.             'javascripts' => [$this'block_javascripts'],
  32.         ];
  33.     }
  34.     protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  35.     {
  36.         // line 1
  37.         return "base_home.html.twig";
  38.     }
  39.     protected function doDisplay(array $context, array $blocks = []): iterable
  40.     {
  41.         $macros $this->macros;
  42.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  43.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""registration/register.html.twig"));
  44.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  45.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""registration/register.html.twig"));
  46.         $this->parent $this->load("base_home.html.twig"1);
  47.         yield from $this->parent->unwrap()->yield($contextarray_merge($this->blocks$blocks));
  48.         
  49.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  50.         
  51.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  52.     }
  53.     // line 3
  54.     /**
  55.      * @return iterable<null|scalar|\Stringable>
  56.      */
  57.     public function block_title(array $context, array $blocks = []): iterable
  58.     {
  59.         $macros $this->macros;
  60.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  61.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  62.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  63.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  64.         yield "Inscription | MaketOu";
  65.         
  66.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  67.         
  68.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  69.         yield from [];
  70.     }
  71.     // line 5
  72.     /**
  73.      * @return iterable<null|scalar|\Stringable>
  74.      */
  75.     public function block_stylesheets(array $context, array $blocks = []): iterable
  76.     {
  77.         $macros $this->macros;
  78.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  79.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  80.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  81.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  82.         // line 6
  83.         yield "    ";
  84.         yield from $this->yieldParentBlock("stylesheets"$context$blocks);
  85.         yield "
  86.     <link rel=\"stylesheet\" href=\"";
  87.         // line 7
  88.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("css/modern-password-field.css"), "html"nulltrue);
  89.         yield "\">
  90. ";
  91.         
  92.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  93.         
  94.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  95.         yield from [];
  96.     }
  97.     // line 10
  98.     /**
  99.      * @return iterable<null|scalar|\Stringable>
  100.      */
  101.     public function block_body(array $context, array $blocks = []): iterable
  102.     {
  103.         $macros $this->macros;
  104.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  105.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  106.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  107.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  108.         // line 11
  109.         yield "
  110.     <!-- Start Banner Area -->
  111.     <section class=\"banner-area organic-breadcrumb\">
  112.         <div class=\"container\">
  113.             <div class=\"breadcrumb-banner d-flex flex-wrap align-items-center justify-content-end\">
  114.                 <div class=\"col-first\">
  115.                     <h1>Inscription</h1>
  116.                     <nav class=\"d-flex align-items-center\">
  117.                         <a href=\"";
  118.         // line 19
  119.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("ui_home");
  120.         yield "\">Accueil<span class=\"lnr lnr-arrow-right\"></span></a>
  121.                         <a href=\"javascript:void(0)\">Inscription</a>
  122.                     </nav>
  123.                 </div>
  124.             </div>
  125.         </div>
  126.     </section>
  127.     <!-- End Banner Area -->
  128.     ";
  129.         // line 28
  130.         $context['_parent'] = $context;
  131.         $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env$this->source, ($context["app"] ?? null), "flashes", ["verify_email_error"], "method"falsefalsefalse28));
  132.         foreach ($context['_seq'] as $context["_key"] => $context["flash_error"]) {
  133.             // line 29
  134.             yield "        <div class=\"alert alert-danger\" role=\"alert\">";
  135.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["flash_error"], "html"nulltrue);
  136.             yield "</div>
  137.     ";
  138.         }
  139.         $_parent $context['_parent'];
  140.         unset($context['_seq'], $context['_key'], $context['flash_error'], $context['_parent']);
  141.         $context array_intersect_key($context$_parent) + $_parent;
  142.         // line 31
  143.         yield "
  144.     ";
  145.         // line 32
  146.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(($context["registrationForm"] ?? null), 'errors');
  147.         yield "
  148.     <!--================Login Box Area =================-->
  149.     <section class=\"login_box_area section_gap\">
  150.         <div class=\"container\">
  151.             <div class=\"row\">
  152.                 <div class=\"col-lg-6\">
  153.                     <div class=\"login_box_img\">
  154.                         <img class=\"img-fluid\" src=\"";
  155.         // line 41
  156.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("ui/img/login.jpg"), "html"nulltrue);
  157.         yield "\" alt=\"\">
  158.                         <div class=\"hover\">
  159.                             <h4>Vous avez un compte?</h4>
  160.                             <p>Connectez-vous à votre compte pour accéder à vos commandes, suivre vos livraisons et gérer vos préférences personnelles.</p>
  161.                             <a class=\"primary-btn\" href=\"";
  162.         // line 45
  163.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("ui_app_login");
  164.         yield "\">Se connecter</a>
  165.                         </div>
  166.                     </div>
  167.                 </div>
  168.                 <div class=\"col-lg-6\">
  169.                     <div class=\"login_form_inner\">
  170.                         <h3>S'inscrire</h3>
  171.                         ";
  172.         // line 53
  173.         yield         $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock(($context["registrationForm"] ?? null), 'form_start', ["attr" => ["class" => "needs-validation row login_form"]]);
  174.         yield "
  175.                         ";
  176.         // line 54
  177.         if ((($tmp CoreExtension::getAttribute($this->env$this->source, ($context["app"] ?? null), "user", [], "any"falsefalsefalse54)) && $tmp instanceof Markup ? (string) $tmp $tmp)) {
  178.             // line 55
  179.             yield "                            <div class=\"mb-3\">
  180.                                 Vous êtes connecté comme ";
  181.             // line 56
  182.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, ($context["app"] ?? null), "user", [], "any"falsefalsefalse56), "userIdentifier", [], "any"falsefalsefalse56), "html"nulltrue);
  183.             yield ", <a
  184.                                         href=\"";
  185.             // line 57
  186.             yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("ui_app_logout");
  187.             yield "\">Déconnexion</a>
  188.                             </div>
  189.                         ";
  190.         }
  191.         // line 60
  192.         yield "
  193.                         <div class=\"col-md-12 form-group\">
  194.                             ";
  195.         // line 62
  196.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, ($context["registrationForm"] ?? null), "email", [], "any"falsefalsefalse62), 'label', ["label_attr" => ["class" => "form-label"], "label" => "Email"]);
  197.         yield "
  198.                             ";
  199.         // line 63
  200.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, ($context["registrationForm"] ?? null), "email", [], "any"falsefalsefalse63), 'widget', ["attr" => ["class" => "form-control""placeholder" => "email@example.com""onfocus" => "this.placeholder = ''""onblur" => "this.placeholder = 'email@example.com'""id" => "registration_email"]]);
  201.         yield "
  202.                             ";
  203.         // line 64
  204.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, ($context["registrationForm"] ?? null), "email", [], "any"falsefalsefalse64), 'errors');
  205.         yield "
  206.                             <small class=\"form-text text-muted email-validation-message\"></small>
  207.                         </div>
  208.                         <div class=\"col-md-12 form-group\">
  209.                             ";
  210.         // line 68
  211.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, ($context["registrationForm"] ?? null), "plainPassword", [], "any"falsefalsefalse68), 'label', ["label_attr" => ["class" => "form-label"], "label" => "Mot de passe"]);
  212.         yield "
  213.                             <div class=\"modern-password-group\" style=\"position: relative;\">
  214.                                 ";
  215.         // line 70
  216.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, ($context["registrationForm"] ?? null), "plainPassword", [], "any"falsefalsefalse70), 'widget', ["attr" => ["class" => "form-control modern-password""placeholder" => "Votre mot de passe""onfocus" => "this.placeholder = ''""onblur" => "this.placeholder = 'Votre mot de passe'""id" => "registration_password""autocomplete" => "new-password""style" => "padding-right: 55px; background-color: white !important;"]]);
  217.         yield "
  218.                                 <button type=\"button\" class=\"eye-toggle\" title=\"Afficher le mot de passe\" aria-pressed=\"false\" style=\"position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: none; background: transparent; cursor: pointer; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 0; color: #777;\">
  219.                                     <svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" style=\"width: 24px; height: 24px; display: block; color: inherit;\">
  220.                                         <defs>
  221.                                             <mask id=\"eye-open\">
  222.                                                 <path d=\"M1 12 C1 12 5 4 12 4 19 4 23 12 23 12 23 14.66 23 17.32 23 20 19.32 20 15.66 20 12 20 8.33 20 4.66 20 1 20 1 17.32 1 14.66 1 12 z\" fill=\"#D9D9D9\" stroke=\"black\" stroke-width=\"1.5\" stroke-linejoin=\"round\"></path>
  223.                                             </mask>
  224.                                             <mask id=\"eye-closed\">
  225.                                                 <path d=\"M1 12C1 12 5 20 12 20C19 20 23 12 23 12V20H12H1V12Z\" fill=\"#D9D9D9\"></path>
  226.                                             </mask>
  227.                                         </defs>
  228.                                         <path class=\"lid lid--upper\" d=\"M1 12 C1 12 5 4 12 4 19 4 23 12 23 12 \" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>
  229.                                         <path class=\"lid lid--lower\" d=\"M1 12C1 12 5 20 12 20C19 20 23 12 23 12\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>
  230.                                         <g mask=\"url(#eye-open)\">
  231.                                             <g class=\"eye\">
  232.                                                 <circle cy=\"12\" cx=\"12\" r=\"4\" fill=\"currentColor\"></circle>
  233.                                                 <circle cy=\"11\" cx=\"13\" r=\"1\" fill=\"black\"></circle>
  234.                                             </g>
  235.                                         </g>
  236.                                     </svg>
  237.                                     <span class=\"sr-only\">Afficher</span>
  238.                                 </button>
  239.                             </div>
  240.                             ";
  241.         // line 93
  242.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, ($context["registrationForm"] ?? null), "plainPassword", [], "any"falsefalsefalse93), 'errors');
  243.         yield "
  244.                             <small class=\"form-text text-muted password-validation-message\"></small>
  245.                             <div class=\"password-strength mt-2\" style=\"display: none;\">
  246.                                 <div class=\"progress\" style=\"height: 5px;\">
  247.                                     <div class=\"progress-bar\" role=\"progressbar\" style=\"width: 0%\"></div>
  248.                                 </div>
  249.                                 <small class=\"strength-text\"></small>
  250.                             </div>
  251.                         </div>
  252.                         <div class=\"col-md-12 form-group\">
  253.                             <div class=\"creat_account\">
  254.                                 ";
  255.         // line 104
  256.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, ($context["registrationForm"] ?? null), "agreeTerms", [], "any"falsefalsefalse104), 'widget');
  257.         yield "
  258.                                 ";
  259.         // line 105
  260.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, ($context["registrationForm"] ?? null), "agreeTerms", [], "any"falsefalsefalse105), 'label', ["label" => "Accepte les conditions"]);
  261.         yield "
  262.                                 ";
  263.         // line 106
  264.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, ($context["registrationForm"] ?? null), "agreeTerms", [], "any"falsefalsefalse106), 'errors');
  265.         yield "
  266.                             </div>
  267.                         </div>
  268.                         <div class=\"col-md-12 form-group\">
  269.                             <button class=\"primary-btn\" type=\"submit\">
  270.                                 S'inscrire
  271.                             </button>
  272.                             <a href=\"";
  273.         // line 114
  274.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("ui_app_login");
  275.         yield "\">Déjà un compte? <b>Se connecter</b></a>
  276.                         </div>
  277.                         ";
  278.         // line 117
  279.         yield         $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock(($context["registrationForm"] ?? null), 'form_end');
  280.         yield "
  281.                     </div>
  282.                 </div>
  283.             </div>
  284.         </div>
  285.     </section>
  286. ";
  287.         
  288.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  289.         
  290.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  291.         yield from [];
  292.     }
  293.     // line 125
  294.     /**
  295.      * @return iterable<null|scalar|\Stringable>
  296.      */
  297.     public function block_javascripts(array $context, array $blocks = []): iterable
  298.     {
  299.         $macros $this->macros;
  300.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  301.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  302.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  303.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  304.         // line 126
  305.         yield "    ";
  306.         yield from $this->yieldParentBlock("javascripts"$context$blocks);
  307.         yield "
  308.     <script>
  309.     // Load GSAP standard (now 100% free with all plugins included as of April 2025)
  310.     (function() {
  311.         const GSAP_TIMEOUT = 5000; // 5 seconds timeout
  312.         let gsapLoaded = false;
  313.         
  314.         // Load GSAP standard package (includes all plugins)
  315.         const gsapScript = document.createElement('script');
  316.         gsapScript.src = 'https://cdn.jsdelivr.net/npm/gsap@3.12.5/dist/gsap.min.js';
  317.         gsapScript.async = true;
  318.         gsapScript.onload = function() {
  319.             gsapLoaded = true;
  320.             console.log('[GSAP] Standard package loaded successfully');
  321.             // Load password field script after GSAP is loaded
  322.             setTimeout(loadPasswordFieldScript, 100);
  323.         };
  324.         gsapScript.onerror = function() {
  325.             console.warn('[GSAP] Failed to load, using fallback');
  326.             loadPasswordFieldScript();
  327.         };
  328.         
  329.         // Timeout fallback
  330.         setTimeout(function() {
  331.             if (!gsapLoaded) {
  332.                 console.warn('[GSAP] Timeout loading GSAP, using fallback');
  333.                 loadPasswordFieldScript();
  334.             }
  335.         }, GSAP_TIMEOUT);
  336.         
  337.         document.head.appendChild(gsapScript);
  338.         
  339.         function loadPasswordFieldScript() {
  340.             const script = document.createElement('script');
  341.             script.src = '";
  342.         // line 160
  343.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("js/modern-password-field.js"), "html"nulltrue);
  344.         yield "';
  345.             script.async = true;
  346.             document.head.appendChild(script);
  347.         }
  348.     })();
  349.     </script>
  350. <script>
  351. document.addEventListener('DOMContentLoaded', function() {
  352.     const emailInput = document.getElementById('registration_email');
  353.     const passwordInput = document.getElementById('registration_password');
  354.     const emailMessage = document.querySelector('.email-validation-message');
  355.     const passwordMessage = document.querySelector('.password-validation-message');
  356.     const passwordStrength = document.querySelector('.password-strength');
  357.     const progressBar = passwordStrength.querySelector('.progress-bar');
  358.     const strengthText = passwordStrength.querySelector('.strength-text');
  359.     const registrationForm = document.querySelector('.needs-validation');
  360.     
  361.     // Validation email en temps réel
  362.     if (emailInput) {
  363.         emailInput.addEventListener('blur', function() {
  364.             validateEmail(this.value);
  365.         });
  366.         
  367.         emailInput.addEventListener('input', function() {
  368.             if (this.value.length > 0) {
  369.                 validateEmail(this.value);
  370.             } else {
  371.                 emailMessage.textContent = '';
  372.                 emailMessage.className = 'form-text text-muted email-validation-message';
  373.             }
  374.         });
  375.     }
  376.     
  377.     // Validation mot de passe en temps réel
  378.     if (passwordInput) {
  379.         passwordInput.addEventListener('input', function() {
  380.             validatePassword(this.value);
  381.         });
  382.         
  383.         passwordInput.addEventListener('blur', function() {
  384.             if (this.value.length > 0) {
  385.                 validatePassword(this.value);
  386.             }
  387.         });
  388.     }
  389.     
  390.     function validateEmail(email) {
  391.         const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}\$/;
  392.         
  393.         if (!email) {
  394.             emailMessage.textContent = '';
  395.             emailMessage.className = 'form-text text-muted email-validation-message';
  396.             return false;
  397.         }
  398.         
  399.         if (!emailRegex.test(email)) {
  400.             emailMessage.textContent = 'Format d\\'email invalide. Exemple: exemple@domaine.com';
  401.             emailMessage.className = 'form-text text-danger email-validation-message';
  402.             emailInput.classList.add('is-invalid');
  403.             emailInput.classList.remove('is-valid');
  404.             return false;
  405.         }
  406.         
  407.         // Vérifier les domaines invalides communs
  408.         const invalidDomains = ['test.com', 'example.com', 'invalid.com'];
  409.         const domain = email.split('@')[1];
  410.         if (invalidDomains.includes(domain)) {
  411.             emailMessage.textContent = 'Veuillez utiliser une adresse email valide.';
  412.             emailMessage.className = 'form-text text-danger email-validation-message';
  413.             emailInput.classList.add('is-invalid');
  414.             emailInput.classList.remove('is-valid');
  415.             return false;
  416.         }
  417.         
  418.         emailMessage.textContent = '✓ Adresse email valide';
  419.         emailMessage.className = 'form-text text-success email-validation-message';
  420.         emailInput.classList.remove('is-invalid');
  421.         emailInput.classList.add('is-valid');
  422.         return true;
  423.     }
  424.     
  425.     function validatePassword(password) {
  426.         const minLength = 8;
  427.         const hasUpperCase = /[A-Z]/.test(password);
  428.         const hasLowerCase = /[a-z]/.test(password);
  429.         const hasNumber = /\\d/.test(password);
  430.         const hasSpecialChar = /[!@#\$%^&*(),.?\":{}|<>]/.test(password);
  431.         
  432.         if (!password) {
  433.             passwordMessage.textContent = '';
  434.             passwordMessage.className = 'form-text text-muted password-validation-message';
  435.             passwordStrength.style.display = 'none';
  436.             return false;
  437.         }
  438.         
  439.         let messages = [];
  440.         let strength = 0;
  441.         
  442.         if (password.length >= minLength) {
  443.             strength += 25;
  444.         } else {
  445.             messages.push(`Au moins \${minLength} caractères`);
  446.         }
  447.         
  448.         if (hasUpperCase) {
  449.             strength += 25;
  450.         } else {
  451.             messages.push('Une majuscule');
  452.         }
  453.         
  454.         if (hasLowerCase) {
  455.             strength += 25;
  456.         } else {
  457.             messages.push('Une minuscule');
  458.         }
  459.         
  460.         if (hasNumber) {
  461.             strength += 25;
  462.         } else {
  463.             messages.push('Un chiffre');
  464.         }
  465.         
  466.         // Bonus pour caractère spécial
  467.         if (hasSpecialChar) {
  468.             strength = Math.min(100, strength + 10);
  469.         }
  470.         
  471.         // Mettre à jour la barre de progression
  472.         progressBar.style.width = strength + '%';
  473.         
  474.         if (strength < 50) {
  475.             progressBar.className = 'progress-bar bg-danger';
  476.             strengthText.textContent = 'Faible';
  477.             strengthText.className = 'strength-text text-danger';
  478.         } else if (strength < 75) {
  479.             progressBar.className = 'progress-bar bg-warning';
  480.             strengthText.textContent = 'Moyen';
  481.             strengthText.className = 'strength-text text-warning';
  482.         } else {
  483.             progressBar.className = 'progress-bar bg-success';
  484.             strengthText.textContent = 'Fort';
  485.             strengthText.className = 'strength-text text-success';
  486.         }
  487.         
  488.         passwordStrength.style.display = 'block';
  489.         
  490.         if (messages.length > 0) {
  491.             passwordMessage.textContent = 'Le mot de passe doit contenir: ' + messages.join(', ');
  492.             passwordMessage.className = 'form-text text-danger password-validation-message';
  493.             passwordInput.classList.add('is-invalid');
  494.             passwordInput.classList.remove('is-valid');
  495.             return false;
  496.         } else {
  497.             passwordMessage.textContent = '✓ Mot de passe valide';
  498.             passwordMessage.className = 'form-text text-success password-validation-message';
  499.             passwordInput.classList.remove('is-invalid');
  500.             passwordInput.classList.add('is-valid');
  501.             return true;
  502.         }
  503.     }
  504.     
  505.     // Validation avant soumission
  506.     if (registrationForm) {
  507.         registrationForm.addEventListener('submit', function(e) {
  508.             const emailValid = validateEmail(emailInput.value);
  509.             const passwordValid = validatePassword(passwordInput.value);
  510.             
  511.             if (!emailValid || !passwordValid) {
  512.                 e.preventDefault();
  513.                 e.stopPropagation();
  514.                 
  515.                 if (!emailValid) {
  516.                     emailInput.focus();
  517.                 } else if (!passwordValid) {
  518.                     passwordInput.focus();
  519.                 }
  520.             }
  521.             
  522.             registrationForm.classList.add('was-validated');
  523.         });
  524.     }
  525. });
  526. </script>
  527. ";
  528.         
  529.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  530.         
  531.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  532.         yield from [];
  533.     }
  534.     /**
  535.      * @codeCoverageIgnore
  536.      */
  537.     public function getTemplateName(): string
  538.     {
  539.         return "registration/register.html.twig";
  540.     }
  541.     /**
  542.      * @codeCoverageIgnore
  543.      */
  544.     public function isTraitable(): bool
  545.     {
  546.         return false;
  547.     }
  548.     /**
  549.      * @codeCoverageIgnore
  550.      */
  551.     public function getDebugInfo(): array
  552.     {
  553.         return array (  378 => 160,  340 => 126,  327 => 125,  309 => 117,  303 => 114,  292 => 106,  288 => 105,  284 => 104,  270 => 93,  244 => 70,  239 => 68,  232 => 64,  228 => 63,  224 => 62,  220 => 60,  214 => 57,  210 => 56,  207 => 55,  205 => 54,  201 => 53,  190 => 45,  183 => 41,  171 => 32,  168 => 31,  159 => 29,  155 => 28,  143 => 19,  133 => 11,  120 => 10,  107 => 7,  102 => 6,  89 => 5,  66 => 3,  43 => 1,);
  554.     }
  555.     public function getSourceContext(): Source
  556.     {
  557.         return new Source("{% extends 'base_home.html.twig' %}
  558. {% block title %}Inscription | MaketOu{% endblock %}
  559. {% block stylesheets %}
  560.     {{ parent() }}
  561.     <link rel=\"stylesheet\" href=\"{{ asset('css/modern-password-field.css') }}\">
  562. {% endblock %}
  563. {% block body %}
  564.     <!-- Start Banner Area -->
  565.     <section class=\"banner-area organic-breadcrumb\">
  566.         <div class=\"container\">
  567.             <div class=\"breadcrumb-banner d-flex flex-wrap align-items-center justify-content-end\">
  568.                 <div class=\"col-first\">
  569.                     <h1>Inscription</h1>
  570.                     <nav class=\"d-flex align-items-center\">
  571.                         <a href=\"{{ path('ui_home') }}\">Accueil<span class=\"lnr lnr-arrow-right\"></span></a>
  572.                         <a href=\"javascript:void(0)\">Inscription</a>
  573.                     </nav>
  574.                 </div>
  575.             </div>
  576.         </div>
  577.     </section>
  578.     <!-- End Banner Area -->
  579.     {% for flash_error in app.flashes('verify_email_error') %}
  580.         <div class=\"alert alert-danger\" role=\"alert\">{{ flash_error }}</div>
  581.     {% endfor %}
  582.     {{ form_errors(registrationForm) }}
  583.     <!--================Login Box Area =================-->
  584.     <section class=\"login_box_area section_gap\">
  585.         <div class=\"container\">
  586.             <div class=\"row\">
  587.                 <div class=\"col-lg-6\">
  588.                     <div class=\"login_box_img\">
  589.                         <img class=\"img-fluid\" src=\"{{ asset('ui/img/login.jpg') }}\" alt=\"\">
  590.                         <div class=\"hover\">
  591.                             <h4>Vous avez un compte?</h4>
  592.                             <p>Connectez-vous à votre compte pour accéder à vos commandes, suivre vos livraisons et gérer vos préférences personnelles.</p>
  593.                             <a class=\"primary-btn\" href=\"{{ path('ui_app_login') }}\">Se connecter</a>
  594.                         </div>
  595.                     </div>
  596.                 </div>
  597.                 <div class=\"col-lg-6\">
  598.                     <div class=\"login_form_inner\">
  599.                         <h3>S'inscrire</h3>
  600.                         {{ form_start(registrationForm, {'attr': {'class': 'needs-validation row login_form'}}) }}
  601.                         {% if app.user %}
  602.                             <div class=\"mb-3\">
  603.                                 Vous êtes connecté comme {{ app.user.userIdentifier }}, <a
  604.                                         href=\"{{ path('ui_app_logout') }}\">Déconnexion</a>
  605.                             </div>
  606.                         {% endif %}
  607.                         <div class=\"col-md-12 form-group\">
  608.                             {{ form_label(registrationForm.email, 'Email', {'label_attr': {'class': 'form-label'}}) }}
  609.                             {{ form_widget(registrationForm.email, {'attr': {'class': 'form-control', 'placeholder': 'email@example.com', 'onfocus':\"this.placeholder = ''\", 'onblur':\"this.placeholder = 'email@example.com'\", 'id': 'registration_email'}}) }}
  610.                             {{ form_errors(registrationForm.email) }}
  611.                             <small class=\"form-text text-muted email-validation-message\"></small>
  612.                         </div>
  613.                         <div class=\"col-md-12 form-group\">
  614.                             {{ form_label(registrationForm.plainPassword, 'Mot de passe', {'label_attr': {'class': 'form-label'}}) }}
  615.                             <div class=\"modern-password-group\" style=\"position: relative;\">
  616.                                 {{ form_widget(registrationForm.plainPassword, {'attr': {'class': 'form-control modern-password', 'placeholder': 'Votre mot de passe', 'onfocus':\"this.placeholder = ''\", 'onblur':\"this.placeholder = 'Votre mot de passe'\", 'id': 'registration_password', 'autocomplete': 'new-password', 'style': 'padding-right: 55px; background-color: white !important;'}}) }}
  617.                                 <button type=\"button\" class=\"eye-toggle\" title=\"Afficher le mot de passe\" aria-pressed=\"false\" style=\"position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: none; background: transparent; cursor: pointer; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 0; color: #777;\">
  618.                                     <svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" style=\"width: 24px; height: 24px; display: block; color: inherit;\">
  619.                                         <defs>
  620.                                             <mask id=\"eye-open\">
  621.                                                 <path d=\"M1 12 C1 12 5 4 12 4 19 4 23 12 23 12 23 14.66 23 17.32 23 20 19.32 20 15.66 20 12 20 8.33 20 4.66 20 1 20 1 17.32 1 14.66 1 12 z\" fill=\"#D9D9D9\" stroke=\"black\" stroke-width=\"1.5\" stroke-linejoin=\"round\"></path>
  622.                                             </mask>
  623.                                             <mask id=\"eye-closed\">
  624.                                                 <path d=\"M1 12C1 12 5 20 12 20C19 20 23 12 23 12V20H12H1V12Z\" fill=\"#D9D9D9\"></path>
  625.                                             </mask>
  626.                                         </defs>
  627.                                         <path class=\"lid lid--upper\" d=\"M1 12 C1 12 5 4 12 4 19 4 23 12 23 12 \" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>
  628.                                         <path class=\"lid lid--lower\" d=\"M1 12C1 12 5 20 12 20C19 20 23 12 23 12\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>
  629.                                         <g mask=\"url(#eye-open)\">
  630.                                             <g class=\"eye\">
  631.                                                 <circle cy=\"12\" cx=\"12\" r=\"4\" fill=\"currentColor\"></circle>
  632.                                                 <circle cy=\"11\" cx=\"13\" r=\"1\" fill=\"black\"></circle>
  633.                                             </g>
  634.                                         </g>
  635.                                     </svg>
  636.                                     <span class=\"sr-only\">Afficher</span>
  637.                                 </button>
  638.                             </div>
  639.                             {{ form_errors(registrationForm.plainPassword) }}
  640.                             <small class=\"form-text text-muted password-validation-message\"></small>
  641.                             <div class=\"password-strength mt-2\" style=\"display: none;\">
  642.                                 <div class=\"progress\" style=\"height: 5px;\">
  643.                                     <div class=\"progress-bar\" role=\"progressbar\" style=\"width: 0%\"></div>
  644.                                 </div>
  645.                                 <small class=\"strength-text\"></small>
  646.                             </div>
  647.                         </div>
  648.                         <div class=\"col-md-12 form-group\">
  649.                             <div class=\"creat_account\">
  650.                                 {{ form_widget(registrationForm.agreeTerms) }}
  651.                                 {{ form_label(registrationForm.agreeTerms, 'Accepte les conditions') }}
  652.                                 {{ form_errors(registrationForm.agreeTerms) }}
  653.                             </div>
  654.                         </div>
  655.                         <div class=\"col-md-12 form-group\">
  656.                             <button class=\"primary-btn\" type=\"submit\">
  657.                                 S'inscrire
  658.                             </button>
  659.                             <a href=\"{{ path('ui_app_login') }}\">Déjà un compte? <b>Se connecter</b></a>
  660.                         </div>
  661.                         {{ form_end(registrationForm) }}
  662.                     </div>
  663.                 </div>
  664.             </div>
  665.         </div>
  666.     </section>
  667. {% endblock %}
  668. {% block javascripts %}
  669.     {{ parent() }}
  670.     <script>
  671.     // Load GSAP standard (now 100% free with all plugins included as of April 2025)
  672.     (function() {
  673.         const GSAP_TIMEOUT = 5000; // 5 seconds timeout
  674.         let gsapLoaded = false;
  675.         
  676.         // Load GSAP standard package (includes all plugins)
  677.         const gsapScript = document.createElement('script');
  678.         gsapScript.src = 'https://cdn.jsdelivr.net/npm/gsap@3.12.5/dist/gsap.min.js';
  679.         gsapScript.async = true;
  680.         gsapScript.onload = function() {
  681.             gsapLoaded = true;
  682.             console.log('[GSAP] Standard package loaded successfully');
  683.             // Load password field script after GSAP is loaded
  684.             setTimeout(loadPasswordFieldScript, 100);
  685.         };
  686.         gsapScript.onerror = function() {
  687.             console.warn('[GSAP] Failed to load, using fallback');
  688.             loadPasswordFieldScript();
  689.         };
  690.         
  691.         // Timeout fallback
  692.         setTimeout(function() {
  693.             if (!gsapLoaded) {
  694.                 console.warn('[GSAP] Timeout loading GSAP, using fallback');
  695.                 loadPasswordFieldScript();
  696.             }
  697.         }, GSAP_TIMEOUT);
  698.         
  699.         document.head.appendChild(gsapScript);
  700.         
  701.         function loadPasswordFieldScript() {
  702.             const script = document.createElement('script');
  703.             script.src = '{{ asset('js/modern-password-field.js') }}';
  704.             script.async = true;
  705.             document.head.appendChild(script);
  706.         }
  707.     })();
  708.     </script>
  709. <script>
  710. document.addEventListener('DOMContentLoaded', function() {
  711.     const emailInput = document.getElementById('registration_email');
  712.     const passwordInput = document.getElementById('registration_password');
  713.     const emailMessage = document.querySelector('.email-validation-message');
  714.     const passwordMessage = document.querySelector('.password-validation-message');
  715.     const passwordStrength = document.querySelector('.password-strength');
  716.     const progressBar = passwordStrength.querySelector('.progress-bar');
  717.     const strengthText = passwordStrength.querySelector('.strength-text');
  718.     const registrationForm = document.querySelector('.needs-validation');
  719.     
  720.     // Validation email en temps réel
  721.     if (emailInput) {
  722.         emailInput.addEventListener('blur', function() {
  723.             validateEmail(this.value);
  724.         });
  725.         
  726.         emailInput.addEventListener('input', function() {
  727.             if (this.value.length > 0) {
  728.                 validateEmail(this.value);
  729.             } else {
  730.                 emailMessage.textContent = '';
  731.                 emailMessage.className = 'form-text text-muted email-validation-message';
  732.             }
  733.         });
  734.     }
  735.     
  736.     // Validation mot de passe en temps réel
  737.     if (passwordInput) {
  738.         passwordInput.addEventListener('input', function() {
  739.             validatePassword(this.value);
  740.         });
  741.         
  742.         passwordInput.addEventListener('blur', function() {
  743.             if (this.value.length > 0) {
  744.                 validatePassword(this.value);
  745.             }
  746.         });
  747.     }
  748.     
  749.     function validateEmail(email) {
  750.         const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}\$/;
  751.         
  752.         if (!email) {
  753.             emailMessage.textContent = '';
  754.             emailMessage.className = 'form-text text-muted email-validation-message';
  755.             return false;
  756.         }
  757.         
  758.         if (!emailRegex.test(email)) {
  759.             emailMessage.textContent = 'Format d\\'email invalide. Exemple: exemple@domaine.com';
  760.             emailMessage.className = 'form-text text-danger email-validation-message';
  761.             emailInput.classList.add('is-invalid');
  762.             emailInput.classList.remove('is-valid');
  763.             return false;
  764.         }
  765.         
  766.         // Vérifier les domaines invalides communs
  767.         const invalidDomains = ['test.com', 'example.com', 'invalid.com'];
  768.         const domain = email.split('@')[1];
  769.         if (invalidDomains.includes(domain)) {
  770.             emailMessage.textContent = 'Veuillez utiliser une adresse email valide.';
  771.             emailMessage.className = 'form-text text-danger email-validation-message';
  772.             emailInput.classList.add('is-invalid');
  773.             emailInput.classList.remove('is-valid');
  774.             return false;
  775.         }
  776.         
  777.         emailMessage.textContent = '✓ Adresse email valide';
  778.         emailMessage.className = 'form-text text-success email-validation-message';
  779.         emailInput.classList.remove('is-invalid');
  780.         emailInput.classList.add('is-valid');
  781.         return true;
  782.     }
  783.     
  784.     function validatePassword(password) {
  785.         const minLength = 8;
  786.         const hasUpperCase = /[A-Z]/.test(password);
  787.         const hasLowerCase = /[a-z]/.test(password);
  788.         const hasNumber = /\\d/.test(password);
  789.         const hasSpecialChar = /[!@#\$%^&*(),.?\":{}|<>]/.test(password);
  790.         
  791.         if (!password) {
  792.             passwordMessage.textContent = '';
  793.             passwordMessage.className = 'form-text text-muted password-validation-message';
  794.             passwordStrength.style.display = 'none';
  795.             return false;
  796.         }
  797.         
  798.         let messages = [];
  799.         let strength = 0;
  800.         
  801.         if (password.length >= minLength) {
  802.             strength += 25;
  803.         } else {
  804.             messages.push(`Au moins \${minLength} caractères`);
  805.         }
  806.         
  807.         if (hasUpperCase) {
  808.             strength += 25;
  809.         } else {
  810.             messages.push('Une majuscule');
  811.         }
  812.         
  813.         if (hasLowerCase) {
  814.             strength += 25;
  815.         } else {
  816.             messages.push('Une minuscule');
  817.         }
  818.         
  819.         if (hasNumber) {
  820.             strength += 25;
  821.         } else {
  822.             messages.push('Un chiffre');
  823.         }
  824.         
  825.         // Bonus pour caractère spécial
  826.         if (hasSpecialChar) {
  827.             strength = Math.min(100, strength + 10);
  828.         }
  829.         
  830.         // Mettre à jour la barre de progression
  831.         progressBar.style.width = strength + '%';
  832.         
  833.         if (strength < 50) {
  834.             progressBar.className = 'progress-bar bg-danger';
  835.             strengthText.textContent = 'Faible';
  836.             strengthText.className = 'strength-text text-danger';
  837.         } else if (strength < 75) {
  838.             progressBar.className = 'progress-bar bg-warning';
  839.             strengthText.textContent = 'Moyen';
  840.             strengthText.className = 'strength-text text-warning';
  841.         } else {
  842.             progressBar.className = 'progress-bar bg-success';
  843.             strengthText.textContent = 'Fort';
  844.             strengthText.className = 'strength-text text-success';
  845.         }
  846.         
  847.         passwordStrength.style.display = 'block';
  848.         
  849.         if (messages.length > 0) {
  850.             passwordMessage.textContent = 'Le mot de passe doit contenir: ' + messages.join(', ');
  851.             passwordMessage.className = 'form-text text-danger password-validation-message';
  852.             passwordInput.classList.add('is-invalid');
  853.             passwordInput.classList.remove('is-valid');
  854.             return false;
  855.         } else {
  856.             passwordMessage.textContent = '✓ Mot de passe valide';
  857.             passwordMessage.className = 'form-text text-success password-validation-message';
  858.             passwordInput.classList.remove('is-invalid');
  859.             passwordInput.classList.add('is-valid');
  860.             return true;
  861.         }
  862.     }
  863.     
  864.     // Validation avant soumission
  865.     if (registrationForm) {
  866.         registrationForm.addEventListener('submit', function(e) {
  867.             const emailValid = validateEmail(emailInput.value);
  868.             const passwordValid = validatePassword(passwordInput.value);
  869.             
  870.             if (!emailValid || !passwordValid) {
  871.                 e.preventDefault();
  872.                 e.stopPropagation();
  873.                 
  874.                 if (!emailValid) {
  875.                     emailInput.focus();
  876.                 } else if (!passwordValid) {
  877.                     passwordInput.focus();
  878.                 }
  879.             }
  880.             
  881.             registrationForm.classList.add('was-validated');
  882.         });
  883.     }
  884. });
  885. </script>
  886. {% endblock %}
  887. ""registration/register.html.twig""/home/u540977899/domains/maketou-ht.com/public_html/templates/registration/register.html.twig");
  888.     }
  889. }