mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-23 07:56:44 -06:00
add advance selector in platform
This commit is contained in:
parent
ca06c4c5bf
commit
85266a4db8
@ -439,21 +439,11 @@ class DeviceForm(TenancyForm, NetBoxModelForm):
|
|||||||
label=_('Device role'),
|
label=_('Device role'),
|
||||||
queryset=DeviceRole.objects.all()
|
queryset=DeviceRole.objects.all()
|
||||||
)
|
)
|
||||||
manufacturer = DynamicModelChoiceField(
|
|
||||||
label=_('Manufacturer'),
|
|
||||||
queryset=Manufacturer.objects.all(),
|
|
||||||
required=False,
|
|
||||||
initial_params={
|
|
||||||
'platforms': '$platform'
|
|
||||||
}
|
|
||||||
)
|
|
||||||
platform = DynamicModelChoiceField(
|
platform = DynamicModelChoiceField(
|
||||||
label=_('Platform'),
|
label=_('Platform'),
|
||||||
queryset=Platform.objects.all(),
|
queryset=Platform.objects.all(),
|
||||||
required=False,
|
required=False,
|
||||||
query_params={
|
selector=True
|
||||||
"manufacturer_id": '$manufacturer'
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
cluster = DynamicModelChoiceField(
|
cluster = DynamicModelChoiceField(
|
||||||
label=_('Cluster'),
|
label=_('Cluster'),
|
||||||
|
@ -197,21 +197,11 @@ class VirtualMachineForm(TenancyForm, NetBoxModelForm):
|
|||||||
"vm_role": "True"
|
"vm_role": "True"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
manufacturer = DynamicModelChoiceField(
|
|
||||||
label=_('Manufacturer'),
|
|
||||||
queryset=Manufacturer.objects.all(),
|
|
||||||
required=False,
|
|
||||||
initial_params={
|
|
||||||
'platforms': '$platform'
|
|
||||||
}
|
|
||||||
)
|
|
||||||
platform = DynamicModelChoiceField(
|
platform = DynamicModelChoiceField(
|
||||||
label=_('Platform'),
|
label=_('Platform'),
|
||||||
queryset=Platform.objects.all(),
|
queryset=Platform.objects.all(),
|
||||||
required=False,
|
required=False,
|
||||||
query_params={
|
selector=True
|
||||||
"manufacturer_id": '$manufacturer'
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
local_context_data = JSONField(
|
local_context_data = JSONField(
|
||||||
required=False,
|
required=False,
|
||||||
|
Loading…
Reference in New Issue
Block a user