Skip to content

Commit 8deaaae

Browse files
authored
Fixes: #17083 - Wrap labels in a div to reduce inadvertently clickable area to their left in forms (#17525)
* Wrap labels in a div to reduce inadvertently clickable area to their left in forms * Set form label to be inline-block
1 parent 6d0a348 commit 8deaaae

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

netbox/utilities/templates/form_helpers/render_field.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
66

77
{# Render the field label (if any), except for checkboxes #}
88
{% if label and not field|widget_type == 'checkboxinput' %}
9-
<label for="{{ field.id_for_label }}" class="col-sm-3 col-form-label text-lg-end{% if field.field.required %} required{% endif %}">
10-
{{ label }}
11-
</label>
9+
<div class="col-sm-3 text-lg-end">
10+
<label for="{{ field.id_for_label }}" class="col-form-label d-inline-block{% if field.field.required %} required{% endif %}">
11+
{{ label }}
12+
</label>
13+
</div>
1214
{% endif %}
1315

1416
{# Render the field itself #}

0 commit comments

Comments
 (0)