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

Closes #15547: Add comments field to CustomField model

This commit is contained in:
Jeremy Stretch
2024-04-19 14:50:42 -04:00
parent 824d66a54c
commit 0f0ab1a3be
10 changed files with 44 additions and 10 deletions

View File

@ -5,7 +5,7 @@ from extras.choices import *
from extras.models import *
from netbox.forms import NetBoxModelBulkEditForm
from utilities.forms import BulkEditForm, add_blank_choice
from utilities.forms.fields import ColorField, DynamicModelChoiceField
from utilities.forms.fields import ColorField, CommentField, DynamicModelChoiceField
from utilities.forms.widgets import BulkEditNullBooleanSelect
__all__ = (
@ -64,6 +64,7 @@ class CustomFieldBulkEditForm(BulkEditForm):
required=False,
widget=BulkEditNullBooleanSelect()
)
comments = CommentField()
nullable_fields = ('group_name', 'description', 'choice_set')
@ -316,8 +317,4 @@ class JournalEntryBulkEditForm(BulkEditForm):
choices=add_blank_choice(JournalEntryKindChoices),
required=False
)
comments = forms.CharField(
label=_('Comments'),
required=False,
widget=forms.Textarea()
)
comments = CommentField()