mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-23 15:33:45 +00:00
Fix switchs management autocomplete form
This commit is contained in:
parent
204cc48f58
commit
3883238f10
1 changed files with 8 additions and 1 deletions
|
@ -108,12 +108,19 @@ class EditOptionalTopologieForm(ModelForm):
|
|||
"""Form used to edit the configuration of switches."""
|
||||
|
||||
automatic_provision_switchs = forms.ModelMultipleChoiceField(
|
||||
Switch.objects.all(), required=False
|
||||
Switch.objects.all(),
|
||||
required=False,
|
||||
widget=AutocompleteMultipleModelMixin(url="/topologie/switch-autocomplete"),
|
||||
)
|
||||
|
||||
class Meta:
|
||||
model = OptionalTopologie
|
||||
fields = "__all__"
|
||||
widgets = {
|
||||
"switchs_ip_type": AutocompleteModelMixin(
|
||||
url="/machines/iptype-autocomplete",
|
||||
),
|
||||
}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
prefix = kwargs.pop("prefix", self.Meta.model.__name__)
|
||||
|
|
Loading…
Reference in a new issue