1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

initial static select2 fields

This commit is contained in:
John Anderson
2019-01-03 23:02:05 -05:00
parent 5285b6926f
commit 81a0889568
4 changed files with 27 additions and 3 deletions

View File

@ -336,6 +336,18 @@ class Livesearch(forms.TextInput):
self.attrs['data-label'] = obj_label
class StaticSelect2(SelectWithDisabled):
"""
A static content using the Select2 widget
"""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.attrs['class'] = 'netbox-select2-static'
#
# Form fields
#