From 530bbcd5f6500919f41c594fcd9e002ad3110f79 Mon Sep 17 00:00:00 2001 From: PCoder Date: Wed, 3 Oct 2018 08:18:45 +0200 Subject: [PATCH] Create ProductPaymentForm from GenericPaymentForm --- hosting/forms.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hosting/forms.py b/hosting/forms.py index 928f910e..c941e28f 100644 --- a/hosting/forms.py +++ b/hosting/forms.py @@ -97,6 +97,14 @@ class GenericPaymentForm(forms.Form): return recurring +class ProductPaymentForm(GenericPaymentForm): + def __init__(self, *args, **kwargs): + super(GenericPaymentForm, self).__init__(*args, **kwargs) + self.fields['product_name'].widget = forms.TextInput( + attrs={'placeholder': _('Product name'), 'readonly': 'readonly'} + ) + + class HostingUserSignupForm(forms.ModelForm): confirm_password = forms.CharField(label=_("Confirm Password"), widget=forms.PasswordInput())