{# templates/frontend/reset_password/reset.html.twig #} {% extends 'frontend/base_front.html.twig' %} {% form_theme resetForm with ['bootstrap_5_layout.html.twig'] %} {% block title %}Choisis ton nouveau mot de passe – Bluesy{% endblock %} {% block main_content %}
{# -------- Header -------- #}

Nouveau mot de passe

{# -------- Formulaire -------- #}
{{ form_start(resetForm, { attr: { novalidate: 'novalidate' } }) }}
8 caractères minimum – chiffre & lettre recommandés.
{# Champ 1 #} {% set first = resetForm.newPassword.first %} {% set firstId = first.vars.id %}
{{ form_label(first, 'Nouveau mot de passe', { label_attr:{class:'form-label fw-semibold'} }) }}
{{ form_widget(first, { type:'password', attr:{ id:firstId, class:'form-control' ~ (first.vars.errors|length ? ' is-invalid' : ''), placeholder:'••••••••' } }) }}
{% for error in first.vars.errors %}
{{ error.message }}
{% endfor %}
{# Champ 2 #} {% set second = resetForm.newPassword.second %} {% set secondId = second.vars.id %}
{{ form_label(second, 'Confirmation', { label_attr:{class:'form-label fw-semibold'} }) }}
{{ form_widget(second, { type:'password', attr:{ id:secondId, class:'form-control' ~ (second.vars.errors|length ? ' is-invalid' : ''), placeholder:'••••••••' } }) }}
{% for error in second.vars.errors %}
{{ error.message }}
{% endfor %}
{{ form_end(resetForm) }}
{% endblock %}