Closes #11325: Move help_texts from model forms to models
This commit is contained in:
@@ -66,12 +66,6 @@ __all__ = (
|
||||
'VirtualDeviceContextForm'
|
||||
)
|
||||
|
||||
INTERFACE_MODE_HELP_TEXT = """
|
||||
Access: One untagged VLAN<br />
|
||||
Tagged: One untagged VLAN and/or one or more tagged VLANs<br />
|
||||
Tagged (All): Implies all VLANs are available (w/optional untagged VLAN)
|
||||
"""
|
||||
|
||||
|
||||
class RegionForm(NetBoxModelForm):
|
||||
parent = DynamicModelChoiceField(
|
||||
@@ -160,16 +154,6 @@ class SiteForm(TenancyForm, NetBoxModelForm):
|
||||
}
|
||||
),
|
||||
}
|
||||
help_texts = {
|
||||
'name': _("Full name of the site"),
|
||||
'facility': _("Data center provider and facility (e.g. Equinix NY7)"),
|
||||
'time_zone': _("Local time zone"),
|
||||
'description': _("Short description (will appear in sites list)"),
|
||||
'physical_address': _("Physical location of the building (e.g. for GPS)"),
|
||||
'shipping_address': _("If different from the physical address"),
|
||||
'latitude': _("Latitude in decimal format (xx.yyyyyy)"),
|
||||
'longitude': _("Longitude in decimal format (xx.yyyyyy)")
|
||||
}
|
||||
|
||||
|
||||
class LocationForm(TenancyForm, NetBoxModelForm):
|
||||
@@ -276,12 +260,6 @@ class RackForm(TenancyForm, NetBoxModelForm):
|
||||
'role', 'serial', 'asset_tag', 'type', 'width', 'u_height', 'desc_units', 'outer_width', 'outer_depth',
|
||||
'outer_unit', 'mounting_depth', 'weight', 'max_weight', 'weight_unit', 'description', 'comments', 'tags',
|
||||
]
|
||||
help_texts = {
|
||||
'site': _("The site at which the rack exists"),
|
||||
'name': _("Organizational rack name"),
|
||||
'facility_id': _("The unique rack ID assigned by the facility"),
|
||||
'u_height': _("Height in rack units"),
|
||||
}
|
||||
|
||||
|
||||
class RackReservationForm(TenancyForm, NetBoxModelForm):
|
||||
@@ -583,12 +561,6 @@ class DeviceForm(TenancyForm, NetBoxModelForm):
|
||||
'cluster_group', 'cluster', 'tenant_group', 'tenant', 'virtual_chassis', 'vc_position', 'vc_priority',
|
||||
'description', 'config_template', 'comments', 'tags', 'local_context_data'
|
||||
]
|
||||
help_texts = {
|
||||
'device_role': _("The function this device serves"),
|
||||
'serial': _("Chassis serial number"),
|
||||
'local_context_data': _("Local config context data overwrites all source contexts in the final rendered "
|
||||
"config context"),
|
||||
}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
@@ -1374,11 +1346,6 @@ class InterfaceForm(InterfaceCommonForm, ModularDeviceComponentForm):
|
||||
labels = {
|
||||
'mode': '802.1Q Mode',
|
||||
}
|
||||
help_texts = {
|
||||
'mode': INTERFACE_MODE_HELP_TEXT,
|
||||
'rf_channel_frequency': _("Populated by selected channel (if set)"),
|
||||
'rf_channel_width': _("Populated by selected channel (if set)"),
|
||||
}
|
||||
|
||||
|
||||
class FrontPortForm(ModularDeviceComponentForm):
|
||||
|
Reference in New Issue
Block a user