mirror of
https://github.com/nanoy42/coope
synced 2024-11-22 11:23:11 +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:
|
class Meta:
|
||||||
model = Reload
|
model = Reload
|
||||||
fields = ("customer", "amount", "PaymentMethod")
|
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 RefundForm(forms.ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Refund
|
model = Refund
|
||||||
fields = ("customer", "amount")
|
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 ProductForm(forms.ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Product
|
model = Product
|
||||||
fields = "__all__"
|
fields = "__all__"
|
||||||
|
widgets = {'amount': forms.TextInput}
|
||||||
|
|
||||||
class KegForm(forms.ModelForm):
|
class KegForm(forms.ModelForm):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
@ -41,11 +42,13 @@ class KegForm(forms.ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Keg
|
model = Keg
|
||||||
exclude = ("is_active", )
|
exclude = ("is_active", )
|
||||||
|
widgets = {'amount': forms.TextInput}
|
||||||
|
|
||||||
class MenuForm(forms.ModelForm):
|
class MenuForm(forms.ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Menu
|
model = Menu
|
||||||
fields = "__all__"
|
fields = "__all__"
|
||||||
|
widgets = {'amount': forms.TextInput}
|
||||||
|
|
||||||
class SearchProductForm(forms.Form):
|
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}))
|
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