{% load lucide ui %} {% comment %} allauth passes `unlabeled=True` on the entrance forms (login, signup, reset) and already sets a placeholder on each of their fields ("Email address", "Password"), so dropping the visible label loses nothing on screen. The label is still emitted sr-only inside the wrapper: a placeholder is not a label, and it disappears the moment you start typing. Fields with an icon use daisyUI's icon-in-field layout, where the `input` class goes on the *wrapping label* and the input itself carries only `grow`. Putting `input` on both draws a box inside a box. {% endcomment %} {% for field in attrs.form.hidden_fields %}{{ field }}{% endfor %} {% for error in attrs.form.non_field_errors %}
{{ error }}
{% endfor %} {% for field in attrs.form.visible_fields %}
{% if field.field.widget.input_type == "checkbox" %} {% else %} {% if not attrs.unlabeled %} {% endif %} {% with icon=field|field_icon %} {% if icon %} {% else %} {{ field|daisy }} {% endif %} {% endwith %} {% endif %} {% comment %} The password field's help_text is allauth's "Forgot your password?" link, so it gets room to breathe. The id is not decorative: Django points the input's aria-describedby at `_helptext`, and without it that reference dangles and the link is never announced. {% endcomment %} {% if field.help_text %}{{ field.help_text }}{% endif %} {% for error in field.errors %}{{ error }}{% endfor %}
{% endfor %}