mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Cleanup and documentation for #1344
This commit is contained in:
@@ -96,6 +96,21 @@ class ContactBulkEditForm(BootstrapMixin, AddRemoveTagsForm, CustomFieldModelBul
|
||||
queryset=ContactGroup.objects.all(),
|
||||
required=False
|
||||
)
|
||||
title = forms.CharField(
|
||||
max_length=100,
|
||||
required=False
|
||||
)
|
||||
phone = forms.CharField(
|
||||
max_length=50,
|
||||
required=False
|
||||
)
|
||||
email = forms.EmailField(
|
||||
required=False
|
||||
)
|
||||
address = forms.CharField(
|
||||
max_length=200,
|
||||
required=False
|
||||
)
|
||||
|
||||
class Meta:
|
||||
nullable_fields = ['group', 'title', 'phone', 'email', 'address', 'comments']
|
||||
|
||||
@@ -109,10 +109,16 @@ class ContactForm(BootstrapMixin, CustomFieldModelForm):
|
||||
class ContactAssignmentForm(BootstrapMixin, forms.ModelForm):
|
||||
group = DynamicModelChoiceField(
|
||||
queryset=ContactGroup.objects.all(),
|
||||
required=False
|
||||
required=False,
|
||||
initial_params={
|
||||
'contacts': '$contact'
|
||||
}
|
||||
)
|
||||
contact = DynamicModelChoiceField(
|
||||
queryset=Contact.objects.all()
|
||||
queryset=Contact.objects.all(),
|
||||
query_params={
|
||||
'group_id': '$group'
|
||||
}
|
||||
)
|
||||
role = DynamicModelChoiceField(
|
||||
queryset=ContactRole.objects.all()
|
||||
|
||||
Reference in New Issue
Block a user