templates: avoid empty id attribute in widget (#74541)
gitea/gadjo/pipeline/head This commit looks good Details

This commit is contained in:
Valentin Deniaud 2023-02-15 11:53:11 +01:00
parent 3d57dc94f0
commit bbcd17465f
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@
django-{{ field|field_class_name }}
{% if field.errors %}widget-with-error{% endif %}
{% if field.field.required %}widget-required{% else %}widget-optional{% endif %}"
id="{{field.id_for_label}}_p">
{% if field.id_for_label %}id="{{field.id_for_label}}_p"{% endif %}>
{% block widget-title %}
<div class="title" id="{{ field.name }}">
{{ field.label_tag }}