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

Fixes #11694 - Remove obsolete SmallTextarea widget

This commit is contained in:
kkthxbye-code
2023-02-10 22:29:34 +01:00
committed by jeremystretch
parent c8faca01f1
commit 8d68b6a2e6
10 changed files with 44 additions and 53 deletions

View File

@@ -11,7 +11,7 @@ from netbox.forms import NetBoxModelBulkEditForm
from tenancy.models import Tenant
from utilities.forms import (
add_blank_choice, BulkEditForm, BulkEditNullBooleanSelect, ColorField, CommentField, DynamicModelChoiceField,
DynamicModelMultipleChoiceField, form_from_model, SmallTextarea, StaticSelect, SelectSpeedWidget,
DynamicModelMultipleChoiceField, form_from_model, StaticSelect, SelectSpeedWidget,
)
__all__ = (
@@ -138,7 +138,7 @@ class SiteBulkEditForm(NetBoxModelBulkEditForm):
required=False
)
comments = CommentField(
widget=SmallTextarea,
widget=forms.Textarea,
label='Comments'
)
@@ -309,7 +309,7 @@ class RackBulkEditForm(NetBoxModelBulkEditForm):
required=False
)
comments = CommentField(
widget=SmallTextarea,
widget=forms.Textarea,
label='Comments'
)
@@ -345,7 +345,7 @@ class RackReservationBulkEditForm(NetBoxModelBulkEditForm):
required=False
)
comments = CommentField(
widget=SmallTextarea,
widget=forms.Textarea,
label='Comments'
)
@@ -406,7 +406,7 @@ class DeviceTypeBulkEditForm(NetBoxModelBulkEditForm):
required=False
)
comments = CommentField(
widget=SmallTextarea,
widget=forms.Textarea,
label='Comments'
)
@@ -441,7 +441,7 @@ class ModuleTypeBulkEditForm(NetBoxModelBulkEditForm):
required=False
)
comments = CommentField(
widget=SmallTextarea,
widget=forms.Textarea,
label='Comments'
)
@@ -551,7 +551,7 @@ class DeviceBulkEditForm(NetBoxModelBulkEditForm):
required=False
)
comments = CommentField(
widget=SmallTextarea,
widget=forms.Textarea,
label='Comments'
)
@@ -594,7 +594,7 @@ class ModuleBulkEditForm(NetBoxModelBulkEditForm):
required=False
)
comments = CommentField(
widget=SmallTextarea,
widget=forms.Textarea,
label='Comments'
)
@@ -644,7 +644,7 @@ class CableBulkEditForm(NetBoxModelBulkEditForm):
required=False
)
comments = CommentField(
widget=SmallTextarea,
widget=forms.Textarea,
label='Comments'
)
@@ -668,7 +668,7 @@ class VirtualChassisBulkEditForm(NetBoxModelBulkEditForm):
required=False
)
comments = CommentField(
widget=SmallTextarea,
widget=forms.Textarea,
label='Comments'
)
@@ -714,7 +714,7 @@ class PowerPanelBulkEditForm(NetBoxModelBulkEditForm):
required=False
)
comments = CommentField(
widget=SmallTextarea,
widget=forms.Textarea,
label='Comments'
)
@@ -776,7 +776,7 @@ class PowerFeedBulkEditForm(NetBoxModelBulkEditForm):
required=False
)
comments = CommentField(
widget=SmallTextarea,
widget=forms.Textarea,
label=_('Comments')
)

View File

@@ -12,7 +12,7 @@ from netbox.forms import NetBoxModelForm
from tenancy.forms import TenancyForm
from utilities.forms import (
APISelect, add_blank_choice, BootstrapMixin, ClearableFileInput, CommentField, ContentTypeChoiceField,
DynamicModelChoiceField, DynamicModelMultipleChoiceField, JSONField, NumericArrayField, SelectWithPK, SmallTextarea,
DynamicModelChoiceField, DynamicModelMultipleChoiceField, JSONField, NumericArrayField, SelectWithPK,
SlugField, StaticSelect, SelectSpeedWidget,
)
from virtualization.models import Cluster, ClusterGroup
@@ -149,12 +149,12 @@ class SiteForm(TenancyForm, NetBoxModelForm):
'description', 'physical_address', 'shipping_address', 'latitude', 'longitude', 'comments', 'tags',
)
widgets = {
'physical_address': SmallTextarea(
'physical_address': forms.Textarea(
attrs={
'rows': 3,
}
),
'shipping_address': SmallTextarea(
'shipping_address': forms.Textarea(
attrs={
'rows': 3,
}
@@ -470,7 +470,7 @@ class PlatformForm(NetBoxModelForm):
'name', 'slug', 'manufacturer', 'napalm_driver', 'napalm_args', 'description', 'tags',
]
widgets = {
'napalm_args': SmallTextarea(),
'napalm_args': forms.Textarea(),
}