fix: render plainPassword first/second fields separately in setup form
RepeatedType renders as a wrapper div when called as a single widget, producing unstyled inputs with no mismatch error handling. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -52,9 +52,21 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
{{ form_label(reg_form.plainPassword) }}
|
{{ form_label(reg_form.plainPassword.first) }}
|
||||||
{{ form_widget(reg_form.plainPassword, {attr: {
|
{{ form_widget(reg_form.plainPassword.first, {attr: {
|
||||||
id: 'reg-pass',
|
id: 'reg-pass',
|
||||||
|
autocomplete: 'new-password',
|
||||||
|
'aria-invalid': reg_form.plainPassword.first.vars.errors|length > 0 ? 'true' : 'false'
|
||||||
|
}}) }}
|
||||||
|
{% for error in reg_form.plainPassword.first.vars.errors %}
|
||||||
|
<p class="field-error" role="alert">{{ error.message }}</p>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
{{ form_label(reg_form.plainPassword.second) }}
|
||||||
|
{{ form_widget(reg_form.plainPassword.second, {attr: {
|
||||||
|
id: 'reg-pass-confirm',
|
||||||
|
autocomplete: 'new-password',
|
||||||
'aria-invalid': reg_form.plainPassword.vars.errors|length > 0 ? 'true' : 'false'
|
'aria-invalid': reg_form.plainPassword.vars.errors|length > 0 ? 'true' : 'false'
|
||||||
}}) }}
|
}}) }}
|
||||||
{% for error in reg_form.plainPassword.vars.errors %}
|
{% for error in reg_form.plainPassword.vars.errors %}
|
||||||
|
|||||||
Reference in New Issue
Block a user