Skip to content

Commit 2ccbcc8

Browse files
committed
Use tag label_tag instead of manually using <label>
1 parent 5d20339 commit 2ccbcc8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

djangoproject/templates/contact/foundation.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,22 @@ <h1>{% translate "Contact the Django Software Foundation" %}</h1>
3232
<form action="." method="post" accept-charset="utf-8" class="form-input">
3333
{% csrf_token %}
3434
<p>
35-
<label for="{{ form.name.id_for_label }}">{{ form.name.label }}</label>
35+
{{ form.name.label_tag }}
3636
{% if form.name.errors %}<p class="errors">{{ form.name.errors.as_text }}</p>{% endif %}
3737
{{ form.name }}
3838
</p>
3939
<p class="form-email">
40-
<label for="{{ form.email.id_for_label }}">{{ form.email.label }}</label>
40+
{{ form.email.label_tag }}
4141
{% if form.email.errors %}<p class="errors">{{ form.email.errors.as_text }}</p>{% endif %}
4242
{{ form.email }}
4343
</p>
4444
<p>
45-
<label for="{{ form.message_subject.id_for_label }}">{{ form.message_subject.label }}</label>
45+
{{ form.message_subject.label_tag }}
4646
{% if form.message_subject.errors %}<p class="errors">{{ form.message_subject.errors.as_text }}</p>{% endif %}
4747
{{ form.message_subject }}
4848
</p>
4949
<p>
50-
<label for="{{ form.body.id_for_label }}">{{ form.body.label }}</label>
50+
{{ form.body.label_tag }}
5151
{% if form.body.errors %}<p class="errors">{{ form.body.errors.as_text }}</p>{% endif %}
5252
{{ form.body }}
5353
</p>

0 commit comments

Comments
 (0)