1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #2622: Enable filtering cables by multiple types/colors

This commit is contained in:
Jeremy Stretch
2018-11-28 14:22:55 -05:00
parent 5acd429c55
commit 08b4b24296
5 changed files with 39 additions and 36 deletions

View File

@@ -2501,9 +2501,10 @@ class CableFilterForm(BootstrapMixin, forms.Form):
annotate_field='type',
required=False
)
color = forms.ChoiceField(
choices=add_blank_choice(COLOR_CHOICES),
widget=ColorSelect(),
color = AnnotatedMultipleChoiceField(
choices=COLOR_CHOICES,
annotate=Cable.objects.all(),
annotate_field='color',
required=False
)