diff options
Diffstat (limited to 'src/booking/forms.py')
-rw-r--r-- | src/booking/forms.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/booking/forms.py b/src/booking/forms.py index b9c9231..886f0f6 100644 --- a/src/booking/forms.py +++ b/src/booking/forms.py @@ -11,8 +11,7 @@ from django.forms.widgets import NumberInput from workflow.forms import ( MultipleSelectFilterField, - MultipleSelectFilterWidget, - FormUtils) + MultipleSelectFilterWidget) from account.models import UserProfile from resource_inventory.models import Image, Installer, Scenario from workflow.forms import SearchableSelectMultipleField @@ -27,7 +26,7 @@ class QuickBookingForm(forms.Form): installer = forms.ModelChoiceField(queryset=Installer.objects.all(), required=False) scenario = forms.ModelChoiceField(queryset=Scenario.objects.all(), required=False) - def __init__(self, data=None, user=None, *args, **kwargs): + def __init__(self, data=None, user=None, lab_data=None, *args, **kwargs): if "default_user" in kwargs: default_user = kwargs.pop("default_user") else: @@ -47,8 +46,6 @@ class QuickBookingForm(forms.Form): **get_user_field_opts() ) - attrs = FormUtils.getLabData() - self.fields['filter_field'] = MultipleSelectFilterField(widget=MultipleSelectFilterWidget(**attrs)) self.fields['length'] = forms.IntegerField( widget=NumberInput( attrs={ @@ -60,6 +57,8 @@ class QuickBookingForm(forms.Form): ) ) + self.fields['filter_field'] = MultipleSelectFilterField(widget=MultipleSelectFilterWidget(**lab_data)) + def build_user_list(self): """ Build list of UserProfiles. |