{% extends 'base.html.twig' %} {% block title %}Changement de mot de passe requis{% endblock %} {% block body %}
{# Header Section #}

Changement de mot de passe requis

Pour votre sécurité, veuillez définir un nouveau mot de passe

{# Form Card #}
{{ form_start(changePasswordForm, { 'attr': { 'class': 'space-y-6', 'data-controller': 'change-password', 'data-action': 'submit->change-password#handleSubmit' } }) }} {# Current Password (if needed) #} {% if changePasswordForm.currentPassword is defined %}
{{ form_label(changePasswordForm.currentPassword, 'Mot de passe actuel', { 'label_attr': {'class': 'block text-sm font-semibold text-gray-700 mb-2'} }) }}
{{ form_widget(changePasswordForm.currentPassword, { 'attr': { 'class': 'w-full px-4 py-3 pr-12 border-2 border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 transition-all', 'data-change-password-target': 'currentPassword', 'placeholder': 'Entrez votre mot de passe actuel' } }) }}
{{ form_errors(changePasswordForm.currentPassword) }}
{% endif %} {# New Password #}
{{ form_label(changePasswordForm.newPassword.first, 'Nouveau mot de passe', { 'label_attr': {'class': 'block text-sm font-semibold text-gray-700 mb-2'} }) }}
{{ form_widget(changePasswordForm.newPassword.first, { 'attr': { 'class': 'w-full px-4 py-3 pr-12 border-2 border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 transition-all', 'data-change-password-target': 'newPassword', 'placeholder': 'Minimum 8 caractères' } }) }}
{{ form_errors(changePasswordForm.newPassword.first) }}
{# Confirm Password #}
{{ form_label(changePasswordForm.newPassword.second, 'Confirmer le mot de passe', { 'label_attr': {'class': 'block text-sm font-semibold text-gray-700 mb-2'} }) }}
{{ form_widget(changePasswordForm.newPassword.second, { 'attr': { 'class': 'w-full px-4 py-3 pr-12 border-2 border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 transition-all', 'data-change-password-target': 'confirmPassword', 'placeholder': 'Confirmez votre mot de passe' } }) }}
{{ form_errors(changePasswordForm.newPassword.second) }}
{# Password Requirements #}

Votre mot de passe doit contenir :

  • Au moins 8 caractères
  • Une lettre majuscule et minuscule
  • Au moins un chiffre
{{ form_rest(changePasswordForm) }} {# Submit Button #}
{{ form_end(changePasswordForm) }}
{# Footer #}

© {{ 'now'|date('Y') }} {{ system_name|default('2AB Portal') }}. Tous droits réservés.

{% endblock %}