Fix rendering of form textareas

This commit is contained in:
jeremystretch 2023-03-20 13:14:11 -04:00
parent 9219397208
commit 13d604d44e
2 changed files with 1 additions and 3 deletions

View File

@ -27,7 +27,6 @@ class DataSourceBulkEditForm(NetBoxModelBulkEditForm):
required=False
)
comments = CommentField(
widget=forms.Textarea,
label=_('Comments')
)
parameters = forms.JSONField(

View File

@ -6,8 +6,7 @@
{# Render the field label, except for: #}
{# 1. Checkboxes (label appears to the right of the field #}
{# 2. Textareas with no label set (will expand across entire row) #}
{% if field|widget_type == 'checkboxinput' or field|widget_type == 'textarea' or field|widget_type == 'markdownwidget' and not label %}
{% else %}
{% if label and not field|widget_type == 'checkboxinput' %}
<label for="{{ field.id_for_label }}" class="col-sm-3 col-form-label text-lg-end{% if field.field.required %} required{% endif %}">
{{ label }}
</label>