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) ## 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) ## v3.1.10 (2022-03-25)

View File

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

View File

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