Change recurring and description to non-required fields + Change
amount to Floatfield
This commit is contained in:
parent
332e7d6624
commit
e94ecfe52c
1 changed files with 6 additions and 9 deletions
|
@ -53,21 +53,18 @@ class HostingUserLoginForm(forms.Form):
|
||||||
|
|
||||||
|
|
||||||
class GenericPaymentForm(forms.Form):
|
class GenericPaymentForm(forms.Form):
|
||||||
amount = forms.DecimalField(widget=forms.TextInput(),
|
amount = forms.FloatField(
|
||||||
max_digits=8,
|
widget=forms.TextInput(), max_value=999999, min_value=1
|
||||||
decimal_places=2,
|
)
|
||||||
min_value=1)
|
recurring = forms.BooleanField(required=False)
|
||||||
recurring = forms.BooleanField()
|
|
||||||
description = forms.CharField(
|
description = forms.CharField(
|
||||||
widget=forms.Textarea(attrs={'style': "height: 150px;"})
|
widget=forms.Textarea(attrs={'style': "height: 150px;"}),
|
||||||
|
required=False
|
||||||
)
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
fields = ['amount', 'recurring', 'description']
|
fields = ['amount', 'recurring', 'description']
|
||||||
|
|
||||||
def clean(self):
|
|
||||||
return self.cleaned_data
|
|
||||||
|
|
||||||
|
|
||||||
class HostingUserSignupForm(forms.ModelForm):
|
class HostingUserSignupForm(forms.ModelForm):
|
||||||
confirm_password = forms.CharField(label=_("Confirm Password"),
|
confirm_password = forms.CharField(label=_("Confirm Password"),
|
||||||
|
|
Loading…
Reference in a new issue