File tree Expand file tree Collapse file tree 2 files changed +25
-4
lines changed
examples/regular-django/example/templates/allauth/elements Expand file tree Collapse file tree 2 files changed +25
-4
lines changed Original file line number Diff line number Diff line change 21
21
</ div >
22
22
{% elif attrs.type == "textarea" %}
23
23
< div class ="mb-3 ">
24
- < label class ="" for ="{{ attrs.id }} ">
24
+ < label for ="{{ attrs.id }} ">
25
25
{% slot label %}
26
26
{% endslot %}
27
27
</ label >
39
39
id ="{{ attrs.id }} "
40
40
{% if attrs.value is not None %}value ="{{ attrs.value }} "{% endif %}
41
41
type ="hidden ">
42
+ {% elif attrs.type == "select" %}
43
+ < div class ="{% if attrs.unlabeled %}form-floating{% endif %} mb-3 ">
44
+ {% if not attrs.unlabeled %}
45
+ < label for ="{{ attrs.id }} ">
46
+ {% slot label %}
47
+ {% endslot %}
48
+ </ label >
49
+ {% endif %}
50
+ < select id ="{{ attrs.id }} " name ="{{ attrs.name }} " class ="form-select ">
51
+ {% for option in attrs.choices %}
52
+ < option {% if option.0 == attrs.value %}selected{% endif %}
53
+ value ="{{ option.0 }} "> {{ option.1 }}</ option >
54
+ {% endfor %}
55
+ </ select >
56
+ {% if attrs.unlabeled %}
57
+ < label for ="{{ attrs.id }} ">
58
+ {% slot label %}
59
+ {% endslot %}
60
+ </ label >
61
+ {% endif %}
62
+ </ div >
42
63
{% else %}
43
64
< div class ="{% if attrs.unlabeled %}form-floating{% endif %} mb-3 ">
44
65
{% if not attrs.unlabeled %}
45
- < label class ="" for ="{{ attrs.id }} ">
66
+ < label for ="{{ attrs.id }} ">
46
67
{% slot label %}
47
68
{% endslot %}
48
69
</ label >
60
81
{% if attrs.value is not None %}value ="{{ attrs.value }} "{% endif %}
61
82
type ="{{ attrs.type }} ">
62
83
{% if attrs.unlabeled %}
63
- < label class ="" for ="{{ attrs.id }} ">
84
+ < label for ="{{ attrs.id }} ">
64
85
{% slot label %}
65
86
{% endslot %}
66
87
</ label >
Original file line number Diff line number Diff line change 1
1
{% load allauth %}
2
2
{% for bound_field in attrs.form %}
3
- {% 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 %}
3
+ {% 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
4
{% slot label %}
5
5
{{ bound_field.label }}
6
6
{% endslot %}
You can’t perform that action at this time.
0 commit comments