Skip to content

Commit 370cdb0

Browse files
authored
Fixed #1818 (#1829)
1 parent 7104276 commit 370cdb0

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

src/templates/allauth/elements/field.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
{% if attrs.readonly %}readonly{% endif %}
2828
{% if attrs.checked %}checked{% endif %}
2929
{% if attrs.name %}name="{{ attrs.name }}"{% endif %}
30+
{% if attrs.name == "code" %}autofocus{% endif %}
3031
{% if attrs.id %}id="{{ attrs.id }}"{% endif %}
3132
{% if attrs.placeholder %}placeholder="{{ attrs.placeholder }}"{% endif %}
3233
{% if attrs.autocomplete %}autocomplete="{{ attrs.autocomplete }}"{% endif %}
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
{% load allauth %}
22
{% for bound_field in attrs.form %}
33
{% element field unlabeled=attrs.unlabeled name=bound_field.name type=bound_field.field.widget.input_type required=bound_field.field.required value=bound_field.value id=bound_field.auto_id errors=bound_field.errors placeholder=bound_field.field.widget.attrs.placeholder tabindex=bound_field.field.widget.attrs.tabindex autocomplete=bound_field.field.widget.attrs.autocomplete style=bound_field.field.widget.attrs.style choices=bound_field.field.choices %}
4-
{% slot label %}
5-
{{ bound_field.label }}
6-
{% endslot %}
7-
{% slot help_text %}
8-
{{ bound_field.field.help_text }}
9-
{% endslot %}
4+
{% if bound_field.field.widget.input_type != "hidden" %}
5+
{% slot label %}
6+
{{ bound_field.label }}
7+
{% endslot %}
8+
{% slot help_text %}
9+
{{ bound_field.field.help_text }}
10+
{% endslot %}
11+
{% endif %}
1012
{% endelement %}
1113
{% endfor %}

0 commit comments

Comments
 (0)