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):
|
||||
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"),
|
||||
|
|
Loading…
Reference in a new issue