mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 20:12:00 -06:00
parent
c2dc243c7c
commit
b38bb64c81
@ -1,3 +1,11 @@
|
||||
# v2.6.11 (FUTURE)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
* [#3831](https://github.com/netbox-community/netbox/issues/3831) - Fix API-driven filter field rendering (#3812 regression)
|
||||
|
||||
---
|
||||
|
||||
# v2.6.10 (2020-01-02)
|
||||
|
||||
## Enhancements
|
||||
|
@ -302,6 +302,9 @@ class CircuitFilterForm(BootstrapMixin, TenancyFilterForm, CustomFieldFilterForm
|
||||
widget=APISelectMultiple(
|
||||
api_url="/api/dcim/regions/",
|
||||
value_field="slug",
|
||||
filter_for={
|
||||
'site': 'region'
|
||||
}
|
||||
)
|
||||
)
|
||||
site = FilterChoiceField(
|
||||
|
@ -651,16 +651,15 @@ class RackFilterForm(BootstrapMixin, TenancyFilterForm, CustomFieldFilterForm):
|
||||
}
|
||||
)
|
||||
)
|
||||
group_id = ChainedModelChoiceField(
|
||||
label='Rack group',
|
||||
queryset=RackGroup.objects.prefetch_related('site'),
|
||||
chains=(
|
||||
('site', 'site'),
|
||||
group_id = FilterChoiceField(
|
||||
queryset=RackGroup.objects.prefetch_related(
|
||||
'site'
|
||||
),
|
||||
required=False,
|
||||
label='Rack group',
|
||||
null_label='-- None --',
|
||||
widget=APISelectMultiple(
|
||||
api_url="/api/dcim/rack-groups/",
|
||||
null_option=True,
|
||||
null_option=True
|
||||
)
|
||||
)
|
||||
status = forms.MultipleChoiceField(
|
||||
|
@ -1,5 +1,9 @@
|
||||
<select name="{{ widget.name }}"{% include "django/forms/widgets/attrs.html" %}>{% for group_name, group_choices, group_index in widget.optgroups %}{% if group_name %}
|
||||
<optgroup label="{{ group_name }}">{% endif %}{% for widget in group_choices %}{% if widget.attrs.selected %}
|
||||
{% include widget.template_name %}{% endif %}{% endfor %}{% if group_name %}
|
||||
</optgroup>{% endif %}{% endfor %}
|
||||
<select name="{{ widget.name }}"{% include "django/forms/widgets/attrs.html" %}>
|
||||
{% for group_name, group_choices, group_index in widget.optgroups %}
|
||||
{% if group_name %}<optgroup label="{{ group_name }}">{% endif %}
|
||||
{% for option in group_choices %}
|
||||
{% if option.attrs.selected or option.value == "null" %}{% include option.template_name with widget=option %}{% endif %}
|
||||
{% endfor %}
|
||||
{% if group_name %}</optgroup>{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
@ -563,7 +563,9 @@ class VirtualMachineFilterForm(BootstrapMixin, TenancyFilterForm, CustomFieldFil
|
||||
widget=APISelectMultiple(
|
||||
api_url='/api/dcim/regions/',
|
||||
value_field="slug",
|
||||
null_option=True,
|
||||
filter_for={
|
||||
'site': 'region'
|
||||
}
|
||||
)
|
||||
)
|
||||
site = FilterChoiceField(
|
||||
|
Loading…
Reference in New Issue
Block a user