mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
WIP: Initial work on the cable connection form
This commit is contained in:
@@ -207,6 +207,15 @@ class SelectWithPK(forms.Select):
|
||||
option_template_name = 'widgets/select_option_with_pk.html'
|
||||
|
||||
|
||||
class ContentTypeSelect(forms.Select):
|
||||
"""
|
||||
Appends an `api-value` attribute equal to the slugified model name for each ContentType. For example:
|
||||
<option value="37" api-value="console-server-port">console server port</option>
|
||||
This attribute can be used to reference the relevant API endpoint for a particular ContentType.
|
||||
"""
|
||||
option_template_name = 'widgets/select_contenttype.html'
|
||||
|
||||
|
||||
class ArrayFieldSelectMultiple(SelectWithDisabled, forms.SelectMultiple):
|
||||
"""
|
||||
MultiSelect widget for a SimpleArrayField. Choices must be populated on the widget.
|
||||
|
||||
Reference in New Issue
Block a user