<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
/* user/register.html.twig */
class __TwigTemplate_302839696e59bd92de9e3abbbb0ac127 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'fos_user_title' => [$this, 'block_fos_user_title'],
'fos_user_content' => [$this, 'block_fos_user_content'],
'fos_user_script' => [$this, 'block_fos_user_script'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return "base_security.html.twig";
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "user/register.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "user/register.html.twig"));
$this->parent = $this->loadTemplate("base_security.html.twig", "user/register.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_fos_user_title(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "fos_user_title"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "fos_user_title"));
// line 4
yield " <h4 class=\"auth-header text-center\" style=\"font-weight: 600; color: #2c3e50; margin-bottom: 0;\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("title.new_user_account"), "html", null, true);
yield "</h4>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 7
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_fos_user_content(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "fos_user_content"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "fos_user_content"));
// line 8
yield " <style>
.auth-box-w {
background: white;
border-radius: 16px;
padding: 25px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.auth-box-w:hover {
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}
.form-container {
max-width: 380px;
margin: 0 auto;
}
img {
width: 35px;
transition: transform 0.3s ease;
}
img:hover {
transform: scale(1.05);
}
/* Header avec Langue */
.header-separator {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
padding-bottom: 12px;
border-bottom: 2px solid #e8ecf1;
}
.header-separator h4 {
background: linear-gradient(135deg, #1976d2, #0d47a1);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.language-selector {
display: flex;
align-items: center;
gap: 8px;
}
.language-selector label {
margin: 0;
color: #666;
font-size: 12px;
font-weight: 500;
}
.language-selector select {
padding: 4px 8px;
border: 1px solid #e0e4e8;
border-radius: 6px;
background: #fafbfc;
font-size: 12px;
cursor: pointer;
transition: all 0.2s ease;
}
.language-selector select:hover {
border-color: #1976d2;
background: white;
}
.form-group {
margin-bottom: 14px;
}
.form-group label {
display: block;
margin-bottom: 5px;
font-weight: 600;
color: #2c3e50;
font-size: 12px;
letter-spacing: 0.3px;
}
.form-control, .custom-select {
width: 100%;
padding: 8px 12px;
border: 1.5px solid #e8ecf1;
border-radius: 8px;
font-size: 13px;
transition: all 0.3s ease;
background: #fafbfc;
font-family: inherit;
}
.form-control:hover, .custom-select:hover {
border-color: #bdc3c7;
background: white;
}
.form-control:focus, .custom-select:focus {
outline: none;
border-color: #1976d2;
background: white;
box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}
select.form-control, select.custom-select {
appearance: none;
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>');
background-repeat: no-repeat;
background-position: right 10px center;
background-size: 10px;
}
/* Groupe téléphone */
.phone-group {
display: flex;
gap: 8px;
align-items: center;
}
.phone-prefix {
width: 70px;
flex-shrink: 0;
}
.phone-prefix input {
text-align: center;
background: #f0f2f5;
border: 1.5px solid #e8ecf1;
font-weight: 600;
color: #1976d2;
}
.phone-number {
flex: 1;
}
.phone-hint {
font-size: 10px;
color: #95a5a6;
margin-top: 4px;
display: flex;
align-items: center;
gap: 4px;
}
.phone-hint::before {
content: \"💡\";
font-size: 10px;
}
/* Ligne de séparation */
.separator {
height: 1px;
background: linear-gradient(90deg, transparent, #e0e4e8, transparent);
margin: 18px 0;
}
/* Boutons */
.buttons-group {
display: flex;
gap: 12px;
margin-top: 18px;
}
.btn {
flex: 1;
padding: 9px;
border: none;
border-radius: 8px;
font-size: 13px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
text-align: center;
text-decoration: none;
display: inline-block;
letter-spacing: 0.5px;
}
.btn-primary {
background: linear-gradient(135deg, #1976d2, #0d47a1);
color: white;
box-shadow: 0 2px 4px rgba(25, 118, 210, 0.2);
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
background: linear-gradient(135deg, #1e88e5, #1565c0);
}
.btn-primary:active {
transform: translateY(0);
}
.btn-secondary {
background: white;
color: #666;
border: 1.5px solid #e0e4e8;
}
.btn-secondary:hover {
background: #f8f9fa;
border-color: #1976d2;
color: #1976d2;
transform: translateY(-2px);
}
/* Alertes */
.alert {
border-radius: 8px;
padding: 10px 12px;
margin-bottom: 15px;
border: none;
font-size: 12px;
display: flex;
align-items: center;
gap: 8px;
}
.alert-danger {
background: linear-gradient(135deg, #fee, #fdd);
color: #c33;
border-left: 4px solid #c33;
}
.text-danger {
color: #e74c3c;
}
.help-block {
font-size: 10px;
margin-top: 3px;
display: flex;
align-items: center;
gap: 4px;
}
.help-block::before {
font-size: 9px;
}
/* Footer logos */
.footer-logos {
margin-top: 18px;
padding-top: 15px;
border-top: 1px solid #e8ecf1;
text-align: center;
}
.footer-logos span {
display: block;
color: #95a5a6;
font-size: 10px;
margin-bottom: 10px;
font-weight: 500;
}
.logos-container {
display: flex;
justify-content: center;
gap: 20px;
flex-wrap: wrap;
align-items: center;
}
.logos-container a {
display: inline-block;
line-height: 0;
transition: transform 0.3s ease;
}
.logos-container a:hover {
transform: translateY(-2px);
}
.logos-container img {
width: 32px !important;
height: auto !important;
max-width: 32px;
opacity: 0.6;
transition: all 0.3s ease;
border-radius: 6px;
filter: grayscale(0.2);
}
.logos-container img:hover {
opacity: 1;
filter: grayscale(0);
}
/* Diaspora container */
.diaspora-container {
background: linear-gradient(135deg, #f8f9fa, #f1f3f5);
border-radius: 8px;
padding: 10px 12px;
margin-top: 5px;
border: 1px solid #e8ecf1;
}
.diaspora-container label {
margin-bottom: 6px;
font-size: 11px;
color: #2c3e50;
}
/* Ligne pour mot de passe */
.password-row {
display: flex;
gap: 12px;
margin-bottom: 14px;
}
.password-col {
flex: 1;
}
.password-col .form-group {
margin-bottom: 0;
}
/* Champ avec icône */
.input-icon {
position: relative;
}
/* Checkbox personnalisée */
.custom-checkbox {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
}
/* Responsive */
@media (max-width: 576px) {
.form-container {
max-width: 100%;
padding: 0 10px;
}
.auth-box-w {
padding: 20px;
}
.buttons-group {
flex-direction: column;
gap: 10px;
}
.phone-group {
flex-direction: column;
gap: 8px;
}
.phone-prefix {
width: 100%;
}
.header-separator {
flex-direction: column;
gap: 10px;
align-items: flex-start;
}
.password-row {
flex-direction: column;
gap: 14px;
}
}
</style>
<div class=\"form-container\">
";
// line 386
if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::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", false, false, false, 386), "flashBag", [], "any", false, false, false, 386), "has", ["danger"], "method", false, false, false, 386) == true)) {
// line 387
yield " <div class=\"alert alert-danger alert-dismissible fade show\" role=\"alert\">
<span>⚠️</span>
";
// line 389
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::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", false, false, false, 389), "flashbag", [], "any", false, false, false, 389), "get", ["danger"], "method", false, false, false, 389));
foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
// line 390
yield " <p class=\"text-center w-100 mb-0\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["message"], "html", null, true);
yield "</p>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['message'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 392
yield " <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\" style=\"margin-left: auto;\">
<span aria-hidden=\"true\">×</span>
</button>
</div>
";
}
// line 397
yield "
<div class=\"help-block form-text with-errors text-danger\" style=\"margin-bottom: 10px;\">";
// line 398
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');
yield "</div>
<form id=\"form-register\" action=\"";
// line 400
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("register_create_account");
yield "\" method=\"post\" novalidate>
";
// line 401
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", false, false, false, 401), 'widget');
yield "
<!-- Header avec Langue -->
<div class=\"header-separator\">
<h4 style=\"margin: 0; font-size: 16px; font-weight: 700;\">📝 ";
// line 405
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("title.new_user_account"), "html", null, true);
yield "</h4>
<div class=\"language-selector\">
<label>🌐 ";
// line 407
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Langue"), "html", null, true);
yield "</label>
<select id=\"language-select\">
<option value=\"fr\">Français</option>
<option value=\"en\">English</option>
<option value=\"es\">Español</option>
</select>
</div>
</div>
<!-- Type d'utilisateur -->
<div class=\"form-group\">
<label>👤 ";
// line 418
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.user_type"), "html", null, true);
yield " <span class=\"text-danger\">*</span></label>
";
// line 419
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", false, false, false, 419), 'widget', ["attr" => ["class" => "form-control", "required" => "required"]]);
yield "
<div class=\"help-block text-danger\">";
// line 420
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", false, false, false, 420), 'errors');
yield "</div>
</div>
<!-- Diaspora -->
<div id=\"diaspora\" class=\"form-group\" style=\"display: none;\">
<div class=\"diaspora-container\">
<label>🌍 ";
// line 426
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.diaspora"), "html", null, true);
yield "</label>
<div class=\"d-flex align-items-center\">
";
// line 428
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", false, false, false, 428), 'widget', ["attr" => ["class" => "form-check-input", "style" => "margin-right: 8px; width: 16px; height: 16px; cursor: pointer;"]]);
yield "
<span style=\"font-size: 12px;\">";
// line 429
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", null, true);
yield "</span>
</div>
<div class=\"help-block text-danger\">";
// line 431
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", false, false, false, 431), 'errors');
yield "</div>
</div>
</div>
<!-- Région / Pays -->
<div class=\"form-group\">
<label>📍
";
// line 438
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")) {
// line 439
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.region"), "html", null, true);
yield "
";
} else {
// line 441
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.country"), "html", null, true);
yield "
";
}
// line 443
yield " <span class=\"text-danger\">*</span>
</label>
";
// line 445
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")) {
// line 446
yield " ";
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", false, false, false, 446), ["attr" => ["class" => "form-control custom-select", "id" => "userbundle_user_region"]]);
yield "
<div class=\"help-block text-danger\">";
// line 447
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", false, false, false, 447), 'errors');
yield "</div>
";
} else {
// line 449
yield " ";
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", false, false, false, 449), ["attr" => ["class" => "form-control custom-select", "id" => "userbundle_user_country"]]);
yield "
<div class=\"help-block text-danger\">";
// line 450
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", false, false, false, 450), 'errors');
yield "</div>
";
}
// line 452
yield " </div>
<!-- Pays de résidence -->
<div id=\"residenceCountry\" class=\"form-group\" style=\"display: none\">
<label>🏠 ";
// line 456
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.residence_country"), "html", null, true);
yield " <span class=\"text-danger\">*</span></label>
";
// line 457
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")) {
// line 458
yield " ";
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", false, false, false, 458), ["attr" => ["class" => "form-control custom-select", "id" => "residence-select"]]);
yield "
<div class=\"help-block text-danger\">";
// line 459
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", false, false, false, 459), 'errors');
yield "</div>
";
} else {
// line 461
yield " ";
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", false, false, false, 461), ["attr" => ["class" => "form-control custom-select", "id" => "residence-select"]]);
yield "
<div class=\"help-block text-danger\">";
// line 462
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", false, false, false, 462), 'errors');
yield "</div>
";
}
// line 464
yield " </div>
<!-- Téléphone -->
<div class=\"form-group\">
<label>📞 ";
// line 468
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.phone"), "html", null, true);
yield " : ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.phone_indicator"), "html", null, true);
yield " (<span id=\"phone_code\">+XX</span>) + N° <span class=\"text-danger\">*</span></label>
<div class=\"phone-group\">
<div class=\"phone-prefix\">
<input type=\"text\" id=\"phone_prefix_display\" class=\"form-control\" value=\"+XX\" readonly>
</div>
<div class=\"phone-number\">
";
// line 474
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", false, false, false, 474), 'widget', ["attr" => ["class" => "form-control", "type" => "tel", "required" => "required", "placeholder" => "Numéro de téléphone"]]);
yield "
</div>
</div>
<div class=\"phone-hint\">";
// line 477
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", null, true);
yield "</div>
<div class=\"help-block text-danger\">";
// line 478
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", false, false, false, 478), 'errors');
yield "</div>
</div>
<!-- Champs optionnels cachés -->
<div class=\"form-group\" style=\"display: none\">
<label>👤 Pseudo (Optionnel)</label>
";
// line 484
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", false, false, false, 484), 'widget', ["attr" => ["class" => "form-control"]]);
yield "
</div>
<div class=\"form-group\" style=\"display: none\">
<label>📧 Email (Optionnel)</label>
";
// line 489
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", false, false, false, 489), 'widget', ["attr" => ["class" => "form-control", "type" => "email"]]);
yield "
</div>
<!-- Mot de passe et Confirmation -->
<div class=\"password-row\">
<div class=\"password-col\">
<div class=\"form-group\">
<label>🔒 ";
// line 496
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.password"), "html", null, true);
yield " <span class=\"text-danger\">*</span></label>
";
// line 497
yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, 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.', 497, $this->source); })()), "plainPassword", [], "any", false, false, false, 497), "first", [], "any", false, false, false, 497), 'widget', ["attr" => ["class" => "form-control", "type" => "password", "required" => "required", "minlength" => "6", "placeholder" => "••••••"]]);
yield "
<small class=\"phone-hint\">Minimum 6 caractères</small>
<div class=\"help-block text-danger\">";
// line 499
yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, 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.', 499, $this->source); })()), "plainPassword", [], "any", false, false, false, 499), "first", [], "any", false, false, false, 499), 'errors');
yield "</div>
</div>
</div>
<div class=\"password-col\">
<div class=\"form-group\">
<label>✓ ";
// line 504
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.confirm"), "html", null, true);
yield " <span class=\"text-danger\">*</span></label>
";
// line 505
yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, 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.', 505, $this->source); })()), "plainPassword", [], "any", false, false, false, 505), "second", [], "any", false, false, false, 505), 'widget', ["attr" => ["class" => "form-control", "type" => "password", "required" => "required", "placeholder" => "••••••"]]);
yield "
<div class=\"help-block text-danger\">";
// line 506
yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, 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.', 506, $this->source); })()), "plainPassword", [], "any", false, false, false, 506), "second", [], "any", false, false, false, 506), 'errors');
yield "</div>
</div>
</div>
</div>
<!-- Ligne de séparation élégante -->
<div class=\"separator\"></div>
<!-- Boutons -->
<div class=\"buttons-group\">
<button type=\"submit\" class=\"btn btn-primary\" id=\"submitRegister\">
✓ ";
// line 517
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.validate"), "html", null, true);
yield "
</button>
<a href=\"";
// line 519
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("logout");
yield "\" class=\"btn btn-secondary\">
✗ ";
// line 520
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("menu.cancel"), "html", null, true);
yield "
</a>
</div>
<!-- Footer logos -->
<div class=\"footer-logos\">
<span>";
// line 526
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("footer.dev_by"), "html", null, true);
yield "</span>
<div class=\"logos-container\">
<a target=\"_blank\" href=\"https://ifef.francophonie.org/\" rel=\"noopener noreferrer\">
<img src=\"";
// line 529
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/pinsuprem/logo_ifef.jpg"), "html", null, true);
yield "\" alt=\"IFEF\" onerror=\"this.style.display='none'\">
</a>
<a target=\"_blank\" href=\"https://www.francophonie.org/\" rel=\"noopener noreferrer\">
<img src=\"";
// line 532
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/pinsuprem/logo_oif.jpg"), "html", null, true);
yield "\" alt=\"OIF\" onerror=\"this.style.display='none'\">
</a>
</div>
</div>
</form>
</div>
<select hidden id=\"indTel\">
";
// line 540
$context['_parent'] = $context;
$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); })()));
foreach ($context['_seq'] as $context["_key"] => $context["country"]) {
// line 541
yield " <option value=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["country"], "id", [], "any", false, false, false, 541), "html", null, true);
yield "\" data-code=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["country"], "phoneCode", [], "any", false, false, false, 541), "html", null, true);
yield "\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["country"], "phoneCode", [], "any", false, false, false, 541), "html", null, true);
yield "</option>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['country'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 543
yield " </select>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 546
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_fos_user_script(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "fos_user_script"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "fos_user_script"));
// line 547
yield "<script>
\$(document).ready(function() {
\$('#diaspora').hide();
\$('#residenceCountry').hide();
if (\$('#userbundle_user_typePerson option:selected').val() == 'ROLE_DIPLOME') {
\$('#diaspora').show();
}
updatePhonePrefix();
\$('#userbundle_user_typePerson').on('change', function() {
if (\$(this).val() == 'ROLE_DIPLOME') {
\$('#diaspora').slideDown(200);
} else {
\$('#userbundle_user_diaspora').prop('checked', false);
\$('#diaspora').slideUp(200);
\$('#residenceCountry').slideUp(200);
updatePhonePrefix();
}
});
\$('#userbundle_user_diaspora').on('change', function() {
if (\$(this).is(':checked')) {
\$('#residenceCountry').slideDown(200);
\$('#residence-select').prop('required', true);
} else {
\$('#residenceCountry').slideUp(200);
\$('#residence-select').prop('required', false);
updatePhonePrefix();
}
});
if (\$('#userbundle_user_region').length) {
\$('#userbundle_user_region').on('change', function() {
if(!\$('#userbundle_user_diaspora').is(':checked')) {
updatePhonePrefix();
}
});
}
if (\$('#userbundle_user_country').length) {
\$('#userbundle_user_country').on('change', function() {
if(!\$('#userbundle_user_diaspora').is(':checked')) {
updatePhonePrefix();
}
});
}
\$('#residence-select').on('change', function() {
if(\$('#userbundle_user_diaspora').is(':checked')) {
updatePhonePrefix();
}
});
function updatePhonePrefix() {
let selectedCountryId = null;
if (\$('#residenceCountry').is(':visible') && \$('#residence-select').val()) {
selectedCountryId = \$('#residence-select').val();
} else if (\$('#userbundle_user_region').length && \$('#userbundle_user_region').val()) {
selectedCountryId = \$('#userbundle_user_region').val();
} else if (\$('#userbundle_user_country').length && \$('#userbundle_user_country').val()) {
selectedCountryId = \$('#userbundle_user_country').val();
}
if (selectedCountryId) {
let phoneCode = \$('#indTel option[value=\"' + selectedCountryId + '\"]').data('code');
if (phoneCode) {
phoneCode = '+' + phoneCode;
\$('#phone_code').text(phoneCode);
\$('#phone_prefix_display').val(phoneCode);
} else {
resetPhonePrefix();
}
} else {
resetPhonePrefix();
}
}
function resetPhonePrefix() {
\$('#phone_code').text('+XX');
\$('#phone_prefix_display').val('+XX');
}
\$('#language-select').on('change', function() {
var lang = \$(this).val();
console.log('Langue changée vers: ' + lang);
});
});
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "user/register.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
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,);
}
public function getSourceContext(): Source
{
return new Source("{% extends \"base_security.html.twig\" %}
{% block fos_user_title %}
<h4 class=\"auth-header text-center\" style=\"font-weight: 600; color: #2c3e50; margin-bottom: 0;\">{{ 'title.new_user_account' | trans }}</h4>
{% endblock fos_user_title %}
{% block fos_user_content %}
<style>
.auth-box-w {
background: white;
border-radius: 16px;
padding: 25px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.auth-box-w:hover {
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}
.form-container {
max-width: 380px;
margin: 0 auto;
}
img {
width: 35px;
transition: transform 0.3s ease;
}
img:hover {
transform: scale(1.05);
}
/* Header avec Langue */
.header-separator {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
padding-bottom: 12px;
border-bottom: 2px solid #e8ecf1;
}
.header-separator h4 {
background: linear-gradient(135deg, #1976d2, #0d47a1);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.language-selector {
display: flex;
align-items: center;
gap: 8px;
}
.language-selector label {
margin: 0;
color: #666;
font-size: 12px;
font-weight: 500;
}
.language-selector select {
padding: 4px 8px;
border: 1px solid #e0e4e8;
border-radius: 6px;
background: #fafbfc;
font-size: 12px;
cursor: pointer;
transition: all 0.2s ease;
}
.language-selector select:hover {
border-color: #1976d2;
background: white;
}
.form-group {
margin-bottom: 14px;
}
.form-group label {
display: block;
margin-bottom: 5px;
font-weight: 600;
color: #2c3e50;
font-size: 12px;
letter-spacing: 0.3px;
}
.form-control, .custom-select {
width: 100%;
padding: 8px 12px;
border: 1.5px solid #e8ecf1;
border-radius: 8px;
font-size: 13px;
transition: all 0.3s ease;
background: #fafbfc;
font-family: inherit;
}
.form-control:hover, .custom-select:hover {
border-color: #bdc3c7;
background: white;
}
.form-control:focus, .custom-select:focus {
outline: none;
border-color: #1976d2;
background: white;
box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}
select.form-control, select.custom-select {
appearance: none;
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>');
background-repeat: no-repeat;
background-position: right 10px center;
background-size: 10px;
}
/* Groupe téléphone */
.phone-group {
display: flex;
gap: 8px;
align-items: center;
}
.phone-prefix {
width: 70px;
flex-shrink: 0;
}
.phone-prefix input {
text-align: center;
background: #f0f2f5;
border: 1.5px solid #e8ecf1;
font-weight: 600;
color: #1976d2;
}
.phone-number {
flex: 1;
}
.phone-hint {
font-size: 10px;
color: #95a5a6;
margin-top: 4px;
display: flex;
align-items: center;
gap: 4px;
}
.phone-hint::before {
content: \"💡\";
font-size: 10px;
}
/* Ligne de séparation */
.separator {
height: 1px;
background: linear-gradient(90deg, transparent, #e0e4e8, transparent);
margin: 18px 0;
}
/* Boutons */
.buttons-group {
display: flex;
gap: 12px;
margin-top: 18px;
}
.btn {
flex: 1;
padding: 9px;
border: none;
border-radius: 8px;
font-size: 13px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
text-align: center;
text-decoration: none;
display: inline-block;
letter-spacing: 0.5px;
}
.btn-primary {
background: linear-gradient(135deg, #1976d2, #0d47a1);
color: white;
box-shadow: 0 2px 4px rgba(25, 118, 210, 0.2);
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
background: linear-gradient(135deg, #1e88e5, #1565c0);
}
.btn-primary:active {
transform: translateY(0);
}
.btn-secondary {
background: white;
color: #666;
border: 1.5px solid #e0e4e8;
}
.btn-secondary:hover {
background: #f8f9fa;
border-color: #1976d2;
color: #1976d2;
transform: translateY(-2px);
}
/* Alertes */
.alert {
border-radius: 8px;
padding: 10px 12px;
margin-bottom: 15px;
border: none;
font-size: 12px;
display: flex;
align-items: center;
gap: 8px;
}
.alert-danger {
background: linear-gradient(135deg, #fee, #fdd);
color: #c33;
border-left: 4px solid #c33;
}
.text-danger {
color: #e74c3c;
}
.help-block {
font-size: 10px;
margin-top: 3px;
display: flex;
align-items: center;
gap: 4px;
}
.help-block::before {
font-size: 9px;
}
/* Footer logos */
.footer-logos {
margin-top: 18px;
padding-top: 15px;
border-top: 1px solid #e8ecf1;
text-align: center;
}
.footer-logos span {
display: block;
color: #95a5a6;
font-size: 10px;
margin-bottom: 10px;
font-weight: 500;
}
.logos-container {
display: flex;
justify-content: center;
gap: 20px;
flex-wrap: wrap;
align-items: center;
}
.logos-container a {
display: inline-block;
line-height: 0;
transition: transform 0.3s ease;
}
.logos-container a:hover {
transform: translateY(-2px);
}
.logos-container img {
width: 32px !important;
height: auto !important;
max-width: 32px;
opacity: 0.6;
transition: all 0.3s ease;
border-radius: 6px;
filter: grayscale(0.2);
}
.logos-container img:hover {
opacity: 1;
filter: grayscale(0);
}
/* Diaspora container */
.diaspora-container {
background: linear-gradient(135deg, #f8f9fa, #f1f3f5);
border-radius: 8px;
padding: 10px 12px;
margin-top: 5px;
border: 1px solid #e8ecf1;
}
.diaspora-container label {
margin-bottom: 6px;
font-size: 11px;
color: #2c3e50;
}
/* Ligne pour mot de passe */
.password-row {
display: flex;
gap: 12px;
margin-bottom: 14px;
}
.password-col {
flex: 1;
}
.password-col .form-group {
margin-bottom: 0;
}
/* Champ avec icône */
.input-icon {
position: relative;
}
/* Checkbox personnalisée */
.custom-checkbox {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
}
/* Responsive */
@media (max-width: 576px) {
.form-container {
max-width: 100%;
padding: 0 10px;
}
.auth-box-w {
padding: 20px;
}
.buttons-group {
flex-direction: column;
gap: 10px;
}
.phone-group {
flex-direction: column;
gap: 8px;
}
.phone-prefix {
width: 100%;
}
.header-separator {
flex-direction: column;
gap: 10px;
align-items: flex-start;
}
.password-row {
flex-direction: column;
gap: 14px;
}
}
</style>
<div class=\"form-container\">
{% if app.session.flashBag.has('danger') == true %}
<div class=\"alert alert-danger alert-dismissible fade show\" role=\"alert\">
<span>⚠️</span>
{% for message in app.session.flashbag.get('danger') %}
<p class=\"text-center w-100 mb-0\">{{ message }}</p>
{% endfor %}
<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\" style=\"margin-left: auto;\">
<span aria-hidden=\"true\">×</span>
</button>
</div>
{% endif %}
<div class=\"help-block form-text with-errors text-danger\" style=\"margin-bottom: 10px;\">{{ form_errors(form) | raw }}</div>
<form id=\"form-register\" action=\"{{ path('register_create_account') }}\" method=\"post\" novalidate>
{{ form_widget(form._token) }}
<!-- Header avec Langue -->
<div class=\"header-separator\">
<h4 style=\"margin: 0; font-size: 16px; font-weight: 700;\">📝 {{ 'title.new_user_account' | trans }}</h4>
<div class=\"language-selector\">
<label>🌐 {{ 'Langue' | trans }}</label>
<select id=\"language-select\">
<option value=\"fr\">Français</option>
<option value=\"en\">English</option>
<option value=\"es\">Español</option>
</select>
</div>
</div>
<!-- Type d'utilisateur -->
<div class=\"form-group\">
<label>👤 {{ \"menu.user_type\" | trans }} <span class=\"text-danger\">*</span></label>
{{ form_widget(form.typePerson, { 'attr': {'class': 'form-control', 'required': 'required'} }) }}
<div class=\"help-block text-danger\">{{ form_errors(form.typePerson) }}</div>
</div>
<!-- Diaspora -->
<div id=\"diaspora\" class=\"form-group\" style=\"display: none;\">
<div class=\"diaspora-container\">
<label>🌍 {{ 'menu.diaspora' | trans }}</label>
<div class=\"d-flex align-items-center\">
{{ form_widget(form.diaspora, { 'attr': {'class': 'form-check-input', 'style': 'margin-right: 8px; width: 16px; height: 16px; cursor: pointer;'} }) }}
<span style=\"font-size: 12px;\">{{ 'menu.diaspora_help' | trans | default('Êtes-vous membre de la diaspora ?') }}</span>
</div>
<div class=\"help-block text-danger\">{{ form_errors(form.diaspora) }}</div>
</div>
</div>
<!-- Région / Pays -->
<div class=\"form-group\">
<label>📍
{% if struct_province_country_city == \"true\" %}
{{ 'menu.region' | trans }}
{% else %}
{{ 'menu.country' | trans }}
{% endif %}
<span class=\"text-danger\">*</span>
</label>
{% if struct_province_country_city == \"true\" %}
{{ create_translated_select(form.region, { 'attr': {'class': 'form-control custom-select', 'id': 'userbundle_user_region'} }) }}
<div class=\"help-block text-danger\">{{ form_errors(form.region) }}</div>
{% else %}
{{ create_translated_select(form.country, { 'attr': {'class': 'form-control custom-select', 'id': 'userbundle_user_country'} }) }}
<div class=\"help-block text-danger\">{{ form_errors(form.country) }}</div>
{% endif %}
</div>
<!-- Pays de résidence -->
<div id=\"residenceCountry\" class=\"form-group\" style=\"display: none\">
<label>🏠 {{ 'menu.residence_country' | trans }} <span class=\"text-danger\">*</span></label>
{% if struct_province_country_city == \"true\" %}
{{ create_translated_select(form.residenceRegion, { 'attr': {'class': 'form-control custom-select', 'id': 'residence-select'} }) }}
<div class=\"help-block text-danger\">{{ form_errors(form.residenceRegion) }}</div>
{% else %}
{{ create_translated_select(form.residenceCountry, { 'attr': {'class': 'form-control custom-select', 'id': 'residence-select'} }) }}
<div class=\"help-block text-danger\">{{ form_errors(form.residenceCountry) }}</div>
{% endif %}
</div>
<!-- Téléphone -->
<div class=\"form-group\">
<label>📞 {{ 'menu.phone' | trans }} : {{ 'menu.phone_indicator' | trans }} (<span id=\"phone_code\">+XX</span>) + N° <span class=\"text-danger\">*</span></label>
<div class=\"phone-group\">
<div class=\"phone-prefix\">
<input type=\"text\" id=\"phone_prefix_display\" class=\"form-control\" value=\"+XX\" readonly>
</div>
<div class=\"phone-number\">
{{ form_widget(form.phone, { 'attr': {'class': 'form-control', 'type': 'tel', 'required': 'required', 'placeholder': 'Numéro de téléphone'} }) }}
</div>
</div>
<div class=\"phone-hint\">{{ 'menu.phone_format_hint' | trans | default('Exemple: 612345678') }}</div>
<div class=\"help-block text-danger\">{{ form_errors(form.phone) }}</div>
</div>
<!-- Champs optionnels cachés -->
<div class=\"form-group\" style=\"display: none\">
<label>👤 Pseudo (Optionnel)</label>
{{ form_widget(form.username, { 'attr': {'class': 'form-control'} }) }}
</div>
<div class=\"form-group\" style=\"display: none\">
<label>📧 Email (Optionnel)</label>
{{ form_widget(form.email, { 'attr': {'class': 'form-control', 'type': 'email'} }) }}
</div>
<!-- Mot de passe et Confirmation -->
<div class=\"password-row\">
<div class=\"password-col\">
<div class=\"form-group\">
<label>🔒 {{ \"menu.password\" | trans }} <span class=\"text-danger\">*</span></label>
{{ form_widget(form.plainPassword.first, { 'attr': {'class': 'form-control', 'type': 'password', 'required': 'required', 'minlength': '6', 'placeholder': '••••••'} }) }}
<small class=\"phone-hint\">Minimum 6 caractères</small>
<div class=\"help-block text-danger\">{{ form_errors(form.plainPassword.first) }}</div>
</div>
</div>
<div class=\"password-col\">
<div class=\"form-group\">
<label>✓ {{ \"menu.confirm\" | trans }} <span class=\"text-danger\">*</span></label>
{{ form_widget(form.plainPassword.second, { 'attr': {'class': 'form-control', 'type': 'password', 'required': 'required', 'placeholder': '••••••'} }) }}
<div class=\"help-block text-danger\">{{ form_errors(form.plainPassword.second) }}</div>
</div>
</div>
</div>
<!-- Ligne de séparation élégante -->
<div class=\"separator\"></div>
<!-- Boutons -->
<div class=\"buttons-group\">
<button type=\"submit\" class=\"btn btn-primary\" id=\"submitRegister\">
✓ {{ 'menu.validate' | trans }}
</button>
<a href=\"{{ path('logout') }}\" class=\"btn btn-secondary\">
✗ {{ 'menu.cancel' | trans }}
</a>
</div>
<!-- Footer logos -->
<div class=\"footer-logos\">
<span>{{ \"footer.dev_by\" | trans }}</span>
<div class=\"logos-container\">
<a target=\"_blank\" href=\"https://ifef.francophonie.org/\" rel=\"noopener noreferrer\">
<img src=\"{{ asset('build/images/pinsuprem/logo_ifef.jpg') }}\" alt=\"IFEF\" onerror=\"this.style.display='none'\">
</a>
<a target=\"_blank\" href=\"https://www.francophonie.org/\" rel=\"noopener noreferrer\">
<img src=\"{{ asset('build/images/pinsuprem/logo_oif.jpg') }}\" alt=\"OIF\" onerror=\"this.style.display='none'\">
</a>
</div>
</div>
</form>
</div>
<select hidden id=\"indTel\">
{% for country in allCountries %}
<option value=\"{{ country.id }}\" data-code=\"{{ country.phoneCode }}\">{{ country.phoneCode }}</option>
{% endfor %}
</select>
{% endblock %}
{% block fos_user_script %}
<script>
\$(document).ready(function() {
\$('#diaspora').hide();
\$('#residenceCountry').hide();
if (\$('#userbundle_user_typePerson option:selected').val() == 'ROLE_DIPLOME') {
\$('#diaspora').show();
}
updatePhonePrefix();
\$('#userbundle_user_typePerson').on('change', function() {
if (\$(this).val() == 'ROLE_DIPLOME') {
\$('#diaspora').slideDown(200);
} else {
\$('#userbundle_user_diaspora').prop('checked', false);
\$('#diaspora').slideUp(200);
\$('#residenceCountry').slideUp(200);
updatePhonePrefix();
}
});
\$('#userbundle_user_diaspora').on('change', function() {
if (\$(this).is(':checked')) {
\$('#residenceCountry').slideDown(200);
\$('#residence-select').prop('required', true);
} else {
\$('#residenceCountry').slideUp(200);
\$('#residence-select').prop('required', false);
updatePhonePrefix();
}
});
if (\$('#userbundle_user_region').length) {
\$('#userbundle_user_region').on('change', function() {
if(!\$('#userbundle_user_diaspora').is(':checked')) {
updatePhonePrefix();
}
});
}
if (\$('#userbundle_user_country').length) {
\$('#userbundle_user_country').on('change', function() {
if(!\$('#userbundle_user_diaspora').is(':checked')) {
updatePhonePrefix();
}
});
}
\$('#residence-select').on('change', function() {
if(\$('#userbundle_user_diaspora').is(':checked')) {
updatePhonePrefix();
}
});
function updatePhonePrefix() {
let selectedCountryId = null;
if (\$('#residenceCountry').is(':visible') && \$('#residence-select').val()) {
selectedCountryId = \$('#residence-select').val();
} else if (\$('#userbundle_user_region').length && \$('#userbundle_user_region').val()) {
selectedCountryId = \$('#userbundle_user_region').val();
} else if (\$('#userbundle_user_country').length && \$('#userbundle_user_country').val()) {
selectedCountryId = \$('#userbundle_user_country').val();
}
if (selectedCountryId) {
let phoneCode = \$('#indTel option[value=\"' + selectedCountryId + '\"]').data('code');
if (phoneCode) {
phoneCode = '+' + phoneCode;
\$('#phone_code').text(phoneCode);
\$('#phone_prefix_display').val(phoneCode);
} else {
resetPhonePrefix();
}
} else {
resetPhonePrefix();
}
}
function resetPhonePrefix() {
\$('#phone_code').text('+XX');
\$('#phone_prefix_display').val('+XX');
}
\$('#language-select').on('change', function() {
var lang = \$(this).val();
console.log('Langue changée vers: ' + lang);
});
});
</script>
{% endblock %}", "user/register.html.twig", "/var/www/inserjeune.km/templates/user/register.html.twig");
}
}