remove small markdown widget

This commit is contained in:
aron bergur jóhannsson 2023-03-08 11:26:45 +00:00
parent a385658f24
commit 949574ae59
7 changed files with 6 additions and 44 deletions

View File

@ -8,7 +8,7 @@ from netbox.forms import NetBoxModelBulkEditForm
from tenancy.models import Tenant from tenancy.models import Tenant
from utilities.forms import ( from utilities.forms import (
add_blank_choice, CommentField, DatePicker, DynamicModelChoiceField, DynamicModelMultipleChoiceField, add_blank_choice, CommentField, DatePicker, DynamicModelChoiceField, DynamicModelMultipleChoiceField,
SmallMarkdownWidget, StaticSelect, StaticSelect,
) )
__all__ = ( __all__ = (
@ -35,7 +35,6 @@ class ProviderBulkEditForm(NetBoxModelBulkEditForm):
required=False required=False
) )
comments = CommentField( comments = CommentField(
widget=SmallMarkdownWidget,
label=_('Comments') label=_('Comments')
) )
@ -63,7 +62,6 @@ class ProviderNetworkBulkEditForm(NetBoxModelBulkEditForm):
required=False required=False
) )
comments = CommentField( comments = CommentField(
widget=SmallMarkdownWidget,
label=_('Comments') label=_('Comments')
) )
@ -125,7 +123,6 @@ class CircuitBulkEditForm(NetBoxModelBulkEditForm):
required=False required=False
) )
comments = CommentField( comments = CommentField(
widget=SmallMarkdownWidget,
label=_('Comments') label=_('Comments')
) )

View File

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

View File

@ -10,7 +10,7 @@ from netbox.forms import NetBoxModelBulkEditForm
from tenancy.models import Tenant from tenancy.models import Tenant
from utilities.forms import ( from utilities.forms import (
add_blank_choice, BulkEditNullBooleanSelect, CommentField, DynamicModelChoiceField, NumericArrayField, add_blank_choice, BulkEditNullBooleanSelect, CommentField, DynamicModelChoiceField, NumericArrayField,
StaticSelect, DynamicModelMultipleChoiceField, SmallMarkdownWidget StaticSelect, DynamicModelMultipleChoiceField
) )
__all__ = ( __all__ = (
@ -48,7 +48,6 @@ class VRFBulkEditForm(NetBoxModelBulkEditForm):
required=False required=False
) )
comments = CommentField( comments = CommentField(
widget=SmallMarkdownWidget,
label='Comments' label='Comments'
) )
@ -69,7 +68,6 @@ class RouteTargetBulkEditForm(NetBoxModelBulkEditForm):
required=False required=False
) )
comments = CommentField( comments = CommentField(
widget=SmallMarkdownWidget,
label='Comments' label='Comments'
) )
@ -116,7 +114,6 @@ class ASNBulkEditForm(NetBoxModelBulkEditForm):
required=False required=False
) )
comments = CommentField( comments = CommentField(
widget=SmallMarkdownWidget,
label='Comments' label='Comments'
) )
@ -145,7 +142,6 @@ class AggregateBulkEditForm(NetBoxModelBulkEditForm):
required=False required=False
) )
comments = CommentField( comments = CommentField(
widget=SmallMarkdownWidget,
label='Comments' label='Comments'
) )
@ -227,7 +223,6 @@ class PrefixBulkEditForm(NetBoxModelBulkEditForm):
required=False required=False
) )
comments = CommentField( comments = CommentField(
widget=SmallMarkdownWidget,
label='Comments' label='Comments'
) )
@ -266,7 +261,6 @@ class IPRangeBulkEditForm(NetBoxModelBulkEditForm):
required=False required=False
) )
comments = CommentField( comments = CommentField(
widget=SmallMarkdownWidget,
label='Comments' label='Comments'
) )
@ -314,7 +308,6 @@ class IPAddressBulkEditForm(NetBoxModelBulkEditForm):
required=False required=False
) )
comments = CommentField( comments = CommentField(
widget=SmallMarkdownWidget,
label='Comments' label='Comments'
) )
@ -359,7 +352,6 @@ class FHRPGroupBulkEditForm(NetBoxModelBulkEditForm):
required=False required=False
) )
comments = CommentField( comments = CommentField(
widget=SmallMarkdownWidget,
label='Comments' label='Comments'
) )
@ -442,7 +434,6 @@ class VLANBulkEditForm(NetBoxModelBulkEditForm):
required=False required=False
) )
comments = CommentField( comments = CommentField(
widget=SmallMarkdownWidget,
label='Comments' label='Comments'
) )
@ -474,7 +465,6 @@ class ServiceTemplateBulkEditForm(NetBoxModelBulkEditForm):
required=False required=False
) )
comments = CommentField( comments = CommentField(
widget=SmallMarkdownWidget,
label='Comments' label='Comments'
) )
@ -504,7 +494,6 @@ class L2VPNBulkEditForm(NetBoxModelBulkEditForm):
required=False required=False
) )
comments = CommentField( comments = CommentField(
widget=SmallMarkdownWidget,
label='Comments' label='Comments'
) )

View File

@ -2,7 +2,7 @@ from django import forms
from netbox.forms import NetBoxModelBulkEditForm from netbox.forms import NetBoxModelBulkEditForm
from tenancy.models import * from tenancy.models import *
from utilities.forms import CommentField, DynamicModelChoiceField, SmallMarkdownWidget from utilities.forms import CommentField, DynamicModelChoiceField
__all__ = ( __all__ = (
'ContactBulkEditForm', 'ContactBulkEditForm',
@ -106,7 +106,6 @@ class ContactBulkEditForm(NetBoxModelBulkEditForm):
required=False required=False
) )
comments = CommentField( comments = CommentField(
widget=SmallMarkdownWidget,
label='Comments' label='Comments'
) )

View File

@ -22,7 +22,6 @@ __all__ = (
'SelectSpeedWidget', 'SelectSpeedWidget',
'SelectWithPK', 'SelectWithPK',
'SlugWidget', 'SlugWidget',
'SmallMarkdownWidget',
'SmallTextarea', 'SmallTextarea',
'StaticSelect', 'StaticSelect',
'StaticSelectMultiple', 'StaticSelectMultiple',
@ -122,13 +121,6 @@ class MarkdownWidget(forms.Textarea):
template_name = 'widgets/markdown_input.html' template_name = 'widgets/markdown_input.html'
class SmallMarkdownWidget(MarkdownWidget):
"""
Subclass used for rendering a smaller markdown element.
"""
pass
class NumericArrayField(SimpleArrayField): class NumericArrayField(SimpleArrayField):
def clean(self, value): def clean(self, value):

View File

@ -9,7 +9,7 @@ from netbox.forms import NetBoxModelBulkEditForm
from tenancy.models import Tenant from tenancy.models import Tenant
from utilities.forms import ( from utilities.forms import (
add_blank_choice, BulkEditNullBooleanSelect, BulkRenameForm, CommentField, DynamicModelChoiceField, add_blank_choice, BulkEditNullBooleanSelect, BulkRenameForm, CommentField, DynamicModelChoiceField,
DynamicModelMultipleChoiceField, StaticSelect, SmallMarkdownWidget DynamicModelMultipleChoiceField, StaticSelect
) )
from virtualization.choices import * from virtualization.choices import *
from virtualization.models import * from virtualization.models import *
@ -90,7 +90,6 @@ class ClusterBulkEditForm(NetBoxModelBulkEditForm):
required=False required=False
) )
comments = CommentField( comments = CommentField(
widget=SmallMarkdownWidget,
label=_('Comments') label=_('Comments')
) )
@ -163,7 +162,6 @@ class VirtualMachineBulkEditForm(NetBoxModelBulkEditForm):
required=False required=False
) )
comments = CommentField( comments = CommentField(
widget=SmallMarkdownWidget,
label=_('Comments') label=_('Comments')
) )

View File

@ -5,7 +5,7 @@ from dcim.choices import LinkStatusChoices
from ipam.models import VLAN from ipam.models import VLAN
from netbox.forms import NetBoxModelBulkEditForm from netbox.forms import NetBoxModelBulkEditForm
from tenancy.models import Tenant from tenancy.models import Tenant
from utilities.forms import add_blank_choice, CommentField, DynamicModelChoiceField, SmallMarkdownWidget from utilities.forms import add_blank_choice, CommentField, DynamicModelChoiceField
from wireless.choices import * from wireless.choices import *
from wireless.constants import SSID_MAX_LENGTH from wireless.constants import SSID_MAX_LENGTH
from wireless.models import * from wireless.models import *
@ -74,7 +74,6 @@ class WirelessLANBulkEditForm(NetBoxModelBulkEditForm):
required=False required=False
) )
comments = CommentField( comments = CommentField(
widget=SmallMarkdownWidget,
label='Comments' label='Comments'
) )
@ -119,7 +118,6 @@ class WirelessLinkBulkEditForm(NetBoxModelBulkEditForm):
required=False required=False
) )
comments = CommentField( comments = CommentField(
widget=SmallMarkdownWidget,
label='Comments' label='Comments'
) )