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:
committed by
jeremystretch
parent
c8faca01f1
commit
8d68b6a2e6
@ -7,8 +7,7 @@ from ipam.models import ASN
|
||||
from netbox.forms import NetBoxModelBulkEditForm
|
||||
from tenancy.models import Tenant
|
||||
from utilities.forms import (
|
||||
add_blank_choice, CommentField, DatePicker, DynamicModelChoiceField, DynamicModelMultipleChoiceField, SmallTextarea,
|
||||
StaticSelect,
|
||||
add_blank_choice, CommentField, DatePicker, DynamicModelChoiceField, DynamicModelMultipleChoiceField, StaticSelect,
|
||||
)
|
||||
|
||||
__all__ = (
|
||||
@ -35,7 +34,7 @@ class ProviderBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=SmallTextarea,
|
||||
widget=forms.Textarea,
|
||||
label=_('Comments')
|
||||
)
|
||||
|
||||
@ -63,7 +62,7 @@ class ProviderNetworkBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=SmallTextarea,
|
||||
widget=forms.Textarea,
|
||||
label=_('Comments')
|
||||
)
|
||||
|
||||
@ -125,7 +124,7 @@ class CircuitBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=SmallTextarea,
|
||||
widget=forms.Textarea,
|
||||
label=_('Comments')
|
||||
)
|
||||
|
||||
|
@ -5,7 +5,7 @@ from core.choices import DataSourceTypeChoices
|
||||
from core.models import *
|
||||
from netbox.forms import NetBoxModelBulkEditForm
|
||||
from utilities.forms import (
|
||||
add_blank_choice, BulkEditNullBooleanSelect, CommentField, SmallTextarea, StaticSelect,
|
||||
add_blank_choice, BulkEditNullBooleanSelect, CommentField, StaticSelect,
|
||||
)
|
||||
|
||||
__all__ = (
|
||||
@ -30,7 +30,7 @@ class DataSourceBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=SmallTextarea,
|
||||
widget=forms.Textarea,
|
||||
label=_('Comments')
|
||||
)
|
||||
parameters = forms.JSONField(
|
||||
|
@ -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')
|
||||
)
|
||||
|
||||
|
@ -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(),
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,7 +10,7 @@ from netbox.forms import NetBoxModelBulkEditForm
|
||||
from tenancy.models import Tenant
|
||||
from utilities.forms import (
|
||||
add_blank_choice, BulkEditNullBooleanSelect, CommentField, DynamicModelChoiceField, NumericArrayField,
|
||||
SmallTextarea, StaticSelect, DynamicModelMultipleChoiceField,
|
||||
StaticSelect, DynamicModelMultipleChoiceField,
|
||||
)
|
||||
|
||||
__all__ = (
|
||||
@ -48,7 +48,7 @@ class VRFBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=SmallTextarea,
|
||||
widget=forms.Textarea,
|
||||
label='Comments'
|
||||
)
|
||||
|
||||
@ -69,7 +69,7 @@ class RouteTargetBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=SmallTextarea,
|
||||
widget=forms.Textarea,
|
||||
label='Comments'
|
||||
)
|
||||
|
||||
@ -116,7 +116,7 @@ class ASNBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=SmallTextarea,
|
||||
widget=forms.Textarea,
|
||||
label='Comments'
|
||||
)
|
||||
|
||||
@ -145,7 +145,7 @@ class AggregateBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=SmallTextarea,
|
||||
widget=forms.Textarea,
|
||||
label='Comments'
|
||||
)
|
||||
|
||||
@ -227,7 +227,7 @@ class PrefixBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=SmallTextarea,
|
||||
widget=forms.Textarea,
|
||||
label='Comments'
|
||||
)
|
||||
|
||||
@ -266,7 +266,7 @@ class IPRangeBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=SmallTextarea,
|
||||
widget=forms.Textarea,
|
||||
label='Comments'
|
||||
)
|
||||
|
||||
@ -314,7 +314,7 @@ class IPAddressBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=SmallTextarea,
|
||||
widget=forms.Textarea,
|
||||
label='Comments'
|
||||
)
|
||||
|
||||
@ -359,7 +359,7 @@ class FHRPGroupBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=SmallTextarea,
|
||||
widget=forms.Textarea,
|
||||
label='Comments'
|
||||
)
|
||||
|
||||
@ -442,7 +442,7 @@ class VLANBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=SmallTextarea,
|
||||
widget=forms.Textarea,
|
||||
label='Comments'
|
||||
)
|
||||
|
||||
@ -474,7 +474,7 @@ class ServiceTemplateBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=SmallTextarea,
|
||||
widget=forms.Textarea,
|
||||
label='Comments'
|
||||
)
|
||||
|
||||
@ -504,7 +504,7 @@ class L2VPNBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=SmallTextarea,
|
||||
widget=forms.Textarea,
|
||||
label='Comments'
|
||||
)
|
||||
|
||||
|
@ -2,7 +2,7 @@ from django import forms
|
||||
|
||||
from netbox.forms import NetBoxModelBulkEditForm
|
||||
from tenancy.models import *
|
||||
from utilities.forms import CommentField, DynamicModelChoiceField, SmallTextarea
|
||||
from utilities.forms import CommentField, DynamicModelChoiceField
|
||||
|
||||
__all__ = (
|
||||
'ContactBulkEditForm',
|
||||
@ -106,7 +106,7 @@ class ContactBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=SmallTextarea,
|
||||
widget=forms.Textarea,
|
||||
label='Comments'
|
||||
)
|
||||
|
||||
|
@ -3,7 +3,7 @@ from django import forms
|
||||
from netbox.forms import NetBoxModelForm
|
||||
from tenancy.models import *
|
||||
from utilities.forms import (
|
||||
BootstrapMixin, CommentField, DynamicModelChoiceField, SlugField, SmallTextarea, StaticSelect,
|
||||
BootstrapMixin, CommentField, DynamicModelChoiceField, SlugField, StaticSelect,
|
||||
)
|
||||
|
||||
__all__ = (
|
||||
@ -112,7 +112,7 @@ class ContactForm(NetBoxModelForm):
|
||||
'group', 'name', 'title', 'phone', 'email', 'address', 'link', 'description', 'comments', 'tags',
|
||||
)
|
||||
widgets = {
|
||||
'address': SmallTextarea(attrs={'rows': 3}),
|
||||
'address': forms.Textarea(attrs={'rows': 3}),
|
||||
}
|
||||
|
||||
|
||||
|
@ -21,7 +21,6 @@ __all__ = (
|
||||
'SelectSpeedWidget',
|
||||
'SelectWithPK',
|
||||
'SlugWidget',
|
||||
'SmallTextarea',
|
||||
'StaticSelect',
|
||||
'StaticSelectMultiple',
|
||||
'TimePicker',
|
||||
@ -33,13 +32,6 @@ QueryParam = Dict[str, QueryParamValue]
|
||||
ProcessedParams = Sequence[Dict[str, Sequence[JSONPrimitive]]]
|
||||
|
||||
|
||||
class SmallTextarea(forms.Textarea):
|
||||
"""
|
||||
Subclass used for rendering a smaller textarea element.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
class SlugWidget(forms.TextInput):
|
||||
"""
|
||||
Subclass TextInput and add a slug regeneration button next to the form field.
|
||||
|
@ -9,7 +9,7 @@ from netbox.forms import NetBoxModelBulkEditForm
|
||||
from tenancy.models import Tenant
|
||||
from utilities.forms import (
|
||||
add_blank_choice, BulkEditNullBooleanSelect, BulkRenameForm, CommentField, DynamicModelChoiceField,
|
||||
DynamicModelMultipleChoiceField, SmallTextarea, StaticSelect
|
||||
DynamicModelMultipleChoiceField, StaticSelect
|
||||
)
|
||||
from virtualization.choices import *
|
||||
from virtualization.models import *
|
||||
@ -90,7 +90,7 @@ class ClusterBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=SmallTextarea,
|
||||
widget=forms.Textarea,
|
||||
label=_('Comments')
|
||||
)
|
||||
|
||||
@ -163,7 +163,7 @@ class VirtualMachineBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=SmallTextarea,
|
||||
widget=forms.Textarea,
|
||||
label=_('Comments')
|
||||
)
|
||||
|
||||
|
@ -5,7 +5,7 @@ from dcim.choices import LinkStatusChoices
|
||||
from ipam.models import VLAN
|
||||
from netbox.forms import NetBoxModelBulkEditForm
|
||||
from tenancy.models import Tenant
|
||||
from utilities.forms import add_blank_choice, CommentField, DynamicModelChoiceField, SmallTextarea
|
||||
from utilities.forms import add_blank_choice, CommentField, DynamicModelChoiceField
|
||||
from wireless.choices import *
|
||||
from wireless.constants import SSID_MAX_LENGTH
|
||||
from wireless.models import *
|
||||
@ -74,7 +74,7 @@ class WirelessLANBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=SmallTextarea,
|
||||
widget=forms.Textarea,
|
||||
label='Comments'
|
||||
)
|
||||
|
||||
@ -119,7 +119,7 @@ class WirelessLinkBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False
|
||||
)
|
||||
comments = CommentField(
|
||||
widget=SmallTextarea,
|
||||
widget=forms.Textarea,
|
||||
label='Comments'
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user