var/cache/dev/twig/c0/c025c33106f27d6daa3c2e7a55ae5424.php line 514

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. /* user/register.html.twig */
  16. class __TwigTemplate_302839696e59bd92de9e3abbbb0ac127 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.             'fos_user_title' => [$this'block_fos_user_title'],
  29.             'fos_user_content' => [$this'block_fos_user_content'],
  30.             'fos_user_script' => [$this'block_fos_user_script'],
  31.         ];
  32.     }
  33.     protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  34.     {
  35.         // line 1
  36.         return "base_security.html.twig";
  37.     }
  38.     protected function doDisplay(array $context, array $blocks = []): iterable
  39.     {
  40.         $macros $this->macros;
  41.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  42.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""user/register.html.twig"));
  43.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  44.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""user/register.html.twig"));
  45.         $this->parent $this->loadTemplate("base_security.html.twig""user/register.html.twig"1);
  46.         yield from $this->parent->unwrap()->yield($contextarray_merge($this->blocks$blocks));
  47.         
  48.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  49.         
  50.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  51.     }
  52.     // line 3
  53.     /**
  54.      * @return iterable<null|scalar|\Stringable>
  55.      */
  56.     public function block_fos_user_title(array $context, array $blocks = []): iterable
  57.     {
  58.         $macros $this->macros;
  59.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  60.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""fos_user_title"));
  61.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  62.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""fos_user_title"));
  63.         // line 4
  64.         yield "  <h4 class=\"auth-header text-center\" style=\"font-weight: 600; color: #2c3e50; margin-bottom: 0;\">";
  65.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("title.new_user_account"), "html"nulltrue);
  66.         yield "</h4>
  67. ";
  68.         
  69.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  70.         
  71.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  72.         yield from [];
  73.     }
  74.     // line 7
  75.     /**
  76.      * @return iterable<null|scalar|\Stringable>
  77.      */
  78.     public function block_fos_user_content(array $context, array $blocks = []): iterable
  79.     {
  80.         $macros $this->macros;
  81.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  82.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""fos_user_content"));
  83.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  84.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""fos_user_content"));
  85.         // line 8
  86.         yield "    <style>
  87.         .auth-box-w {
  88.             background: white;
  89.             border-radius: 16px;
  90.             padding: 25px;
  91.             box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  92.             transition: transform 0.3s ease, box-shadow 0.3s ease;
  93.         }
  94.         
  95.         .auth-box-w:hover {
  96.             box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
  97.         }
  98.         
  99.         .form-container {
  100.             max-width: 380px;
  101.             margin: 0 auto;
  102.         }
  103.         img {
  104.             width: 35px;
  105.             transition: transform 0.3s ease;
  106.         }
  107.         
  108.         img:hover {
  109.             transform: scale(1.05);
  110.         }
  111.         
  112.         /* Header avec Langue */
  113.         .header-separator {
  114.             display: flex;
  115.             justify-content: space-between;
  116.             align-items: center;
  117.             margin-bottom: 20px;
  118.             padding-bottom: 12px;
  119.             border-bottom: 2px solid #e8ecf1;
  120.         }
  121.         
  122.         .header-separator h4 {
  123.             background: linear-gradient(135deg, #1976d2, #0d47a1);
  124.             -webkit-background-clip: text;
  125.             background-clip: text;
  126.             color: transparent;
  127.         }
  128.         
  129.         .language-selector {
  130.             display: flex;
  131.             align-items: center;
  132.             gap: 8px;
  133.         }
  134.         
  135.         .language-selector label {
  136.             margin: 0;
  137.             color: #666;
  138.             font-size: 12px;
  139.             font-weight: 500;
  140.         }
  141.         
  142.         .language-selector select {
  143.             padding: 4px 8px;
  144.             border: 1px solid #e0e4e8;
  145.             border-radius: 6px;
  146.             background: #fafbfc;
  147.             font-size: 12px;
  148.             cursor: pointer;
  149.             transition: all 0.2s ease;
  150.         }
  151.         
  152.         .language-selector select:hover {
  153.             border-color: #1976d2;
  154.             background: white;
  155.         }
  156.         
  157.         .form-group {
  158.             margin-bottom: 14px;
  159.         }
  160.         
  161.         .form-group label {
  162.             display: block;
  163.             margin-bottom: 5px;
  164.             font-weight: 600;
  165.             color: #2c3e50;
  166.             font-size: 12px;
  167.             letter-spacing: 0.3px;
  168.         }
  169.         
  170.         .form-control, .custom-select {
  171.             width: 100%;
  172.             padding: 8px 12px;
  173.             border: 1.5px solid #e8ecf1;
  174.             border-radius: 8px;
  175.             font-size: 13px;
  176.             transition: all 0.3s ease;
  177.             background: #fafbfc;
  178.             font-family: inherit;
  179.         }
  180.         
  181.         .form-control:hover, .custom-select:hover {
  182.             border-color: #bdc3c7;
  183.             background: white;
  184.         }
  185.         
  186.         .form-control:focus, .custom-select:focus {
  187.             outline: none;
  188.             border-color: #1976d2;
  189.             background: white;
  190.             box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
  191.         }
  192.         
  193.         select.form-control, select.custom-select {
  194.             appearance: none;
  195.             background-image: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23666\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"6 9 12 15 18 9\"></polyline></svg>');
  196.             background-repeat: no-repeat;
  197.             background-position: right 10px center;
  198.             background-size: 10px;
  199.         }
  200.         
  201.         /* Groupe téléphone */
  202.         .phone-group {
  203.             display: flex;
  204.             gap: 8px;
  205.             align-items: center;
  206.         }
  207.         
  208.         .phone-prefix {
  209.             width: 70px;
  210.             flex-shrink: 0;
  211.         }
  212.         
  213.         .phone-prefix input {
  214.             text-align: center;
  215.             background: #f0f2f5;
  216.             border: 1.5px solid #e8ecf1;
  217.             font-weight: 600;
  218.             color: #1976d2;
  219.         }
  220.         
  221.         .phone-number {
  222.             flex: 1;
  223.         }
  224.         
  225.         .phone-hint {
  226.             font-size: 10px;
  227.             color: #95a5a6;
  228.             margin-top: 4px;
  229.             display: flex;
  230.             align-items: center;
  231.             gap: 4px;
  232.         }
  233.         
  234.         .phone-hint::before {
  235.             content: \"💡\";
  236.             font-size: 10px;
  237.         }
  238.         
  239.         /* Ligne de séparation */
  240.         .separator {
  241.             height: 1px;
  242.             background: linear-gradient(90deg, transparent, #e0e4e8, transparent);
  243.             margin: 18px 0;
  244.         }
  245.         
  246.         /* Boutons */
  247.         .buttons-group {
  248.             display: flex;
  249.             gap: 12px;
  250.             margin-top: 18px;
  251.         }
  252.         
  253.         .btn {
  254.             flex: 1;
  255.             padding: 9px;
  256.             border: none;
  257.             border-radius: 8px;
  258.             font-size: 13px;
  259.             font-weight: 600;
  260.             cursor: pointer;
  261.             transition: all 0.3s ease;
  262.             text-align: center;
  263.             text-decoration: none;
  264.             display: inline-block;
  265.             letter-spacing: 0.5px;
  266.         }
  267.         
  268.         .btn-primary {
  269.             background: linear-gradient(135deg, #1976d2, #0d47a1);
  270.             color: white;
  271.             box-shadow: 0 2px 4px rgba(25, 118, 210, 0.2);
  272.         }
  273.         
  274.         .btn-primary:hover {
  275.             transform: translateY(-2px);
  276.             box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
  277.             background: linear-gradient(135deg, #1e88e5, #1565c0);
  278.         }
  279.         
  280.         .btn-primary:active {
  281.             transform: translateY(0);
  282.         }
  283.         
  284.         .btn-secondary {
  285.             background: white;
  286.             color: #666;
  287.             border: 1.5px solid #e0e4e8;
  288.         }
  289.         
  290.         .btn-secondary:hover {
  291.             background: #f8f9fa;
  292.             border-color: #1976d2;
  293.             color: #1976d2;
  294.             transform: translateY(-2px);
  295.         }
  296.         
  297.         /* Alertes */
  298.         .alert {
  299.             border-radius: 8px;
  300.             padding: 10px 12px;
  301.             margin-bottom: 15px;
  302.             border: none;
  303.             font-size: 12px;
  304.             display: flex;
  305.             align-items: center;
  306.             gap: 8px;
  307.         }
  308.         
  309.         .alert-danger {
  310.             background: linear-gradient(135deg, #fee, #fdd);
  311.             color: #c33;
  312.             border-left: 4px solid #c33;
  313.         }
  314.         
  315.         .text-danger {
  316.             color: #e74c3c;
  317.         }
  318.         
  319.         .help-block {
  320.             font-size: 10px;
  321.             margin-top: 3px;
  322.             display: flex;
  323.             align-items: center;
  324.             gap: 4px;
  325.         }
  326.         
  327.         .help-block::before {
  328.             
  329.             font-size: 9px;
  330.         }
  331.         
  332.         /* Footer logos */
  333.         .footer-logos {
  334.             margin-top: 18px;
  335.             padding-top: 15px;
  336.             border-top: 1px solid #e8ecf1;
  337.             text-align: center;
  338.         }
  339.         
  340.         .footer-logos span {
  341.             display: block;
  342.             color: #95a5a6;
  343.             font-size: 10px;
  344.             margin-bottom: 10px;
  345.             font-weight: 500;
  346.         }
  347.         
  348.         .logos-container {
  349.             display: flex;
  350.             justify-content: center;
  351.             gap: 20px;
  352.             flex-wrap: wrap;
  353.             align-items: center;
  354.         }
  355.         
  356.         .logos-container a {
  357.             display: inline-block;
  358.             line-height: 0;
  359.             transition: transform 0.3s ease;
  360.         }
  361.         
  362.         .logos-container a:hover {
  363.             transform: translateY(-2px);
  364.         }
  365.         
  366.         .logos-container img {
  367.             width: 32px !important;
  368.             height: auto !important;
  369.             max-width: 32px;
  370.             opacity: 0.6;
  371.             transition: all 0.3s ease;
  372.             border-radius: 6px;
  373.             filter: grayscale(0.2);
  374.         }
  375.         
  376.         .logos-container img:hover {
  377.             opacity: 1;
  378.             filter: grayscale(0);
  379.         }
  380.         
  381.         /* Diaspora container */
  382.         .diaspora-container {
  383.             background: linear-gradient(135deg, #f8f9fa, #f1f3f5);
  384.             border-radius: 8px;
  385.             padding: 10px 12px;
  386.             margin-top: 5px;
  387.             border: 1px solid #e8ecf1;
  388.         }
  389.         
  390.         .diaspora-container label {
  391.             margin-bottom: 6px;
  392.             font-size: 11px;
  393.             color: #2c3e50;
  394.         }
  395.         
  396.         /* Ligne pour mot de passe */
  397.         .password-row {
  398.             display: flex;
  399.             gap: 12px;
  400.             margin-bottom: 14px;
  401.         }
  402.         
  403.         .password-col {
  404.             flex: 1;
  405.         }
  406.         
  407.         .password-col .form-group {
  408.             margin-bottom: 0;
  409.         }
  410.         
  411.         /* Champ avec icône */
  412.         .input-icon {
  413.             position: relative;
  414.         }
  415.         
  416.         /* Checkbox personnalisée */
  417.         .custom-checkbox {
  418.             display: flex;
  419.             align-items: center;
  420.             gap: 8px;
  421.             cursor: pointer;
  422.         }
  423.         
  424.         /* Responsive */
  425.         @media (max-width: 576px) {
  426.             .form-container {
  427.                 max-width: 100%;
  428.                 padding: 0 10px;
  429.             }
  430.             
  431.             .auth-box-w {
  432.                 padding: 20px;
  433.             }
  434.             
  435.             .buttons-group {
  436.                 flex-direction: column;
  437.                 gap: 10px;
  438.             }
  439.             
  440.             .phone-group {
  441.                 flex-direction: column;
  442.                 gap: 8px;
  443.             }
  444.             
  445.             .phone-prefix {
  446.                 width: 100%;
  447.             }
  448.             
  449.             .header-separator {
  450.                 flex-direction: column;
  451.                 gap: 10px;
  452.                 align-items: flex-start;
  453.             }
  454.             
  455.             .password-row {
  456.                 flex-direction: column;
  457.                 gap: 14px;
  458.             }
  459.         }
  460.     </style>
  461.     <div class=\"form-container\">
  462.         ";
  463.         // line 386
  464.         if ((CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'386$this->source); })()), "session", [], "any"falsefalsefalse386), "flashBag", [], "any"falsefalsefalse386), "has", ["danger"], "method"falsefalsefalse386) == true)) {
  465.             // line 387
  466.             yield "            <div class=\"alert alert-danger alert-dismissible fade show\" role=\"alert\">
  467.                 <span>⚠️</span>
  468.                 ";
  469.             // line 389
  470.             $context['_parent'] = $context;
  471.             $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'389$this->source); })()), "session", [], "any"falsefalsefalse389), "flashbag", [], "any"falsefalsefalse389), "get", ["danger"], "method"falsefalsefalse389));
  472.             foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
  473.                 // line 390
  474.                 yield "                    <p class=\"text-center w-100 mb-0\">";
  475.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["message"], "html"nulltrue);
  476.                 yield "</p>
  477.                 ";
  478.             }
  479.             $_parent $context['_parent'];
  480.             unset($context['_seq'], $context['_key'], $context['message'], $context['_parent']);
  481.             $context array_intersect_key($context$_parent) + $_parent;
  482.             // line 392
  483.             yield "                <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\" style=\"margin-left: auto;\">
  484.                     <span aria-hidden=\"true\">&times;</span>
  485.                 </button>
  486.             </div>
  487.         ";
  488.         }
  489.         // line 397
  490.         yield "
  491.         <div class=\"help-block form-text with-errors text-danger\" style=\"margin-bottom: 10px;\">";
  492.         // line 398
  493.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'398$this->source); })()), 'errors');
  494.         yield "</div>
  495.         
  496.         <form id=\"form-register\" action=\"";
  497.         // line 400
  498.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("register_create_account");
  499.         yield "\" method=\"post\" novalidate>
  500.             ";
  501.         // line 401
  502.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'401$this->source); })()), "_token", [], "any"falsefalsefalse401), 'widget');
  503.         yield "
  504.             
  505.             <!-- Header avec Langue -->
  506.             <div class=\"header-separator\">
  507.                 <h4 style=\"margin: 0; font-size: 16px; font-weight: 700;\">📝 ";
  508.         // line 405
  509.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("title.new_user_account"), "html"nulltrue);
  510.         yield "</h4>
  511.                 <div class=\"language-selector\">
  512.                     <label>🌐 ";
  513.         // line 407
  514.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Langue"), "html"nulltrue);
  515.         yield "</label>
  516.                     <select id=\"language-select\">
  517.                         <option value=\"fr\">Français</option>
  518.                         <option value=\"en\">English</option>
  519.                         <option value=\"es\">Español</option>
  520.                     </select>
  521.                 </div>
  522.             </div>
  523.             
  524.             <!-- Type d'utilisateur -->
  525.             <div class=\"form-group\">
  526.                 <label>👤 ";
  527.         // line 418
  528.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.user_type"), "html"nulltrue);
  529.         yield " <span class=\"text-danger\">*</span></label>
  530.                 ";
  531.         // line 419
  532.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'419$this->source); })()), "typePerson", [], "any"falsefalsefalse419), 'widget', ["attr" => ["class" => "form-control""required" => "required"]]);
  533.         yield "
  534.                 <div class=\"help-block text-danger\">";
  535.         // line 420
  536.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'420$this->source); })()), "typePerson", [], "any"falsefalsefalse420), 'errors');
  537.         yield "</div>
  538.             </div>
  539.             
  540.             <!-- Diaspora -->
  541.             <div id=\"diaspora\" class=\"form-group\" style=\"display: none;\">
  542.                 <div class=\"diaspora-container\">
  543.                     <label>🌍 ";
  544.         // line 426
  545.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.diaspora"), "html"nulltrue);
  546.         yield "</label>
  547.                     <div class=\"d-flex align-items-center\">
  548.                         ";
  549.         // line 428
  550.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'428$this->source); })()), "diaspora", [], "any"falsefalsefalse428), 'widget', ["attr" => ["class" => "form-check-input""style" => "margin-right: 8px; width: 16px; height: 16px; cursor: pointer;"]]);
  551.         yield "
  552.                         <span style=\"font-size: 12px;\">";
  553.         // line 429
  554.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::default($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.diaspora_help"), "Êtes-vous membre de la diaspora ?"), "html"nulltrue);
  555.         yield "</span>
  556.                     </div>
  557.                     <div class=\"help-block text-danger\">";
  558.         // line 431
  559.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'431$this->source); })()), "diaspora", [], "any"falsefalsefalse431), 'errors');
  560.         yield "</div>
  561.                 </div>
  562.             </div>
  563.             
  564.             <!-- Région / Pays -->
  565.             <div class=\"form-group\">
  566.                 <label>📍 
  567.                     ";
  568.         // line 438
  569.         if (((isset($context["struct_province_country_city"]) || array_key_exists("struct_province_country_city"$context) ? $context["struct_province_country_city"] : (function () { throw new RuntimeError('Variable "struct_province_country_city" does not exist.'438$this->source); })()) == "true")) {
  570.             // line 439
  571.             yield "                        ";
  572.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.region"), "html"nulltrue);
  573.             yield "
  574.                     ";
  575.         } else {
  576.             // line 441
  577.             yield "                        ";
  578.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.country"), "html"nulltrue);
  579.             yield "
  580.                     ";
  581.         }
  582.         // line 443
  583.         yield "                    <span class=\"text-danger\">*</span>
  584.                 </label>
  585.                 ";
  586.         // line 445
  587.         if (((isset($context["struct_province_country_city"]) || array_key_exists("struct_province_country_city"$context) ? $context["struct_province_country_city"] : (function () { throw new RuntimeError('Variable "struct_province_country_city" does not exist.'445$this->source); })()) == "true")) {
  588.             // line 446
  589.             yield "                    ";
  590.             yield $this->extensions['App\Twig\AppExention']->createTranslatedSelect(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'446$this->source); })()), "region", [], "any"falsefalsefalse446), ["attr" => ["class" => "form-control custom-select""id" => "userbundle_user_region"]]);
  591.             yield "
  592.                     <div class=\"help-block text-danger\">";
  593.             // line 447
  594.             yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'447$this->source); })()), "region", [], "any"falsefalsefalse447), 'errors');
  595.             yield "</div>
  596.                 ";
  597.         } else {
  598.             // line 449
  599.             yield "                    ";
  600.             yield $this->extensions['App\Twig\AppExention']->createTranslatedSelect(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'449$this->source); })()), "country", [], "any"falsefalsefalse449), ["attr" => ["class" => "form-control custom-select""id" => "userbundle_user_country"]]);
  601.             yield "
  602.                     <div class=\"help-block text-danger\">";
  603.             // line 450
  604.             yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'450$this->source); })()), "country", [], "any"falsefalsefalse450), 'errors');
  605.             yield "</div>
  606.                 ";
  607.         }
  608.         // line 452
  609.         yield "            </div>
  610.             
  611.             <!-- Pays de résidence -->
  612.             <div id=\"residenceCountry\" class=\"form-group\" style=\"display: none\">
  613.                 <label>🏠 ";
  614.         // line 456
  615.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.residence_country"), "html"nulltrue);
  616.         yield " <span class=\"text-danger\">*</span></label>
  617.                 ";
  618.         // line 457
  619.         if (((isset($context["struct_province_country_city"]) || array_key_exists("struct_province_country_city"$context) ? $context["struct_province_country_city"] : (function () { throw new RuntimeError('Variable "struct_province_country_city" does not exist.'457$this->source); })()) == "true")) {
  620.             // line 458
  621.             yield "                    ";
  622.             yield $this->extensions['App\Twig\AppExention']->createTranslatedSelect(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'458$this->source); })()), "residenceRegion", [], "any"falsefalsefalse458), ["attr" => ["class" => "form-control custom-select""id" => "residence-select"]]);
  623.             yield "
  624.                     <div class=\"help-block text-danger\">";
  625.             // line 459
  626.             yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'459$this->source); })()), "residenceRegion", [], "any"falsefalsefalse459), 'errors');
  627.             yield "</div>
  628.                 ";
  629.         } else {
  630.             // line 461
  631.             yield "                    ";
  632.             yield $this->extensions['App\Twig\AppExention']->createTranslatedSelect(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'461$this->source); })()), "residenceCountry", [], "any"falsefalsefalse461), ["attr" => ["class" => "form-control custom-select""id" => "residence-select"]]);
  633.             yield "
  634.                     <div class=\"help-block text-danger\">";
  635.             // line 462
  636.             yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'462$this->source); })()), "residenceCountry", [], "any"falsefalsefalse462), 'errors');
  637.             yield "</div>
  638.                 ";
  639.         }
  640.         // line 464
  641.         yield "            </div>
  642.             
  643.             <!-- Téléphone -->
  644.             <div class=\"form-group\">
  645.                 <label>📞 ";
  646.         // line 468
  647.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.phone"), "html"nulltrue);
  648.         yield " : ";
  649.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.phone_indicator"), "html"nulltrue);
  650.         yield " (<span id=\"phone_code\">+XX</span>) + N° <span class=\"text-danger\">*</span></label>
  651.                 <div class=\"phone-group\">
  652.                     <div class=\"phone-prefix\">
  653.                         <input type=\"text\" id=\"phone_prefix_display\" class=\"form-control\" value=\"+XX\" readonly>
  654.                     </div>
  655.                     <div class=\"phone-number\">
  656.                         ";
  657.         // line 474
  658.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'474$this->source); })()), "phone", [], "any"falsefalsefalse474), 'widget', ["attr" => ["class" => "form-control""type" => "tel""required" => "required""placeholder" => "Numéro de téléphone"]]);
  659.         yield "
  660.                     </div>
  661.                 </div>
  662.                 <div class=\"phone-hint\">";
  663.         // line 477
  664.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::default($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.phone_format_hint"), "Exemple: 612345678"), "html"nulltrue);
  665.         yield "</div>
  666.                 <div class=\"help-block text-danger\">";
  667.         // line 478
  668.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'478$this->source); })()), "phone", [], "any"falsefalsefalse478), 'errors');
  669.         yield "</div>
  670.             </div>
  671.             
  672.             <!-- Champs optionnels cachés -->
  673.             <div class=\"form-group\" style=\"display: none\">
  674.                 <label>👤 Pseudo (Optionnel)</label>
  675.                 ";
  676.         // line 484
  677.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'484$this->source); })()), "username", [], "any"falsefalsefalse484), 'widget', ["attr" => ["class" => "form-control"]]);
  678.         yield "
  679.             </div>
  680.             
  681.             <div class=\"form-group\" style=\"display: none\">
  682.                 <label>📧 Email (Optionnel)</label>
  683.                 ";
  684.         // line 489
  685.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'489$this->source); })()), "email", [], "any"falsefalsefalse489), 'widget', ["attr" => ["class" => "form-control""type" => "email"]]);
  686.         yield "
  687.             </div>
  688.             
  689.             <!-- Mot de passe et Confirmation -->
  690.             <div class=\"password-row\">
  691.                 <div class=\"password-col\">
  692.                     <div class=\"form-group\">
  693.                         <label>🔒 ";
  694.         // line 496
  695.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.password"), "html"nulltrue);
  696.         yield " <span class=\"text-danger\">*</span></label>
  697.                         ";
  698.         // line 497
  699.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'497$this->source); })()), "plainPassword", [], "any"falsefalsefalse497), "first", [], "any"falsefalsefalse497), 'widget', ["attr" => ["class" => "form-control""type" => "password""required" => "required""minlength" => "6""placeholder" => "••••••"]]);
  700.         yield "
  701.                         <small class=\"phone-hint\">Minimum 6 caractères</small>
  702.                         <div class=\"help-block text-danger\">";
  703.         // line 499
  704.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'499$this->source); })()), "plainPassword", [], "any"falsefalsefalse499), "first", [], "any"falsefalsefalse499), 'errors');
  705.         yield "</div>
  706.                     </div>
  707.                 </div>
  708.                 <div class=\"password-col\">
  709.                     <div class=\"form-group\">
  710.                         <label>✓ ";
  711.         // line 504
  712.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.confirm"), "html"nulltrue);
  713.         yield " <span class=\"text-danger\">*</span></label>
  714.                         ";
  715.         // line 505
  716.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'505$this->source); })()), "plainPassword", [], "any"falsefalsefalse505), "second", [], "any"falsefalsefalse505), 'widget', ["attr" => ["class" => "form-control""type" => "password""required" => "required""placeholder" => "••••••"]]);
  717.         yield "
  718.                         <div class=\"help-block text-danger\">";
  719.         // line 506
  720.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'506$this->source); })()), "plainPassword", [], "any"falsefalsefalse506), "second", [], "any"falsefalsefalse506), 'errors');
  721.         yield "</div>
  722.                     </div>
  723.                 </div>
  724.             </div>
  725.             
  726.             <!-- Ligne de séparation élégante -->
  727.             <div class=\"separator\"></div>
  728.             
  729.             <!-- Boutons -->
  730.             <div class=\"buttons-group\">
  731.                 <button type=\"submit\" class=\"btn btn-primary\" id=\"submitRegister\">
  732.                     ✓ ";
  733.         // line 517
  734.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.validate"), "html"nulltrue);
  735.         yield "
  736.                 </button>
  737.                 <a href=\"";
  738.         // line 519
  739.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("logout");
  740.         yield "\" class=\"btn btn-secondary\">
  741.                     ✗ ";
  742.         // line 520
  743.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.cancel"), "html"nulltrue);
  744.         yield "
  745.                 </a>
  746.             </div>
  747.             
  748.             <!-- Footer logos -->
  749.             <div class=\"footer-logos\">
  750.                 <span>";
  751.         // line 526
  752.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("footer.dev_by"), "html"nulltrue);
  753.         yield "</span>
  754.                 <div class=\"logos-container\">
  755.                     <a target=\"_blank\" href=\"https://ifef.francophonie.org/\" rel=\"noopener noreferrer\">
  756.                         <img src=\"";
  757.         // line 529
  758.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/pinsuprem/logo_ifef.jpg"), "html"nulltrue);
  759.         yield "\" alt=\"IFEF\" onerror=\"this.style.display='none'\">
  760.                     </a>
  761.                     <a target=\"_blank\" href=\"https://www.francophonie.org/\" rel=\"noopener noreferrer\">
  762.                         <img src=\"";
  763.         // line 532
  764.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/pinsuprem/logo_oif.jpg"), "html"nulltrue);
  765.         yield "\" alt=\"OIF\" onerror=\"this.style.display='none'\">
  766.                     </a>
  767.                 </div>
  768.             </div>
  769.         </form>
  770.     </div>
  771.     
  772.     <select hidden id=\"indTel\">
  773.         ";
  774.         // line 540
  775.         $context['_parent'] = $context;
  776.         $context['_seq'] = CoreExtension::ensureTraversable((isset($context["allCountries"]) || array_key_exists("allCountries"$context) ? $context["allCountries"] : (function () { throw new RuntimeError('Variable "allCountries" does not exist.'540$this->source); })()));
  777.         foreach ($context['_seq'] as $context["_key"] => $context["country"]) {
  778.             // line 541
  779.             yield "            <option value=\"";
  780.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["country"], "id", [], "any"falsefalsefalse541), "html"nulltrue);
  781.             yield "\" data-code=\"";
  782.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["country"], "phoneCode", [], "any"falsefalsefalse541), "html"nulltrue);
  783.             yield "\">";
  784.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["country"], "phoneCode", [], "any"falsefalsefalse541), "html"nulltrue);
  785.             yield "</option>
  786.         ";
  787.         }
  788.         $_parent $context['_parent'];
  789.         unset($context['_seq'], $context['_key'], $context['country'], $context['_parent']);
  790.         $context array_intersect_key($context$_parent) + $_parent;
  791.         // line 543
  792.         yield "    </select>
  793. ";
  794.         
  795.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  796.         
  797.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  798.         yield from [];
  799.     }
  800.     // line 546
  801.     /**
  802.      * @return iterable<null|scalar|\Stringable>
  803.      */
  804.     public function block_fos_user_script(array $context, array $blocks = []): iterable
  805.     {
  806.         $macros $this->macros;
  807.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  808.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""fos_user_script"));
  809.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  810.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""fos_user_script"));
  811.         // line 547
  812.         yield "<script>
  813. \$(document).ready(function() {
  814.     \$('#diaspora').hide();
  815.     \$('#residenceCountry').hide();
  816.     
  817.     if (\$('#userbundle_user_typePerson option:selected').val() == 'ROLE_DIPLOME') {
  818.         \$('#diaspora').show();
  819.     }
  820.     
  821.     updatePhonePrefix();
  822.     
  823.     \$('#userbundle_user_typePerson').on('change', function() {
  824.         if (\$(this).val() == 'ROLE_DIPLOME') {
  825.             \$('#diaspora').slideDown(200);
  826.         } else {
  827.             \$('#userbundle_user_diaspora').prop('checked', false);
  828.             \$('#diaspora').slideUp(200);
  829.             \$('#residenceCountry').slideUp(200);
  830.             updatePhonePrefix();
  831.         }
  832.     });
  833.     
  834.     \$('#userbundle_user_diaspora').on('change', function() {
  835.         if (\$(this).is(':checked')) {
  836.             \$('#residenceCountry').slideDown(200);
  837.             \$('#residence-select').prop('required', true);
  838.         } else {
  839.             \$('#residenceCountry').slideUp(200);
  840.             \$('#residence-select').prop('required', false);
  841.             updatePhonePrefix();
  842.         }
  843.     });
  844.     
  845.     if (\$('#userbundle_user_region').length) {
  846.         \$('#userbundle_user_region').on('change', function() {
  847.             if(!\$('#userbundle_user_diaspora').is(':checked')) {
  848.                 updatePhonePrefix();
  849.             }
  850.         });
  851.     }
  852.     
  853.     if (\$('#userbundle_user_country').length) {
  854.         \$('#userbundle_user_country').on('change', function() {
  855.             if(!\$('#userbundle_user_diaspora').is(':checked')) {
  856.                 updatePhonePrefix();
  857.             }
  858.         });
  859.     }
  860.     
  861.     \$('#residence-select').on('change', function() {
  862.         if(\$('#userbundle_user_diaspora').is(':checked')) {
  863.             updatePhonePrefix();
  864.         }
  865.     });
  866.     
  867.     function updatePhonePrefix() {
  868.         let selectedCountryId = null;
  869.         
  870.         if (\$('#residenceCountry').is(':visible') && \$('#residence-select').val()) {
  871.             selectedCountryId = \$('#residence-select').val();
  872.         } else if (\$('#userbundle_user_region').length && \$('#userbundle_user_region').val()) {
  873.             selectedCountryId = \$('#userbundle_user_region').val();
  874.         } else if (\$('#userbundle_user_country').length && \$('#userbundle_user_country').val()) {
  875.             selectedCountryId = \$('#userbundle_user_country').val();
  876.         }
  877.         
  878.         if (selectedCountryId) {
  879.             let phoneCode = \$('#indTel option[value=\"' + selectedCountryId + '\"]').data('code');
  880.             if (phoneCode) {
  881.                 phoneCode = '+' + phoneCode;
  882.                 \$('#phone_code').text(phoneCode);
  883.                 \$('#phone_prefix_display').val(phoneCode);
  884.             } else {
  885.                 resetPhonePrefix();
  886.             }
  887.         } else {
  888.             resetPhonePrefix();
  889.         }
  890.     }
  891.     
  892.     function resetPhonePrefix() {
  893.         \$('#phone_code').text('+XX');
  894.         \$('#phone_prefix_display').val('+XX');
  895.     }
  896.     
  897.     \$('#language-select').on('change', function() {
  898.         var lang = \$(this).val();
  899.         console.log('Langue changée vers: ' + lang);
  900.     });
  901. });
  902. </script>
  903. ";
  904.         
  905.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  906.         
  907.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  908.         yield from [];
  909.     }
  910.     /**
  911.      * @codeCoverageIgnore
  912.      */
  913.     public function getTemplateName(): string
  914.     {
  915.         return "user/register.html.twig";
  916.     }
  917.     /**
  918.      * @codeCoverageIgnore
  919.      */
  920.     public function isTraitable(): bool
  921.     {
  922.         return false;
  923.     }
  924.     /**
  925.      * @codeCoverageIgnore
  926.      */
  927.     public function getDebugInfo(): array
  928.     {
  929.         return array (  838 => 547,  825 => 546,  813 => 543,  800 => 541,  796 => 540,  785 => 532,  779 => 529,  773 => 526,  764 => 520,  760 => 519,  755 => 517,  741 => 506,  737 => 505,  733 => 504,  725 => 499,  720 => 497,  716 => 496,  706 => 489,  698 => 484,  689 => 478,  685 => 477,  679 => 474,  668 => 468,  662 => 464,  657 => 462,  652 => 461,  647 => 459,  642 => 458,  640 => 457,  636 => 456,  630 => 452,  625 => 450,  620 => 449,  615 => 447,  610 => 446,  608 => 445,  604 => 443,  598 => 441,  592 => 439,  590 => 438,  580 => 431,  575 => 429,  571 => 428,  566 => 426,  557 => 420,  553 => 419,  549 => 418,  535 => 407,  530 => 405,  523 => 401,  519 => 400,  514 => 398,  511 => 397,  504 => 392,  495 => 390,  491 => 389,  487 => 387,  485 => 386,  105 => 8,  92 => 7,  78 => 4,  65 => 3,  42 => 1,);
  930.     }
  931.     public function getSourceContext(): Source
  932.     {
  933.         return new Source("{% extends \"base_security.html.twig\" %}
  934. {% block fos_user_title %}
  935.   <h4 class=\"auth-header text-center\" style=\"font-weight: 600; color: #2c3e50; margin-bottom: 0;\">{{ 'title.new_user_account' | trans }}</h4>
  936. {% endblock fos_user_title %}
  937. {% block fos_user_content %}
  938.     <style>
  939.         .auth-box-w {
  940.             background: white;
  941.             border-radius: 16px;
  942.             padding: 25px;
  943.             box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  944.             transition: transform 0.3s ease, box-shadow 0.3s ease;
  945.         }
  946.         
  947.         .auth-box-w:hover {
  948.             box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
  949.         }
  950.         
  951.         .form-container {
  952.             max-width: 380px;
  953.             margin: 0 auto;
  954.         }
  955.         img {
  956.             width: 35px;
  957.             transition: transform 0.3s ease;
  958.         }
  959.         
  960.         img:hover {
  961.             transform: scale(1.05);
  962.         }
  963.         
  964.         /* Header avec Langue */
  965.         .header-separator {
  966.             display: flex;
  967.             justify-content: space-between;
  968.             align-items: center;
  969.             margin-bottom: 20px;
  970.             padding-bottom: 12px;
  971.             border-bottom: 2px solid #e8ecf1;
  972.         }
  973.         
  974.         .header-separator h4 {
  975.             background: linear-gradient(135deg, #1976d2, #0d47a1);
  976.             -webkit-background-clip: text;
  977.             background-clip: text;
  978.             color: transparent;
  979.         }
  980.         
  981.         .language-selector {
  982.             display: flex;
  983.             align-items: center;
  984.             gap: 8px;
  985.         }
  986.         
  987.         .language-selector label {
  988.             margin: 0;
  989.             color: #666;
  990.             font-size: 12px;
  991.             font-weight: 500;
  992.         }
  993.         
  994.         .language-selector select {
  995.             padding: 4px 8px;
  996.             border: 1px solid #e0e4e8;
  997.             border-radius: 6px;
  998.             background: #fafbfc;
  999.             font-size: 12px;
  1000.             cursor: pointer;
  1001.             transition: all 0.2s ease;
  1002.         }
  1003.         
  1004.         .language-selector select:hover {
  1005.             border-color: #1976d2;
  1006.             background: white;
  1007.         }
  1008.         
  1009.         .form-group {
  1010.             margin-bottom: 14px;
  1011.         }
  1012.         
  1013.         .form-group label {
  1014.             display: block;
  1015.             margin-bottom: 5px;
  1016.             font-weight: 600;
  1017.             color: #2c3e50;
  1018.             font-size: 12px;
  1019.             letter-spacing: 0.3px;
  1020.         }
  1021.         
  1022.         .form-control, .custom-select {
  1023.             width: 100%;
  1024.             padding: 8px 12px;
  1025.             border: 1.5px solid #e8ecf1;
  1026.             border-radius: 8px;
  1027.             font-size: 13px;
  1028.             transition: all 0.3s ease;
  1029.             background: #fafbfc;
  1030.             font-family: inherit;
  1031.         }
  1032.         
  1033.         .form-control:hover, .custom-select:hover {
  1034.             border-color: #bdc3c7;
  1035.             background: white;
  1036.         }
  1037.         
  1038.         .form-control:focus, .custom-select:focus {
  1039.             outline: none;
  1040.             border-color: #1976d2;
  1041.             background: white;
  1042.             box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
  1043.         }
  1044.         
  1045.         select.form-control, select.custom-select {
  1046.             appearance: none;
  1047.             background-image: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23666\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"6 9 12 15 18 9\"></polyline></svg>');
  1048.             background-repeat: no-repeat;
  1049.             background-position: right 10px center;
  1050.             background-size: 10px;
  1051.         }
  1052.         
  1053.         /* Groupe téléphone */
  1054.         .phone-group {
  1055.             display: flex;
  1056.             gap: 8px;
  1057.             align-items: center;
  1058.         }
  1059.         
  1060.         .phone-prefix {
  1061.             width: 70px;
  1062.             flex-shrink: 0;
  1063.         }
  1064.         
  1065.         .phone-prefix input {
  1066.             text-align: center;
  1067.             background: #f0f2f5;
  1068.             border: 1.5px solid #e8ecf1;
  1069.             font-weight: 600;
  1070.             color: #1976d2;
  1071.         }
  1072.         
  1073.         .phone-number {
  1074.             flex: 1;
  1075.         }
  1076.         
  1077.         .phone-hint {
  1078.             font-size: 10px;
  1079.             color: #95a5a6;
  1080.             margin-top: 4px;
  1081.             display: flex;
  1082.             align-items: center;
  1083.             gap: 4px;
  1084.         }
  1085.         
  1086.         .phone-hint::before {
  1087.             content: \"💡\";
  1088.             font-size: 10px;
  1089.         }
  1090.         
  1091.         /* Ligne de séparation */
  1092.         .separator {
  1093.             height: 1px;
  1094.             background: linear-gradient(90deg, transparent, #e0e4e8, transparent);
  1095.             margin: 18px 0;
  1096.         }
  1097.         
  1098.         /* Boutons */
  1099.         .buttons-group {
  1100.             display: flex;
  1101.             gap: 12px;
  1102.             margin-top: 18px;
  1103.         }
  1104.         
  1105.         .btn {
  1106.             flex: 1;
  1107.             padding: 9px;
  1108.             border: none;
  1109.             border-radius: 8px;
  1110.             font-size: 13px;
  1111.             font-weight: 600;
  1112.             cursor: pointer;
  1113.             transition: all 0.3s ease;
  1114.             text-align: center;
  1115.             text-decoration: none;
  1116.             display: inline-block;
  1117.             letter-spacing: 0.5px;
  1118.         }
  1119.         
  1120.         .btn-primary {
  1121.             background: linear-gradient(135deg, #1976d2, #0d47a1);
  1122.             color: white;
  1123.             box-shadow: 0 2px 4px rgba(25, 118, 210, 0.2);
  1124.         }
  1125.         
  1126.         .btn-primary:hover {
  1127.             transform: translateY(-2px);
  1128.             box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
  1129.             background: linear-gradient(135deg, #1e88e5, #1565c0);
  1130.         }
  1131.         
  1132.         .btn-primary:active {
  1133.             transform: translateY(0);
  1134.         }
  1135.         
  1136.         .btn-secondary {
  1137.             background: white;
  1138.             color: #666;
  1139.             border: 1.5px solid #e0e4e8;
  1140.         }
  1141.         
  1142.         .btn-secondary:hover {
  1143.             background: #f8f9fa;
  1144.             border-color: #1976d2;
  1145.             color: #1976d2;
  1146.             transform: translateY(-2px);
  1147.         }
  1148.         
  1149.         /* Alertes */
  1150.         .alert {
  1151.             border-radius: 8px;
  1152.             padding: 10px 12px;
  1153.             margin-bottom: 15px;
  1154.             border: none;
  1155.             font-size: 12px;
  1156.             display: flex;
  1157.             align-items: center;
  1158.             gap: 8px;
  1159.         }
  1160.         
  1161.         .alert-danger {
  1162.             background: linear-gradient(135deg, #fee, #fdd);
  1163.             color: #c33;
  1164.             border-left: 4px solid #c33;
  1165.         }
  1166.         
  1167.         .text-danger {
  1168.             color: #e74c3c;
  1169.         }
  1170.         
  1171.         .help-block {
  1172.             font-size: 10px;
  1173.             margin-top: 3px;
  1174.             display: flex;
  1175.             align-items: center;
  1176.             gap: 4px;
  1177.         }
  1178.         
  1179.         .help-block::before {
  1180.             
  1181.             font-size: 9px;
  1182.         }
  1183.         
  1184.         /* Footer logos */
  1185.         .footer-logos {
  1186.             margin-top: 18px;
  1187.             padding-top: 15px;
  1188.             border-top: 1px solid #e8ecf1;
  1189.             text-align: center;
  1190.         }
  1191.         
  1192.         .footer-logos span {
  1193.             display: block;
  1194.             color: #95a5a6;
  1195.             font-size: 10px;
  1196.             margin-bottom: 10px;
  1197.             font-weight: 500;
  1198.         }
  1199.         
  1200.         .logos-container {
  1201.             display: flex;
  1202.             justify-content: center;
  1203.             gap: 20px;
  1204.             flex-wrap: wrap;
  1205.             align-items: center;
  1206.         }
  1207.         
  1208.         .logos-container a {
  1209.             display: inline-block;
  1210.             line-height: 0;
  1211.             transition: transform 0.3s ease;
  1212.         }
  1213.         
  1214.         .logos-container a:hover {
  1215.             transform: translateY(-2px);
  1216.         }
  1217.         
  1218.         .logos-container img {
  1219.             width: 32px !important;
  1220.             height: auto !important;
  1221.             max-width: 32px;
  1222.             opacity: 0.6;
  1223.             transition: all 0.3s ease;
  1224.             border-radius: 6px;
  1225.             filter: grayscale(0.2);
  1226.         }
  1227.         
  1228.         .logos-container img:hover {
  1229.             opacity: 1;
  1230.             filter: grayscale(0);
  1231.         }
  1232.         
  1233.         /* Diaspora container */
  1234.         .diaspora-container {
  1235.             background: linear-gradient(135deg, #f8f9fa, #f1f3f5);
  1236.             border-radius: 8px;
  1237.             padding: 10px 12px;
  1238.             margin-top: 5px;
  1239.             border: 1px solid #e8ecf1;
  1240.         }
  1241.         
  1242.         .diaspora-container label {
  1243.             margin-bottom: 6px;
  1244.             font-size: 11px;
  1245.             color: #2c3e50;
  1246.         }
  1247.         
  1248.         /* Ligne pour mot de passe */
  1249.         .password-row {
  1250.             display: flex;
  1251.             gap: 12px;
  1252.             margin-bottom: 14px;
  1253.         }
  1254.         
  1255.         .password-col {
  1256.             flex: 1;
  1257.         }
  1258.         
  1259.         .password-col .form-group {
  1260.             margin-bottom: 0;
  1261.         }
  1262.         
  1263.         /* Champ avec icône */
  1264.         .input-icon {
  1265.             position: relative;
  1266.         }
  1267.         
  1268.         /* Checkbox personnalisée */
  1269.         .custom-checkbox {
  1270.             display: flex;
  1271.             align-items: center;
  1272.             gap: 8px;
  1273.             cursor: pointer;
  1274.         }
  1275.         
  1276.         /* Responsive */
  1277.         @media (max-width: 576px) {
  1278.             .form-container {
  1279.                 max-width: 100%;
  1280.                 padding: 0 10px;
  1281.             }
  1282.             
  1283.             .auth-box-w {
  1284.                 padding: 20px;
  1285.             }
  1286.             
  1287.             .buttons-group {
  1288.                 flex-direction: column;
  1289.                 gap: 10px;
  1290.             }
  1291.             
  1292.             .phone-group {
  1293.                 flex-direction: column;
  1294.                 gap: 8px;
  1295.             }
  1296.             
  1297.             .phone-prefix {
  1298.                 width: 100%;
  1299.             }
  1300.             
  1301.             .header-separator {
  1302.                 flex-direction: column;
  1303.                 gap: 10px;
  1304.                 align-items: flex-start;
  1305.             }
  1306.             
  1307.             .password-row {
  1308.                 flex-direction: column;
  1309.                 gap: 14px;
  1310.             }
  1311.         }
  1312.     </style>
  1313.     <div class=\"form-container\">
  1314.         {% if app.session.flashBag.has('danger') == true %}
  1315.             <div class=\"alert alert-danger alert-dismissible fade show\" role=\"alert\">
  1316.                 <span>⚠️</span>
  1317.                 {% for message in app.session.flashbag.get('danger') %}
  1318.                     <p class=\"text-center w-100 mb-0\">{{ message }}</p>
  1319.                 {% endfor %}
  1320.                 <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\" style=\"margin-left: auto;\">
  1321.                     <span aria-hidden=\"true\">&times;</span>
  1322.                 </button>
  1323.             </div>
  1324.         {% endif %}
  1325.         <div class=\"help-block form-text with-errors text-danger\" style=\"margin-bottom: 10px;\">{{ form_errors(form) | raw }}</div>
  1326.         
  1327.         <form id=\"form-register\" action=\"{{ path('register_create_account') }}\" method=\"post\" novalidate>
  1328.             {{ form_widget(form._token) }}
  1329.             
  1330.             <!-- Header avec Langue -->
  1331.             <div class=\"header-separator\">
  1332.                 <h4 style=\"margin: 0; font-size: 16px; font-weight: 700;\">📝 {{ 'title.new_user_account' | trans }}</h4>
  1333.                 <div class=\"language-selector\">
  1334.                     <label>🌐 {{ 'Langue' | trans }}</label>
  1335.                     <select id=\"language-select\">
  1336.                         <option value=\"fr\">Français</option>
  1337.                         <option value=\"en\">English</option>
  1338.                         <option value=\"es\">Español</option>
  1339.                     </select>
  1340.                 </div>
  1341.             </div>
  1342.             
  1343.             <!-- Type d'utilisateur -->
  1344.             <div class=\"form-group\">
  1345.                 <label>👤 {{ \"menu.user_type\" | trans }} <span class=\"text-danger\">*</span></label>
  1346.                 {{ form_widget(form.typePerson, { 'attr': {'class': 'form-control', 'required': 'required'} }) }}
  1347.                 <div class=\"help-block text-danger\">{{ form_errors(form.typePerson) }}</div>
  1348.             </div>
  1349.             
  1350.             <!-- Diaspora -->
  1351.             <div id=\"diaspora\" class=\"form-group\" style=\"display: none;\">
  1352.                 <div class=\"diaspora-container\">
  1353.                     <label>🌍 {{ 'menu.diaspora' | trans }}</label>
  1354.                     <div class=\"d-flex align-items-center\">
  1355.                         {{ form_widget(form.diaspora, { 'attr': {'class': 'form-check-input', 'style': 'margin-right: 8px; width: 16px; height: 16px; cursor: pointer;'} }) }}
  1356.                         <span style=\"font-size: 12px;\">{{ 'menu.diaspora_help' | trans | default('Êtes-vous membre de la diaspora ?') }}</span>
  1357.                     </div>
  1358.                     <div class=\"help-block text-danger\">{{ form_errors(form.diaspora) }}</div>
  1359.                 </div>
  1360.             </div>
  1361.             
  1362.             <!-- Région / Pays -->
  1363.             <div class=\"form-group\">
  1364.                 <label>📍 
  1365.                     {% if struct_province_country_city == \"true\" %}
  1366.                         {{ 'menu.region' | trans }}
  1367.                     {% else %}
  1368.                         {{ 'menu.country' | trans }}
  1369.                     {% endif %}
  1370.                     <span class=\"text-danger\">*</span>
  1371.                 </label>
  1372.                 {% if struct_province_country_city == \"true\" %}
  1373.                     {{ create_translated_select(form.region, { 'attr': {'class': 'form-control custom-select', 'id': 'userbundle_user_region'} }) }}
  1374.                     <div class=\"help-block text-danger\">{{ form_errors(form.region) }}</div>
  1375.                 {% else %}
  1376.                     {{ create_translated_select(form.country, { 'attr': {'class': 'form-control custom-select', 'id': 'userbundle_user_country'} }) }}
  1377.                     <div class=\"help-block text-danger\">{{ form_errors(form.country) }}</div>
  1378.                 {% endif %}
  1379.             </div>
  1380.             
  1381.             <!-- Pays de résidence -->
  1382.             <div id=\"residenceCountry\" class=\"form-group\" style=\"display: none\">
  1383.                 <label>🏠 {{ 'menu.residence_country' | trans }} <span class=\"text-danger\">*</span></label>
  1384.                 {% if struct_province_country_city == \"true\" %}
  1385.                     {{ create_translated_select(form.residenceRegion, { 'attr': {'class': 'form-control custom-select', 'id': 'residence-select'} }) }}
  1386.                     <div class=\"help-block text-danger\">{{ form_errors(form.residenceRegion) }}</div>
  1387.                 {% else %}
  1388.                     {{ create_translated_select(form.residenceCountry, { 'attr': {'class': 'form-control custom-select', 'id': 'residence-select'} }) }}
  1389.                     <div class=\"help-block text-danger\">{{ form_errors(form.residenceCountry) }}</div>
  1390.                 {% endif %}
  1391.             </div>
  1392.             
  1393.             <!-- Téléphone -->
  1394.             <div class=\"form-group\">
  1395.                 <label>📞 {{ 'menu.phone' | trans }} : {{ 'menu.phone_indicator' | trans }} (<span id=\"phone_code\">+XX</span>) + N° <span class=\"text-danger\">*</span></label>
  1396.                 <div class=\"phone-group\">
  1397.                     <div class=\"phone-prefix\">
  1398.                         <input type=\"text\" id=\"phone_prefix_display\" class=\"form-control\" value=\"+XX\" readonly>
  1399.                     </div>
  1400.                     <div class=\"phone-number\">
  1401.                         {{ form_widget(form.phone, { 'attr': {'class': 'form-control', 'type': 'tel', 'required': 'required', 'placeholder': 'Numéro de téléphone'} }) }}
  1402.                     </div>
  1403.                 </div>
  1404.                 <div class=\"phone-hint\">{{ 'menu.phone_format_hint' | trans | default('Exemple: 612345678') }}</div>
  1405.                 <div class=\"help-block text-danger\">{{ form_errors(form.phone) }}</div>
  1406.             </div>
  1407.             
  1408.             <!-- Champs optionnels cachés -->
  1409.             <div class=\"form-group\" style=\"display: none\">
  1410.                 <label>👤 Pseudo (Optionnel)</label>
  1411.                 {{ form_widget(form.username, { 'attr': {'class': 'form-control'} }) }}
  1412.             </div>
  1413.             
  1414.             <div class=\"form-group\" style=\"display: none\">
  1415.                 <label>📧 Email (Optionnel)</label>
  1416.                 {{ form_widget(form.email, { 'attr': {'class': 'form-control', 'type': 'email'} }) }}
  1417.             </div>
  1418.             
  1419.             <!-- Mot de passe et Confirmation -->
  1420.             <div class=\"password-row\">
  1421.                 <div class=\"password-col\">
  1422.                     <div class=\"form-group\">
  1423.                         <label>🔒 {{ \"menu.password\" | trans }} <span class=\"text-danger\">*</span></label>
  1424.                         {{ form_widget(form.plainPassword.first, { 'attr': {'class': 'form-control', 'type': 'password', 'required': 'required', 'minlength': '6', 'placeholder': '••••••'} }) }}
  1425.                         <small class=\"phone-hint\">Minimum 6 caractères</small>
  1426.                         <div class=\"help-block text-danger\">{{ form_errors(form.plainPassword.first) }}</div>
  1427.                     </div>
  1428.                 </div>
  1429.                 <div class=\"password-col\">
  1430.                     <div class=\"form-group\">
  1431.                         <label>✓ {{ \"menu.confirm\" | trans }} <span class=\"text-danger\">*</span></label>
  1432.                         {{ form_widget(form.plainPassword.second, { 'attr': {'class': 'form-control', 'type': 'password', 'required': 'required', 'placeholder': '••••••'} }) }}
  1433.                         <div class=\"help-block text-danger\">{{ form_errors(form.plainPassword.second) }}</div>
  1434.                     </div>
  1435.                 </div>
  1436.             </div>
  1437.             
  1438.             <!-- Ligne de séparation élégante -->
  1439.             <div class=\"separator\"></div>
  1440.             
  1441.             <!-- Boutons -->
  1442.             <div class=\"buttons-group\">
  1443.                 <button type=\"submit\" class=\"btn btn-primary\" id=\"submitRegister\">
  1444.                     ✓ {{ 'menu.validate' | trans }}
  1445.                 </button>
  1446.                 <a href=\"{{ path('logout') }}\" class=\"btn btn-secondary\">
  1447.                     ✗ {{ 'menu.cancel' | trans }}
  1448.                 </a>
  1449.             </div>
  1450.             
  1451.             <!-- Footer logos -->
  1452.             <div class=\"footer-logos\">
  1453.                 <span>{{ \"footer.dev_by\" | trans }}</span>
  1454.                 <div class=\"logos-container\">
  1455.                     <a target=\"_blank\" href=\"https://ifef.francophonie.org/\" rel=\"noopener noreferrer\">
  1456.                         <img src=\"{{ asset('build/images/pinsuprem/logo_ifef.jpg') }}\" alt=\"IFEF\" onerror=\"this.style.display='none'\">
  1457.                     </a>
  1458.                     <a target=\"_blank\" href=\"https://www.francophonie.org/\" rel=\"noopener noreferrer\">
  1459.                         <img src=\"{{ asset('build/images/pinsuprem/logo_oif.jpg') }}\" alt=\"OIF\" onerror=\"this.style.display='none'\">
  1460.                     </a>
  1461.                 </div>
  1462.             </div>
  1463.         </form>
  1464.     </div>
  1465.     
  1466.     <select hidden id=\"indTel\">
  1467.         {% for country in allCountries %}
  1468.             <option value=\"{{ country.id }}\" data-code=\"{{ country.phoneCode }}\">{{ country.phoneCode }}</option>
  1469.         {% endfor %}
  1470.     </select>
  1471. {% endblock %}
  1472. {% block fos_user_script %}
  1473. <script>
  1474. \$(document).ready(function() {
  1475.     \$('#diaspora').hide();
  1476.     \$('#residenceCountry').hide();
  1477.     
  1478.     if (\$('#userbundle_user_typePerson option:selected').val() == 'ROLE_DIPLOME') {
  1479.         \$('#diaspora').show();
  1480.     }
  1481.     
  1482.     updatePhonePrefix();
  1483.     
  1484.     \$('#userbundle_user_typePerson').on('change', function() {
  1485.         if (\$(this).val() == 'ROLE_DIPLOME') {
  1486.             \$('#diaspora').slideDown(200);
  1487.         } else {
  1488.             \$('#userbundle_user_diaspora').prop('checked', false);
  1489.             \$('#diaspora').slideUp(200);
  1490.             \$('#residenceCountry').slideUp(200);
  1491.             updatePhonePrefix();
  1492.         }
  1493.     });
  1494.     
  1495.     \$('#userbundle_user_diaspora').on('change', function() {
  1496.         if (\$(this).is(':checked')) {
  1497.             \$('#residenceCountry').slideDown(200);
  1498.             \$('#residence-select').prop('required', true);
  1499.         } else {
  1500.             \$('#residenceCountry').slideUp(200);
  1501.             \$('#residence-select').prop('required', false);
  1502.             updatePhonePrefix();
  1503.         }
  1504.     });
  1505.     
  1506.     if (\$('#userbundle_user_region').length) {
  1507.         \$('#userbundle_user_region').on('change', function() {
  1508.             if(!\$('#userbundle_user_diaspora').is(':checked')) {
  1509.                 updatePhonePrefix();
  1510.             }
  1511.         });
  1512.     }
  1513.     
  1514.     if (\$('#userbundle_user_country').length) {
  1515.         \$('#userbundle_user_country').on('change', function() {
  1516.             if(!\$('#userbundle_user_diaspora').is(':checked')) {
  1517.                 updatePhonePrefix();
  1518.             }
  1519.         });
  1520.     }
  1521.     
  1522.     \$('#residence-select').on('change', function() {
  1523.         if(\$('#userbundle_user_diaspora').is(':checked')) {
  1524.             updatePhonePrefix();
  1525.         }
  1526.     });
  1527.     
  1528.     function updatePhonePrefix() {
  1529.         let selectedCountryId = null;
  1530.         
  1531.         if (\$('#residenceCountry').is(':visible') && \$('#residence-select').val()) {
  1532.             selectedCountryId = \$('#residence-select').val();
  1533.         } else if (\$('#userbundle_user_region').length && \$('#userbundle_user_region').val()) {
  1534.             selectedCountryId = \$('#userbundle_user_region').val();
  1535.         } else if (\$('#userbundle_user_country').length && \$('#userbundle_user_country').val()) {
  1536.             selectedCountryId = \$('#userbundle_user_country').val();
  1537.         }
  1538.         
  1539.         if (selectedCountryId) {
  1540.             let phoneCode = \$('#indTel option[value=\"' + selectedCountryId + '\"]').data('code');
  1541.             if (phoneCode) {
  1542.                 phoneCode = '+' + phoneCode;
  1543.                 \$('#phone_code').text(phoneCode);
  1544.                 \$('#phone_prefix_display').val(phoneCode);
  1545.             } else {
  1546.                 resetPhonePrefix();
  1547.             }
  1548.         } else {
  1549.             resetPhonePrefix();
  1550.         }
  1551.     }
  1552.     
  1553.     function resetPhonePrefix() {
  1554.         \$('#phone_code').text('+XX');
  1555.         \$('#phone_prefix_display').val('+XX');
  1556.     }
  1557.     
  1558.     \$('#language-select').on('change', function() {
  1559.         var lang = \$(this).val();
  1560.         console.log('Langue changée vers: ' + lang);
  1561.     });
  1562. });
  1563. </script>
  1564. {% endblock %}""user/register.html.twig""/var/www/inserjeune.km/templates/user/register.html.twig");
  1565.     }
  1566. }