mirror of
https://github.com/nanoy42/coope
synced 2024-12-23 23:43:47 +00:00
Changement des widgtes
This commit is contained in:
parent
be65967e3c
commit
53d4acae01
1 changed files with 5 additions and 2 deletions
|
@ -16,20 +16,21 @@ class ReloadForm(forms.ModelForm):
|
|||
class Meta:
|
||||
model = Reload
|
||||
fields = ("customer", "amount", "PaymentMethod")
|
||||
widgets = {'customer': autocomplete.ModelSelect2(url='users:active-users-autocomplete', attrs={'data-minimum-input-length':2})}
|
||||
widgets = {'customer': autocomplete.ModelSelect2(url='users:active-users-autocomplete', attrs={'data-minimum-input-length':2}), 'amount': forms.TextInput}
|
||||
|
||||
|
||||
class RefundForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Refund
|
||||
fields = ("customer", "amount")
|
||||
widgets = {'customer': autocomplete.ModelSelect2(url='users:active-users-autocomplete', attrs={'data-minimum-input-length':2})}
|
||||
widgets = {'customer': autocomplete.ModelSelect2(url='users:active-users-autocomplete', attrs={'data-minimum-input-length':2}), 'amount': forms.TextInput}
|
||||
|
||||
|
||||
class ProductForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Product
|
||||
fields = "__all__"
|
||||
widgets = {'amount': forms.TextInput}
|
||||
|
||||
class KegForm(forms.ModelForm):
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
@ -41,11 +42,13 @@ class KegForm(forms.ModelForm):
|
|||
class Meta:
|
||||
model = Keg
|
||||
exclude = ("is_active", )
|
||||
widgets = {'amount': forms.TextInput}
|
||||
|
||||
class MenuForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Menu
|
||||
fields = "__all__"
|
||||
widgets = {'amount': forms.TextInput}
|
||||
|
||||
class SearchProductForm(forms.Form):
|
||||
product = forms.ModelChoiceField(queryset=Product.objects.all(), required=True, label="Produit", widget=autocomplete.ModelSelect2(url='gestion:products-autocomplete', attrs={'data-minimum-input-length':2}))
|
||||
|
|
Loading…
Reference in a new issue