|
|
@@ -491,11 +491,6 @@ class PrefixForm(BootstrapMixin, TenancyForm, CustomFieldModelForm):
|
|
|
'status': StaticSelect(),
|
|
|
}
|
|
|
|
|
|
- def __init__(self, *args, **kwargs):
|
|
|
- super().__init__(*args, **kwargs)
|
|
|
-
|
|
|
- self.fields['vrf'].empty_label = 'Global'
|
|
|
-
|
|
|
|
|
|
class PrefixCSVForm(CustomFieldModelCSVForm):
|
|
|
vrf = CSVModelChoiceField(
|
|
|
@@ -760,11 +755,6 @@ class IPRangeForm(BootstrapMixin, TenancyForm, CustomFieldModelForm):
|
|
|
'status': StaticSelect(),
|
|
|
}
|
|
|
|
|
|
- def __init__(self, *args, **kwargs):
|
|
|
- super().__init__(*args, **kwargs)
|
|
|
-
|
|
|
- self.fields['vrf'].empty_label = 'Global'
|
|
|
-
|
|
|
|
|
|
class IPRangeCSVForm(CustomFieldModelCSVForm):
|
|
|
vrf = CSVModelChoiceField(
|
|
|
@@ -1026,8 +1016,6 @@ class IPAddressForm(BootstrapMixin, TenancyForm, CustomFieldModelForm):
|
|
|
|
|
|
super().__init__(*args, **kwargs)
|
|
|
|
|
|
- self.fields['vrf'].empty_label = 'Global'
|
|
|
-
|
|
|
# Initialize primary_for_parent if IP address is already assigned
|
|
|
if self.instance.pk and self.instance.assigned_object:
|
|
|
parent = self.instance.assigned_object.parent_object
|
|
|
@@ -1102,10 +1090,6 @@ class IPAddressBulkAddForm(BootstrapMixin, TenancyForm, CustomFieldModelForm):
|
|
|
'role': StaticSelect(),
|
|
|
}
|
|
|
|
|
|
- def __init__(self, *args, **kwargs):
|
|
|
- super().__init__(*args, **kwargs)
|
|
|
- self.fields['vrf'].empty_label = 'Global'
|
|
|
-
|
|
|
|
|
|
class IPAddressCSVForm(CustomFieldModelCSVForm):
|
|
|
vrf = CSVModelChoiceField(
|
|
|
@@ -1256,8 +1240,7 @@ class IPAddressAssignForm(BootstrapMixin, forms.Form):
|
|
|
vrf_id = DynamicModelChoiceField(
|
|
|
queryset=VRF.objects.all(),
|
|
|
required=False,
|
|
|
- label='VRF',
|
|
|
- empty_label='Global'
|
|
|
+ label='VRF'
|
|
|
)
|
|
|
q = forms.CharField(
|
|
|
required=False,
|