mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 04:22:01 -06:00
Fix config revision form help texts
This commit is contained in:
parent
0aae155c80
commit
9094f07290
@ -48,12 +48,15 @@ class ConfigRevisionForm(forms.BaseModelForm, metaclass=FormMetaclass):
|
|||||||
value = getattr(config, param.name)
|
value = getattr(config, param.name)
|
||||||
is_static = hasattr(settings, param.name)
|
is_static = hasattr(settings, param.name)
|
||||||
if value:
|
if value:
|
||||||
help_text = f'<br />Current value: <strong>{value}</strong>'
|
help_text = self.fields[param.name].help_text
|
||||||
|
if help_text:
|
||||||
|
help_text += '<br />' # Line break
|
||||||
|
help_text += f'Current value: <strong>{value}</strong>'
|
||||||
if is_static:
|
if is_static:
|
||||||
help_text += ' (defined statically)'
|
help_text += ' (defined statically)'
|
||||||
elif value == param.default:
|
elif value == param.default:
|
||||||
help_text += ' (default)'
|
help_text += ' (default)'
|
||||||
self.fields[param.name].help_text += help_text
|
self.fields[param.name].help_text = help_text
|
||||||
if is_static:
|
if is_static:
|
||||||
self.fields[param.name].disabled = True
|
self.fields[param.name].disabled = True
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user