1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Changelog & cleanup for #9166

This commit is contained in:
jeremystretch
2022-05-24 16:39:05 -04:00
parent aea023357b
commit 31024ce672
11 changed files with 23 additions and 15 deletions

View File

@@ -51,6 +51,10 @@ class CustomFieldsMixin:
if customfield.ui_visibility == CustomFieldVisibilityChoices.VISIBILITY_READ_ONLY:
self.fields[field_name].disabled = True
if self.fields[field_name].help_text:
self.fields[field_name].help_text += '<br />'
self.fields[field_name].help_text += '<i class="mdi mdi-alert-circle-outline"></i> ' \
'Field is set to read-only.'
# Annotate the field in the list of CustomField form fields
self.custom_fields[field_name] = customfield