From 33120d14f3391bf18d8979c104a0ea16031f23ce Mon Sep 17 00:00:00 2001 From: PCoder Date: Tue, 17 Dec 2019 21:35:02 +0530 Subject: [PATCH] Modify billing address form and signup forms to include vat_number --- utils/forms.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/utils/forms.py b/utils/forms.py index fdc67d26..b7c8c6b1 100644 --- a/utils/forms.py +++ b/utils/forms.py @@ -120,17 +120,19 @@ class EditCreditCardForm(forms.Form): class BillingAddressForm(forms.ModelForm): token = forms.CharField(widget=forms.HiddenInput(), required=False) card = forms.CharField(widget=forms.HiddenInput(), required=False) + vat_number = forms.CharField(max_length=100, default="") class Meta: model = BillingAddress fields = ['cardholder_name', 'street_address', - 'city', 'postal_code', 'country'] + 'city', 'postal_code', 'country', 'vat_number'] labels = { 'cardholder_name': _('Cardholder Name'), 'street_address': _('Street Address'), 'city': _('City'), 'postal_code': _('Postal Code'), 'Country': _('Country'), + 'VAT Number': _('VAT Number') } @@ -142,7 +144,7 @@ class BillingAddressFormSignup(BillingAddressForm): class Meta: model = BillingAddress fields = ['name', 'email', 'cardholder_name', 'street_address', - 'city', 'postal_code', 'country'] + 'city', 'postal_code', 'country', 'vat_number'] labels = { 'name': 'Name', 'email': _('Email'), @@ -151,6 +153,7 @@ class BillingAddressFormSignup(BillingAddressForm): 'city': _('City'), 'postal_code': _('Postal Code'), 'Country': _('Country'), + 'vat_number': _('VAT Number') } def clean_email(self):