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

Removed changes that will be covered in #3840

This commit is contained in:
Saria Hajjar
2020-01-05 09:10:46 +00:00
parent fa55571503
commit c45daca5f2

View File

@@ -2210,9 +2210,6 @@ class InterfaceForm(InterfaceCommonForm, BootstrapMixin, forms.ModelForm):
widget=APISelect(
api_url="/api/ipam/vlans/",
display_field='display_name',
additional_query_params={
'site_id': 'null'
},
full=True
)
)
@@ -2222,9 +2219,6 @@ class InterfaceForm(InterfaceCommonForm, BootstrapMixin, forms.ModelForm):
widget=APISelectMultiple(
api_url="/api/ipam/vlans/",
display_field='display_name',
additional_query_params={
'site_id': 'null'
},
full=True
)
)
@@ -2267,10 +2261,6 @@ class InterfaceForm(InterfaceCommonForm, BootstrapMixin, forms.ModelForm):
device__in=[self.instance.device, self.instance.device.get_vc_master()], type=IFACE_TYPE_LAG
)
# Add the current site to the list of filtered VLANs
self.fields['untagged_vlan'].widget.attrs['1-data-additional-query-param-site_id'] = self.instance.device.site.pk
self.fields['tagged_vlans'].widget.attrs['1-data-additional-query-param-site_id'] = self.instance.device.site.pk
class InterfaceCreateForm(InterfaceCommonForm, ComponentForm, forms.Form):
name_pattern = ExpandableNameField(
@@ -2322,9 +2312,6 @@ class InterfaceCreateForm(InterfaceCommonForm, ComponentForm, forms.Form):
widget=APISelect(
api_url="/api/ipam/vlans/",
display_field='display_name',
additional_query_params={
'site_id': 'null'
},
full=True
)
)
@@ -2334,9 +2321,6 @@ class InterfaceCreateForm(InterfaceCommonForm, ComponentForm, forms.Form):
widget=APISelectMultiple(
api_url="/api/ipam/vlans/",
display_field='display_name',
additional_query_params={
'site_id': 'null'
},
full=True
)
)
@@ -2357,10 +2341,6 @@ class InterfaceCreateForm(InterfaceCommonForm, ComponentForm, forms.Form):
else:
self.fields['lag'].queryset = Interface.objects.none()
# Add the current site to the list of filtered VLANs
self.fields['untagged_vlan'].widget.attrs['1-data-additional-query-param-site_id'] = self.parent.site.pk
self.fields['tagged_vlans'].widget.attrs['1-data-additional-query-param-site_id'] = self.parent.site.pk
class InterfaceBulkEditForm(InterfaceCommonForm, BootstrapMixin, AddRemoveTagsForm, BulkEditForm):
pk = forms.ModelMultipleChoiceField(
@@ -2412,9 +2392,6 @@ class InterfaceBulkEditForm(InterfaceCommonForm, BootstrapMixin, AddRemoveTagsFo
widget=APISelect(
api_url="/api/ipam/vlans/",
display_field='display_name',
additional_query_params={
'site_id': 'null'
},
full=True
)
)
@@ -2424,9 +2401,6 @@ class InterfaceBulkEditForm(InterfaceCommonForm, BootstrapMixin, AddRemoveTagsFo
widget=APISelectMultiple(
api_url="/api/ipam/vlans/",
display_field='display_name',
additional_query_params={
'site_id': 'null'
},
full=True
)
)
@@ -2449,10 +2423,6 @@ class InterfaceBulkEditForm(InterfaceCommonForm, BootstrapMixin, AddRemoveTagsFo
else:
self.fields['lag'].choices = []
# Add the current site to the list of filtered VLANs
self.fields['untagged_vlan'].widget.attrs['1-data-additional-query-param-site_id'] = self.parent_obj.site.pk
self.fields['tagged_vlans'].widget.attrs['1-data-additional-query-param-site_id'] = self.parent_obj.site.pk
class InterfaceBulkRenameForm(BulkRenameForm):
pk = forms.ModelMultipleChoiceField(