Change recurring and description to non-required fields + Change

amount to Floatfield
This commit is contained in:
PCoder 2018-09-23 12:49:52 +02:00
parent 332e7d6624
commit e94ecfe52c

View file

@ -53,21 +53,18 @@ class HostingUserLoginForm(forms.Form):
class GenericPaymentForm(forms.Form):
amount = forms.DecimalField(widget=forms.TextInput(),
max_digits=8,
decimal_places=2,
min_value=1)
recurring = forms.BooleanField()
amount = forms.FloatField(
widget=forms.TextInput(), max_value=999999, min_value=1
)
recurring = forms.BooleanField(required=False)
description = forms.CharField(
widget=forms.Textarea(attrs={'style': "height: 150px;"})
widget=forms.Textarea(attrs={'style': "height: 150px;"}),
required=False
)
class Meta:
fields = ['amount', 'recurring', 'description']
def clean(self):
return self.cleaned_data
class HostingUserSignupForm(forms.ModelForm):
confirm_password = forms.CharField(label=_("Confirm Password"),