diff --git a/netbox/extras/forms.py b/netbox/extras/forms.py
index 841ea213d..4a4f95213 100644
--- a/netbox/extras/forms.py
+++ b/netbox/extras/forms.py
@@ -125,6 +125,10 @@ class CustomLinkForm(BootstrapMixin, forms.ModelForm):
('Custom Link', ('name', 'content_type', 'weight', 'group_name', 'button_class', 'new_window')),
('Templates', ('link_text', 'link_url')),
)
+ widgets = {
+ 'link_text': forms.Textarea(attrs={'class': 'font-monospace'}),
+ 'link_url': forms.Textarea(attrs={'class': 'font-monospace'}),
+ }
help_texts = {
'link_text': 'Jinja2 template code for the link text. Reference the object as {{ obj }}
. '
'Links which render as empty text will not be displayed.',
@@ -217,6 +221,9 @@ class ExportTemplateForm(BootstrapMixin, forms.ModelForm):
('Template', ('template_code',)),
('Rendering', ('mime_type', 'file_extension', 'as_attachment')),
)
+ widgets = {
+ 'template_code': forms.Textarea(attrs={'class': 'font-monospace'}),
+ }
class ExportTemplateCSVForm(CSVModelForm):
@@ -316,6 +323,10 @@ class WebhookForm(BootstrapMixin, forms.ModelForm):
)),
('SSL', ('ssl_verification', 'ca_file_path')),
)
+ widgets = {
+ 'additional_headers': forms.Textarea(attrs={'class': 'font-monospace'}),
+ 'body_template': forms.Textarea(attrs={'class': 'font-monospace'}),
+ }
class WebhookCSVForm(CSVModelForm):
diff --git a/netbox/extras/models/models.py b/netbox/extras/models/models.py
index e292f6077..75f5242d3 100644
--- a/netbox/extras/models/models.py
+++ b/netbox/extras/models/models.py
@@ -91,7 +91,7 @@ class Webhook(ChangeLoggedModel):
blank=True,
help_text="User-supplied HTTP headers to be sent with the request in addition to the HTTP content type. "
"Headers should be defined in the format Name: Value
. Jinja2 template processing is "
- "support with the same context as the request body (below)."
+ "supported with the same context as the request body (below)."
)
body_template = models.TextField(
blank=True,
@@ -249,7 +249,8 @@ class ExportTemplate(ChangeLoggedModel):
blank=True
)
template_code = models.TextField(
- help_text='The list of objects being exported is passed as a context variable named queryset
.'
+ help_text='Jinja2 template code. The list of objects being exported is passed as a context variable named '
+ 'queryset
.'
)
mime_type = models.CharField(
max_length=50,
diff --git a/netbox/extras/tables.py b/netbox/extras/tables.py
index 952189003..699bffc9f 100644
--- a/netbox/extras/tables.py
+++ b/netbox/extras/tables.py
@@ -103,9 +103,18 @@ class WebhookTable(BaseTable):
)
content_types = ContentTypesColumn()
enabled = BooleanColumn()
- type_create = BooleanColumn()
- type_update = BooleanColumn()
- type_delete = BooleanColumn()
+ type_create = BooleanColumn(
+ verbose_name='Create'
+ )
+ type_update = BooleanColumn(
+ verbose_name='Update'
+ )
+ type_delete = BooleanColumn(
+ verbose_name='Delete'
+ )
+ ssl_validation = BooleanColumn(
+ verbose_name='SSL Validation'
+ )
class Meta(BaseTable.Meta):
model = Webhook
diff --git a/netbox/templates/extras/customlink.html b/netbox/templates/extras/customlink.html
index 34180e4d3..42b2f6118 100644
--- a/netbox/templates/extras/customlink.html
+++ b/netbox/templates/extras/customlink.html
@@ -11,14 +11,14 @@
Content Type | -{{ object.content_type }} | -
---|---|
Name | {{ object.name }} |
Content Type | +{{ object.content_type }} | +
Group Name | {{ object.group_name|placeholder }} | diff --git a/netbox/templates/extras/exporttemplate.html b/netbox/templates/extras/exporttemplate.html index 2af96c5cb..07b98ee93 100644 --- a/netbox/templates/extras/exporttemplate.html +++ b/netbox/templates/extras/exporttemplate.html @@ -2,6 +2,8 @@ {% load helpers %} {% load plugins %} +{% block title %}{{ object.name }}{% endblock %} + {% block breadcrumbs %} {{ block.super }}