mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Adds hide-if-unset to custom field (#12723)
* adds hide-if-unset to custom field #12597 * moved hide logic from template to python * fix indentation * Update logic for omit_hidden under get_custom_fields() * Update docs * Account for False values --------- Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
This commit is contained in:
committed by
GitHub
parent
9b9a559e0c
commit
d7ca453f26
@@ -56,11 +56,13 @@ class CustomFieldVisibilityChoices(ChoiceSet):
|
||||
VISIBILITY_READ_WRITE = 'read-write'
|
||||
VISIBILITY_READ_ONLY = 'read-only'
|
||||
VISIBILITY_HIDDEN = 'hidden'
|
||||
VISIBILITY_HIDDEN_IFUNSET = 'hidden-ifunset'
|
||||
|
||||
CHOICES = (
|
||||
(VISIBILITY_READ_WRITE, 'Read/Write'),
|
||||
(VISIBILITY_READ_ONLY, 'Read-only'),
|
||||
(VISIBILITY_HIDDEN, 'Hidden'),
|
||||
(VISIBILITY_HIDDEN_IFUNSET, 'Hidden (if unset)'),
|
||||
)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user