mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 14:13:21 +00:00
Avoid negative value in refilings
This commit is contained in:
parent
ccd67e50b8
commit
0d918d80d3
@ -59,12 +59,10 @@ class GetUserForm(forms.Form):
|
|||||||
class RefillForm(forms.ModelForm):
|
class RefillForm(forms.ModelForm):
|
||||||
error_css_class = 'error'
|
error_css_class = 'error'
|
||||||
required_css_class = 'required'
|
required_css_class = 'required'
|
||||||
|
amount = forms.FloatField(min_value=0, widget=forms.NumberInput(attrs={'class':'focus'}))
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Refilling
|
model = Refilling
|
||||||
fields = ['amount', 'payment_method', 'bank']
|
fields = ['amount', 'payment_method', 'bank']
|
||||||
widgets = {
|
|
||||||
'amount': forms.NumberInput(attrs={'class':'focus'},)
|
|
||||||
}
|
|
||||||
|
|
||||||
class CounterTabsMixin(TabedViewMixin):
|
class CounterTabsMixin(TabedViewMixin):
|
||||||
def get_tabs_title(self):
|
def get_tabs_title(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user