{# Header #}

Paramètres de Sécurité

Gérez la sécurité de votre compte

{# Layout 2/3 + 1/3 #}
{# Left Column - 2/3 - Security Settings Form #}
{{ form_start(securityForm, {'attr': {'data-controller': 'form-submit'}}) }}
{# Security Options #}

Options de sécurité

{# 2FA Toggle #} {% if securityForm.twoFactorEnabled is defined %}

Authentification à deux facteurs (2FA)

Ajoutez une couche de sécurité supplémentaire à votre compte

{{ form_widget(securityForm.twoFactorEnabled, { 'attr': { 'class': 'w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[\'\'] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600' } }) }}
{% endif %} {# IP Validation Toggle #} {% if securityForm.ipValidationEnabled is defined %}

Validation de l'adresse IP

Nécessite une validation lors de connexion depuis une nouvelle IP

{{ form_widget(securityForm.ipValidationEnabled, { 'attr': { 'class': 'w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[\'\'] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600' } }) }}
{% endif %} {# Login Alerts Toggle #} {% if securityForm.receiveLoginAlerts is defined %}

Alertes de connexion

Recevez un email lors de chaque nouvelle connexion à votre compte

{{ form_widget(securityForm.receiveLoginAlerts, { 'attr': { 'class': 'w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[\'\'] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600' } }) }}
{% endif %}
{{ form_rest(securityForm) }}
{# Password Confirmation + Submit - At Bottom #}

Saisissez votre mot de passe actuel pour valider les modifications

{{ form_label(securityForm.currentPassword, 'Mot de passe actuel', {'label_attr': {'class': 'block text-sm font-medium text-amber-900 mb-2'}}) }}
{{ form_widget(securityForm.currentPassword, { 'attr': { 'class': 'w-full px-4 py-3 pr-12 border border-amber-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-amber-500 focus:border-transparent transition-all duration-200 bg-white', 'placeholder': 'Entrez votre mot de passe pour confirmer', 'data-password-toggle-target': 'input', 'data-password-gate-target': 'password', 'data-action': 'input->password-gate#check' } }) }}
{{ form_errors(securityForm.currentPassword) }}
{# Submit Button #}
Annuler
{{ form_end(securityForm) }}
{# Right Column - 1/3 - Connected Devices #}

Appareils connectés

{% if devices is defined and devices|length > 0 %} {{ devices|length }} {% endif %}
{% if devices is defined and devices|length > 0 %}
{% for device in devices %}
{% if 'Mobile' in device.deviceType %} {% else %} {% endif %}

{{ device.deviceName }}

{% if device.isTrusted %} Approuvé {% endif %}

{{ device.browser }}

{{ device.lastIpAddress }} {{ device.lastSeenAt|date('d/m/Y H:i') }}
{% if not device.isTrusted %}
{% endif %}
{% endfor %}
{% else %}

Aucun appareil connecté

{% endif %}