mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-13 23:32:17 -06:00
* Initial work on #13283 * Enable passing TomSelect HTML template attibutes on DynamicModelChoiceField * Merge disabled_indicator into option_attrs * Add support for annotating a numeric count on dropdown options * Annotate parent object on relevant fields * Improve rendering of color options * Improve rendering of color options * Rename option_attrs to context * Expose option context on ObjectVar for custom scripts * Document dropdown context variables
This commit is contained in:
@@ -557,6 +557,9 @@ class DeviceBulkEditForm(NetBoxModelBulkEditForm):
|
||||
label=_('Device type'),
|
||||
queryset=DeviceType.objects.all(),
|
||||
required=False,
|
||||
context={
|
||||
'parent': 'manufacturer',
|
||||
},
|
||||
query_params={
|
||||
'manufacturer_id': '$manufacturer'
|
||||
}
|
||||
@@ -640,6 +643,9 @@ class ModuleBulkEditForm(NetBoxModelBulkEditForm):
|
||||
required=False,
|
||||
query_params={
|
||||
'manufacturer_id': '$manufacturer'
|
||||
},
|
||||
context={
|
||||
'parent': 'manufacturer',
|
||||
}
|
||||
)
|
||||
status = forms.ChoiceField(
|
||||
|
||||
Reference in New Issue
Block a user