2022-02-16 16:32:51 -05:00
|
|
|
from django import forms
|
|
|
|
|
2022-05-05 17:21:48 -04:00
|
|
|
from dal import autocomplete
|
|
|
|
|
2022-02-16 16:32:51 -05:00
|
|
|
from rentals.models import LockerInfo
|
|
|
|
|
|
|
|
|
2022-03-15 21:23:54 -04:00
|
|
|
class LockerInfoForm(forms.ModelForm):
|
2022-02-16 16:32:51 -05:00
|
|
|
class Meta:
|
|
|
|
model = LockerInfo
|
|
|
|
fields = [
|
|
|
|
"blind_code",
|
|
|
|
"bitting_code",
|
|
|
|
"renter",
|
2022-03-15 21:59:48 -04:00
|
|
|
"reserved",
|
2022-05-05 17:30:58 -04:00
|
|
|
"notes",
|
2022-02-16 16:32:51 -05:00
|
|
|
]
|
2022-05-05 17:21:48 -04:00
|
|
|
widgets = {
|
|
|
|
"renter": autocomplete.ModelSelect2(
|
|
|
|
url="membershipworks:member-autocomplete",
|
|
|
|
attrs={
|
|
|
|
"data-placeholder": "-- No Renter --",
|
|
|
|
},
|
|
|
|
)
|
|
|
|
}
|