diff --git a/netbox/templates/django/forms/widgets/attrs.html b/netbox/templates/django/forms/widgets/attrs.html new file mode 100644 index 000000000..369ae0722 --- /dev/null +++ b/netbox/templates/django/forms/widgets/attrs.html @@ -0,0 +1,2 @@ +{# Skip "class" attribute, which needs to be handled on the widget directly. #} +{% for name, value in widget.attrs.items %}{% if name != 'class' %}{% if value is not False %} {{ name }}{% if value is not True %}="{{ value|stringformat:'s' }}"{% endif %}{% endif %}{% endif %}{% endfor %} diff --git a/netbox/templates/django/forms/widgets/checkbox.html b/netbox/templates/django/forms/widgets/checkbox.html index dc0496044..f769fce96 100644 --- a/netbox/templates/django/forms/widgets/checkbox.html +++ b/netbox/templates/django/forms/widgets/checkbox.html @@ -4,4 +4,4 @@ _selected_action to avoid breaking the admin UI. {% endcomment %} {% if widget.name != '_selected_action' %}{% endif %} - + diff --git a/netbox/templates/django/forms/widgets/clearable_file_input.html b/netbox/templates/django/forms/widgets/clearable_file_input.html new file mode 100644 index 000000000..a84b941fa --- /dev/null +++ b/netbox/templates/django/forms/widgets/clearable_file_input.html @@ -0,0 +1,5 @@ +{% if widget.is_initial %}{{ widget.initial_text }}: {{ widget.value }}{% if not widget.required %} + +{% endif %}
+{{ widget.input_text }}:{% endif %} + \ No newline at end of file diff --git a/netbox/templates/django/forms/widgets/input.html b/netbox/templates/django/forms/widgets/input.html index 7f41bef26..dd6058328 100644 --- a/netbox/templates/django/forms/widgets/input.html +++ b/netbox/templates/django/forms/widgets/input.html @@ -1 +1 @@ - + diff --git a/netbox/templates/django/forms/widgets/select.html b/netbox/templates/django/forms/widgets/select.html index 4ee1378ce..0e87394e3 100644 --- a/netbox/templates/django/forms/widgets/select.html +++ b/netbox/templates/django/forms/widgets/select.html @@ -1,4 +1,4 @@ -{% for group_name, group_choices, group_index in widget.optgroups %}{% if group_name %} {% endif %}{% for option in group_choices %} {% include option.template_name with widget=option %}{% endfor %}{% if group_name %} {% endif %}{% endfor %} diff --git a/netbox/templates/django/forms/widgets/textarea.html b/netbox/templates/django/forms/widgets/textarea.html index a179d3342..aed4dd3b0 100644 --- a/netbox/templates/django/forms/widgets/textarea.html +++ b/netbox/templates/django/forms/widgets/textarea.html @@ -1,2 +1,2 @@ - \ No newline at end of file