mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-23 12:08:43 -06:00
Make user_groups and users DynamicModelMultipleChoiceFields on OwnerForm
This commit is contained in:
@@ -462,6 +462,16 @@ class OwnerForm(forms.ModelForm):
|
|||||||
selector=True,
|
selector=True,
|
||||||
quick_add=True
|
quick_add=True
|
||||||
)
|
)
|
||||||
|
user_groups = DynamicModelMultipleChoiceField(
|
||||||
|
label=_('User groups'),
|
||||||
|
queryset=Group.objects.all(),
|
||||||
|
required=False
|
||||||
|
)
|
||||||
|
users = DynamicModelMultipleChoiceField(
|
||||||
|
label=_('Users'),
|
||||||
|
queryset=User.objects.all(),
|
||||||
|
required=False
|
||||||
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Owner
|
model = Owner
|
||||||
|
|||||||
Reference in New Issue
Block a user