mirror of
https://github.com/netbox-community/netbox.git
synced 2026-02-05 06:46:25 -06:00
* Add ui_visible and ui_editable fields * Extend migration to map new visible/editable values * Remove ui_visibility field * Update docs
This commit is contained in:
@@ -49,10 +49,17 @@ class CustomFieldImportForm(CSVModelForm):
|
||||
required=False,
|
||||
help_text=_('Choice set (for selection fields)')
|
||||
)
|
||||
ui_visibility = CSVChoiceField(
|
||||
label=_('UI visibility'),
|
||||
choices=CustomFieldVisibilityChoices,
|
||||
help_text=_('How the custom field is displayed in the user interface')
|
||||
ui_visible = CSVChoiceField(
|
||||
label=_('UI visible'),
|
||||
choices=CustomFieldUIVisibleChoices,
|
||||
required=False,
|
||||
help_text=_('Whether the custom field is displayed in the UI')
|
||||
)
|
||||
ui_editable = CSVChoiceField(
|
||||
label=_('UI editable'),
|
||||
choices=CustomFieldUIEditableChoices,
|
||||
required=False,
|
||||
help_text=_('Whether the custom field is editable in the UI')
|
||||
)
|
||||
|
||||
class Meta:
|
||||
@@ -60,7 +67,7 @@ class CustomFieldImportForm(CSVModelForm):
|
||||
fields = (
|
||||
'name', 'label', 'group_name', 'type', 'content_types', 'object_type', 'required', 'description',
|
||||
'search_weight', 'filter_logic', 'default', 'choice_set', 'weight', 'validation_minimum',
|
||||
'validation_maximum', 'validation_regex', 'ui_visibility', 'is_cloneable',
|
||||
'validation_maximum', 'validation_regex', 'ui_visible', 'ui_editable', 'is_cloneable',
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user