mirror of
https://github.com/netbox-community/netbox.git
synced 2026-03-26 11:21:47 +01:00
* Closes #18045: Enable adding a new MAC to an interface via quick add * Misc cleanup
This commit is contained in:
@@ -3,9 +3,7 @@ from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from dcim.choices import *
|
||||
from dcim.constants import *
|
||||
from dcim.models import MACAddress
|
||||
from utilities.forms import get_field_value
|
||||
from utilities.forms.fields import DynamicModelChoiceField
|
||||
|
||||
__all__ = (
|
||||
'InterfaceCommonForm',
|
||||
@@ -20,12 +18,6 @@ class InterfaceCommonForm(forms.Form):
|
||||
max_value=INTERFACE_MTU_MAX,
|
||||
label=_('MTU')
|
||||
)
|
||||
primary_mac_address = DynamicModelChoiceField(
|
||||
queryset=MACAddress.objects.all(),
|
||||
label=_('Primary MAC address'),
|
||||
required=False,
|
||||
quick_add=True
|
||||
)
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user