Create GenericPaymentForm

This commit is contained in:
PCoder 2018-09-22 08:16:26 +02:00
parent d7be223fcb
commit a7fa52490c

View file

@ -52,6 +52,21 @@ class HostingUserLoginForm(forms.Form):
raise forms.ValidationError(_("User does not exist"))
class GenericPaymentForm(forms.Form):
amount = forms.DecimalField(widget=forms.TextInput(),
max_digits=8,
decimal_places=2,
min_value=1)
recurring = forms.BooleanField()
description = forms.Textarea()
class Meta:
fields = ['amount', 'recurring', 'description']
def clean(self):
return self.cleaned_data
class HostingUserSignupForm(forms.ModelForm):
confirm_password = forms.CharField(label=_("Confirm Password"),
widget=forms.PasswordInput())