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

Closes #8274: Enable associating a custom link with multiple object types

This commit is contained in:
jeremystretch
2022-10-26 11:33:11 -04:00
parent c4dcd34ce9
commit 9e8234bb45
16 changed files with 94 additions and 51 deletions

View File

@@ -53,16 +53,16 @@ class CustomFieldCSVForm(CSVModelForm):
class CustomLinkCSVForm(CSVModelForm):
content_type = CSVContentTypeField(
content_types = CSVMultipleContentTypeField(
queryset=ContentType.objects.all(),
limit_choices_to=FeatureQuery('custom_links'),
help_text="Assigned object type"
help_text="One or more assigned object types"
)
class Meta:
model = CustomLink
fields = (
'name', 'content_type', 'enabled', 'weight', 'group_name', 'button_class', 'new_window', 'link_text',
'name', 'content_types', 'enabled', 'weight', 'group_name', 'button_class', 'new_window', 'link_text',
'link_url',
)