Modify billing address form and signup forms to include vat_number
This commit is contained in:
parent
490ceec47d
commit
33120d14f3
1 changed files with 5 additions and 2 deletions
|
@ -120,17 +120,19 @@ class EditCreditCardForm(forms.Form):
|
||||||
class BillingAddressForm(forms.ModelForm):
|
class BillingAddressForm(forms.ModelForm):
|
||||||
token = forms.CharField(widget=forms.HiddenInput(), required=False)
|
token = forms.CharField(widget=forms.HiddenInput(), required=False)
|
||||||
card = 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:
|
class Meta:
|
||||||
model = BillingAddress
|
model = BillingAddress
|
||||||
fields = ['cardholder_name', 'street_address',
|
fields = ['cardholder_name', 'street_address',
|
||||||
'city', 'postal_code', 'country']
|
'city', 'postal_code', 'country', 'vat_number']
|
||||||
labels = {
|
labels = {
|
||||||
'cardholder_name': _('Cardholder Name'),
|
'cardholder_name': _('Cardholder Name'),
|
||||||
'street_address': _('Street Address'),
|
'street_address': _('Street Address'),
|
||||||
'city': _('City'),
|
'city': _('City'),
|
||||||
'postal_code': _('Postal Code'),
|
'postal_code': _('Postal Code'),
|
||||||
'Country': _('Country'),
|
'Country': _('Country'),
|
||||||
|
'VAT Number': _('VAT Number')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -142,7 +144,7 @@ class BillingAddressFormSignup(BillingAddressForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = BillingAddress
|
model = BillingAddress
|
||||||
fields = ['name', 'email', 'cardholder_name', 'street_address',
|
fields = ['name', 'email', 'cardholder_name', 'street_address',
|
||||||
'city', 'postal_code', 'country']
|
'city', 'postal_code', 'country', 'vat_number']
|
||||||
labels = {
|
labels = {
|
||||||
'name': 'Name',
|
'name': 'Name',
|
||||||
'email': _('Email'),
|
'email': _('Email'),
|
||||||
|
@ -151,6 +153,7 @@ class BillingAddressFormSignup(BillingAddressForm):
|
||||||
'city': _('City'),
|
'city': _('City'),
|
||||||
'postal_code': _('Postal Code'),
|
'postal_code': _('Postal Code'),
|
||||||
'Country': _('Country'),
|
'Country': _('Country'),
|
||||||
|
'vat_number': _('VAT Number')
|
||||||
}
|
}
|
||||||
|
|
||||||
def clean_email(self):
|
def clean_email(self):
|
||||||
|
|
Loading…
Reference in a new issue