mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-17 12:42:52 -06:00
11272 make position field work correctly when internationalizion enabled
This commit is contained in:
parent
3c0a3ca703
commit
f743f2cfb8
@ -401,12 +401,13 @@ class DeviceForm(TenancyForm, NetBoxModelForm):
|
|||||||
position = forms.DecimalField(
|
position = forms.DecimalField(
|
||||||
required=False,
|
required=False,
|
||||||
help_text=_("The lowest-numbered unit occupied by the device"),
|
help_text=_("The lowest-numbered unit occupied by the device"),
|
||||||
|
localize=True,
|
||||||
widget=APISelect(
|
widget=APISelect(
|
||||||
api_url='/api/dcim/racks/{{rack}}/elevation/',
|
api_url='/api/dcim/racks/{{rack}}/elevation/',
|
||||||
attrs={
|
attrs={
|
||||||
'disabled-indicator': 'device',
|
'disabled-indicator': 'device',
|
||||||
'data-dynamic-params': '[{"fieldName":"face","queryParam":"face"}]'
|
'data-dynamic-params': '[{"fieldName":"face","queryParam":"face"}]'
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
device_type = DynamicModelChoiceField(
|
device_type = DynamicModelChoiceField(
|
||||||
|
Loading…
Reference in New Issue
Block a user