mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Added views to add/remove hosts to/from clusters
This commit is contained in:
@@ -187,6 +187,10 @@ class APISelect(SelectWithDisabled):
|
||||
self.attrs['disabled-indicator'] = disabled_indicator
|
||||
|
||||
|
||||
class APISelectMultiple(APISelect):
|
||||
allow_multiple_selected = True
|
||||
|
||||
|
||||
class Livesearch(forms.TextInput):
|
||||
"""
|
||||
A text widget that carries a few extra bits of data for use in AJAX-powered autocomplete search
|
||||
@@ -385,6 +389,15 @@ class ChainedModelChoiceField(forms.ModelChoiceField):
|
||||
super(ChainedModelChoiceField, self).__init__(*args, **kwargs)
|
||||
|
||||
|
||||
class ChainedModelMultipleChoiceField(forms.ModelMultipleChoiceField):
|
||||
"""
|
||||
See ChainedModelChoiceField
|
||||
"""
|
||||
def __init__(self, chains=None, *args, **kwargs):
|
||||
self.chains = chains
|
||||
super(ChainedModelMultipleChoiceField, self).__init__(*args, **kwargs)
|
||||
|
||||
|
||||
class SlugField(forms.SlugField):
|
||||
|
||||
def __init__(self, slug_source='name', *args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user