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

ipam.VLAN: Added description field, extended name to 64 chars

This commit is contained in:
Jeremy Stretch
2016-07-25 14:58:49 -04:00
parent c466dc5999
commit d241cce502
8 changed files with 51 additions and 6 deletions

View File

@ -474,7 +474,7 @@ class VLANForm(forms.ModelForm, BootstrapMixin):
class Meta:
model = VLAN
fields = ['site', 'group', 'vid', 'name', 'status', 'role']
fields = ['site', 'group', 'vid', 'name', 'description', 'status', 'role']
help_texts = {
'site': "The site at which this VLAN exists",
'group': "VLAN group (optional)",
@ -511,7 +511,7 @@ class VLANFromCSVForm(forms.ModelForm):
class Meta:
model = VLAN
fields = ['site', 'group', 'vid', 'name', 'status_name', 'role']
fields = ['site', 'group', 'vid', 'name', 'status_name', 'role', 'description']
def save(self, *args, **kwargs):
m = super(VLANFromCSVForm, self).save(commit=False)
@ -532,6 +532,7 @@ class VLANBulkEditForm(forms.Form, BootstrapMixin):
group = forms.ModelChoiceField(queryset=VLANGroup.objects.all(), required=False)
status = forms.ChoiceField(choices=FORM_VLAN_STATUS_CHOICES, required=False)
role = forms.ModelChoiceField(queryset=Role.objects.all(), required=False)
description = forms.CharField(max_length=100, required=False)
class VLANBulkDeleteForm(ConfirmationForm):