mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #9844 - Add dedicated device_vlan
form field
This commit is contained in:
@ -906,8 +906,9 @@ class L2VPNTerminationForm(NetBoxModelForm):
|
|||||||
label='L2VPN',
|
label='L2VPN',
|
||||||
fetch_trigger='open'
|
fetch_trigger='open'
|
||||||
)
|
)
|
||||||
device = DynamicModelChoiceField(
|
device_vlan = DynamicModelChoiceField(
|
||||||
queryset=Device.objects.all(),
|
queryset=Device.objects.all(),
|
||||||
|
label="Available on Device",
|
||||||
required=False,
|
required=False,
|
||||||
query_params={}
|
query_params={}
|
||||||
)
|
)
|
||||||
@ -915,10 +916,15 @@ class L2VPNTerminationForm(NetBoxModelForm):
|
|||||||
queryset=VLAN.objects.all(),
|
queryset=VLAN.objects.all(),
|
||||||
required=False,
|
required=False,
|
||||||
query_params={
|
query_params={
|
||||||
'available_on_device': '$device'
|
'available_on_device': '$device_vlan'
|
||||||
},
|
},
|
||||||
label='VLAN'
|
label='VLAN'
|
||||||
)
|
)
|
||||||
|
device = DynamicModelChoiceField(
|
||||||
|
queryset=Device.objects.all(),
|
||||||
|
required=False,
|
||||||
|
query_params={}
|
||||||
|
)
|
||||||
interface = DynamicModelChoiceField(
|
interface = DynamicModelChoiceField(
|
||||||
queryset=Interface.objects.all(),
|
queryset=Interface.objects.all(),
|
||||||
required=False,
|
required=False,
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="tab-content p-0 border-0">
|
<div class="tab-content p-0 border-0">
|
||||||
<div class="tab-pane {% if not form.initial.interface or form.initial.vminterface %}active{% endif %}" id="vlan" role="tabpanel" aria-labeled-by="vlan_tab">
|
<div class="tab-pane {% if not form.initial.interface or form.initial.vminterface %}active{% endif %}" id="vlan" role="tabpanel" aria-labeled-by="vlan_tab">
|
||||||
{% render_field form.device %}
|
{% render_field form.device_vlan %}
|
||||||
{% render_field form.vlan %}
|
{% render_field form.vlan %}
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane {% if form.initial.interface %}active{% endif %}" id="interface" role="tabpanel" aria-labeled-by="interface_tab">
|
<div class="tab-pane {% if form.initial.interface %}active{% endif %}" id="interface" role="tabpanel" aria-labeled-by="interface_tab">
|
||||||
|
Reference in New Issue
Block a user