diff --git a/netbox/extras/forms/config.py b/netbox/extras/forms/config.py index 60a19c9a8..3d44280ec 100644 --- a/netbox/extras/forms/config.py +++ b/netbox/extras/forms/config.py @@ -1,4 +1,5 @@ from django import forms +from django.conf import settings from netbox.config import get_config, PARAMS @@ -18,10 +19,18 @@ class FormMetaclass(forms.models.ModelFormMetaclass): # Emulate a declared field for each supported configuration parameter param_fields = {} for param in PARAMS: + is_static = hasattr(settings, param.name) help_text = f'{param.description}
' if param.description else '' - help_text += f'Current value: {getattr(config, param.name)}' + value = getattr(config, param.name) + if value: + help_text += f'Current value: {value}' + if is_static: + help_text += ' (defined statically)' + elif value == param.default: + help_text += ' (default)' field_kwargs = { 'required': False, + 'disabled': is_static, 'label': param.label, 'help_text': help_text, }