Fixes #8974: Use monospace font for text areas in config revision form

This commit is contained in:
jeremystretch 2022-03-28 09:13:15 -04:00
parent 57759aa4a3
commit a1808a54a4
3 changed files with 28 additions and 5 deletions

View File

@ -2,6 +2,10 @@
## v3.1.11 (FUTURE)
### Enhancements
* [#8974](https://github.com/netbox-community/netbox/issues/8974) - Use monospace font for text areas in config revision form
---
## v3.1.10 (2022-03-25)

View File

@ -23,15 +23,18 @@ class ConfigRevisionAdmin(admin.ModelAdmin):
}),
('Banners', {
'fields': ('BANNER_LOGIN', 'BANNER_TOP', 'BANNER_BOTTOM'),
'classes': ('monospace',),
}),
('Pagination', {
'fields': ('PAGINATE_COUNT', 'MAX_PAGE_SIZE'),
}),
('Validation', {
'fields': ('CUSTOM_VALIDATORS',),
'classes': ('monospace',),
}),
('NAPALM', {
'fields': ('NAPALM_USERNAME', 'NAPALM_PASSWORD', 'NAPALM_TIMEOUT', 'NAPALM_ARGS'),
'classes': ('monospace',),
}),
('Miscellaneous', {
'fields': ('MAINTENANCE_MODE', 'GRAPHQL_ENABLED', 'CHANGELOG_RETENTION', 'MAPS_URL'),

View File

@ -22,7 +22,9 @@ PARAMS = (
default='',
description="Additional content to display on the login page",
field_kwargs={
'widget': forms.Textarea(),
'widget': forms.Textarea(
attrs={'class': 'vLargeTextField'}
),
},
),
ConfigParam(
@ -31,7 +33,9 @@ PARAMS = (
default='',
description="Additional content to display at the top of every page",
field_kwargs={
'widget': forms.Textarea(),
'widget': forms.Textarea(
attrs={'class': 'vLargeTextField'}
),
},
),
ConfigParam(
@ -40,7 +44,9 @@ PARAMS = (
default='',
description="Additional content to display at the bottom of every page",
field_kwargs={
'widget': forms.Textarea(),
'widget': forms.Textarea(
attrs={'class': 'vLargeTextField'}
),
},
),
@ -109,7 +115,12 @@ PARAMS = (
label='Custom validators',
default={},
description="Custom validation rules (JSON)",
field=forms.JSONField
field=forms.JSONField,
field_kwargs={
'widget': forms.Textarea(
attrs={'class': 'vLargeTextField'}
),
},
),
# NAPALM
@ -137,7 +148,12 @@ PARAMS = (
label='NAPALM arguments',
default={},
description="Additional arguments to pass when invoking a NAPALM driver (as JSON data)",
field=forms.JSONField
field=forms.JSONField,
field_kwargs={
'widget': forms.Textarea(
attrs={'class': 'vLargeTextField'}
),
},
),
# Miscellaneous