mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-13 11:08:18 -06:00
netbox-community/netbox#6905: Add tenant as search field to vlan prefix assign form
This commit is contained in:
parent
8b510b3b5e
commit
7d8a6d449d
@ -7,6 +7,7 @@ from extras.models import Tag
|
||||
from ipam.constants import *
|
||||
from ipam.models import *
|
||||
from tenancy.forms import TenancyForm
|
||||
from tenancy.models import Tenant
|
||||
from utilities.forms import (
|
||||
BootstrapMixin, ContentTypeChoiceField, DatePicker, DynamicModelChoiceField, DynamicModelMultipleChoiceField,
|
||||
NumericArrayField, SlugField, StaticSelect, StaticSelectMultiple,
|
||||
@ -208,7 +209,12 @@ class PrefixAssignForm(BootstrapMixin, forms.Form):
|
||||
site_id = DynamicModelChoiceField(
|
||||
queryset=Site.objects.all(),
|
||||
required=False,
|
||||
label='Site'
|
||||
label='Site',
|
||||
)
|
||||
tenant_id = DynamicModelChoiceField(
|
||||
queryset=Tenant.objects.all(),
|
||||
required=False,
|
||||
label='Tenant',
|
||||
)
|
||||
vrf_id = DynamicModelChoiceField(
|
||||
queryset=VRF.objects.all(),
|
||||
|
@ -20,6 +20,7 @@
|
||||
<div class="field-group">
|
||||
<h6>Select Prefix</h6>
|
||||
{% render_field form.site_id %}
|
||||
{% render_field form.tenant_id %}
|
||||
{% render_field form.vrf_id %}
|
||||
{% render_field form.q %}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user