mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
implement 3664
This commit is contained in:
@@ -246,7 +246,7 @@ class ConfigContextForm(BootstrapMixin, forms.ModelForm):
|
||||
model = ConfigContext
|
||||
fields = [
|
||||
'name', 'weight', 'description', 'is_active', 'regions', 'sites', 'roles', 'platforms', 'tenant_groups',
|
||||
'tenants', 'data',
|
||||
'tenants', 'tags', 'data',
|
||||
]
|
||||
widgets = {
|
||||
'regions': APISelectMultiple(
|
||||
@@ -266,6 +266,9 @@ class ConfigContextForm(BootstrapMixin, forms.ModelForm):
|
||||
),
|
||||
'tenants': APISelectMultiple(
|
||||
api_url="/api/tenancy/tenants/"
|
||||
),
|
||||
'tags': APISelectMultiple(
|
||||
api_url="/api/extras/tags/"
|
||||
)
|
||||
}
|
||||
|
||||
@@ -347,6 +350,14 @@ class ConfigContextFilterForm(BootstrapMixin, forms.Form):
|
||||
value_field="slug",
|
||||
)
|
||||
)
|
||||
tag = FilterChoiceField(
|
||||
queryset=Tag.objects.all(),
|
||||
to_field_name='slug',
|
||||
widget=APISelectMultiple(
|
||||
api_url="/api/extras/tags/",
|
||||
value_field="slug",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user