mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Closes #11325: Move help_texts from model forms to models
This commit is contained in:
@@ -56,8 +56,10 @@ class CustomFieldForm(BootstrapMixin, forms.ModelForm):
|
||||
model = CustomField
|
||||
fields = '__all__'
|
||||
help_texts = {
|
||||
'type': _("The type of data stored in this field. For object/multi-object fields, select the related object "
|
||||
"type below.")
|
||||
'type': _(
|
||||
"The type of data stored in this field. For object/multi-object fields, select the related object "
|
||||
"type below."
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -80,9 +82,11 @@ class CustomLinkForm(BootstrapMixin, forms.ModelForm):
|
||||
'link_url': forms.Textarea(attrs={'class': 'font-monospace'}),
|
||||
}
|
||||
help_texts = {
|
||||
'link_text': _('Jinja2 template code for the link text. Reference the object as <code>{{ object }}</code>. '
|
||||
'Links which render as empty text will not be displayed.'),
|
||||
'link_url': _('Jinja2 template code for the link URL. Reference the object as <code>{{ object }}</code>.'),
|
||||
'link_text': _(
|
||||
"Jinja2 template code for the link text. Reference the object as <code>{{ object }}</code>. Links "
|
||||
"which render as empty text will not be displayed."
|
||||
),
|
||||
'link_url': _("Jinja2 template code for the link URL. Reference the object as <code>{{ object }}</code>."),
|
||||
}
|
||||
|
||||
|
||||
|
@@ -152,6 +152,9 @@ class ConfigContextModel(models.Model):
|
||||
local_context_data = models.JSONField(
|
||||
blank=True,
|
||||
null=True,
|
||||
help_text=_(
|
||||
"Local config context data takes precedence over source contexts in the final rendered config context"
|
||||
)
|
||||
)
|
||||
|
||||
class Meta:
|
||||
|
Reference in New Issue
Block a user