Fixes #9062 - Add/edit {module} substitution to help text for component template name

This commit is contained in:
Daniel Sheppard 2022-07-29 11:55:26 -05:00
parent 07620db027
commit 890efa5400
No known key found for this signature in database
GPG Key ID: A14DEAB809B8E077
3 changed files with 13 additions and 1 deletions

View File

@ -4,6 +4,7 @@
### Enhancements ### Enhancements
* [#9062](https://github.com/netbox-community/netbox/issues/9062) - Add/edit {module} substitution to help text for component template name
* [#9762](https://github.com/netbox-community/netbox/issues/9762) - Add `nat_outside` column to the IPAddress table * [#9762](https://github.com/netbox-community/netbox/issues/9762) - Add `nat_outside` column to the IPAddress table
* [#9825](https://github.com/netbox-community/netbox/issues/9825) - Add contacts column to virtual machines table * [#9825](https://github.com/netbox-community/netbox/issues/9825) - Add contacts column to virtual machines table

View File

@ -64,6 +64,14 @@ class ModularComponentTemplateCreateForm(ComponentCreateForm):
""" """
Creation form for component templates that can be assigned to either a DeviceType *or* a ModuleType. Creation form for component templates that can be assigned to either a DeviceType *or* a ModuleType.
""" """
name_pattern = ExpandableNameField(
label='Name',
help_text="""
Alphanumeric ranges are supported for bulk creation. Mixed cases and types within a single range
are not supported. Example: <code>[ge,xe]-0/0/[0-9]</code>. {module} is accepted as a substitution for
the module bay position.
"""
)
device_type = DynamicModelChoiceField( device_type = DynamicModelChoiceField(
queryset=DeviceType.objects.all(), queryset=DeviceType.objects.all(),
required=False required=False

View File

@ -39,7 +39,10 @@ class ComponentTemplateModel(WebhooksMixin, ChangeLoggedModel):
related_name='%(class)ss' related_name='%(class)ss'
) )
name = models.CharField( name = models.CharField(
max_length=64 max_length=64,
help_text="""
{module} is accepted as a substitution for the module bay position when attached to a module type.
"""
) )
_name = NaturalOrderingField( _name = NaturalOrderingField(
target_field='name', target_field='name',