mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00: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:
@ -108,7 +108,9 @@ class WirelessLinkForm(TenancyForm, NetBoxModelForm):
|
||||
'kind': 'wireless',
|
||||
'device_id': '$device_a',
|
||||
},
|
||||
disabled_indicator='_occupied',
|
||||
context={
|
||||
'disabled': '_occupied',
|
||||
},
|
||||
label=_('Interface')
|
||||
)
|
||||
site_b = DynamicModelChoiceField(
|
||||
@ -148,7 +150,9 @@ class WirelessLinkForm(TenancyForm, NetBoxModelForm):
|
||||
'kind': 'wireless',
|
||||
'device_id': '$device_b',
|
||||
},
|
||||
disabled_indicator='_occupied',
|
||||
context={
|
||||
'disabled': '_occupied',
|
||||
},
|
||||
label=_('Interface')
|
||||
)
|
||||
comments = CommentField()
|
||||
|
Reference in New Issue
Block a user