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

Closes #10545: Standardize description & comment fields on primary models (#10834)

* Standardize description & comments fields on primary models

* Update REST API serializers

* Update forms

* Update tables

* Update templates
This commit is contained in:
Jeremy Stretch
2022-11-04 08:28:09 -04:00
committed by GitHub
parent e2f5ee661a
commit bc6b5bc4be
105 changed files with 1014 additions and 534 deletions

View File

@ -2,7 +2,7 @@ from django import forms
from netbox.forms import NetBoxModelBulkEditForm
from tenancy.models import *
from utilities.forms import DynamicModelChoiceField
from utilities.forms import CommentField, DynamicModelChoiceField, SmallTextarea
__all__ = (
'ContactBulkEditForm',
@ -101,9 +101,17 @@ class ContactBulkEditForm(NetBoxModelBulkEditForm):
link = forms.URLField(
required=False
)
description = forms.CharField(
max_length=200,
required=False
)
comments = CommentField(
widget=SmallTextarea,
label='Comments'
)
model = Contact
fieldsets = (
(None, ('group', 'title', 'phone', 'email', 'address', 'link')),
(None, ('group', 'title', 'phone', 'email', 'address', 'link', 'description')),
)
nullable_fields = ('group', 'title', 'phone', 'email', 'address', 'link', 'comments')
nullable_fields = ('group', 'title', 'phone', 'email', 'address', 'link', 'description', 'comments')