saving cardholder name
This commit is contained in:
		
					parent
					
						
							
								32ba9c5ff7
							
						
					
				
			
			
				commit
				
					
						58e7a2aca7
					
				
			
		
					 3 changed files with 15 additions and 16 deletions
				
			
		|  | @ -330,20 +330,16 @@ msgstr "Deine Kreditkartennummer" | ||||||
| msgid "Reset your password" | msgid "Reset your password" | ||||||
| msgstr "Passwort zurücksetzen" | msgstr "Passwort zurücksetzen" | ||||||
| 
 | 
 | ||||||
| #, fuzzy |  | ||||||
| #| msgid "VM Settings" |  | ||||||
| msgid "My Settings" | msgid "My Settings" | ||||||
| msgstr "VM Einstellungen" | msgstr "Meine Einstellungen" | ||||||
| 
 | 
 | ||||||
| msgid "Last" | msgid "Last" | ||||||
| msgstr "" | msgstr "" | ||||||
| 
 | 
 | ||||||
| #, fuzzy |  | ||||||
| #| msgid "Card Type" |  | ||||||
| msgid "Type" | msgid "Type" | ||||||
| msgstr "Kartentyp" | msgstr "Kartentyp" | ||||||
| 
 | 
 | ||||||
| msgid "No Cards found for your account." | msgid "Add a new Card." | ||||||
| msgstr "" | msgstr "" | ||||||
| 
 | 
 | ||||||
| msgid "Add your public SSH key" | msgid "Add your public SSH key" | ||||||
|  | @ -508,7 +504,7 @@ msgstr "Bestellung Bestätigen" | ||||||
| msgid "" | msgid "" | ||||||
| "We could not find the requested VM. Please                            " | "We could not find the requested VM. Please                            " | ||||||
| "contact Data Center Light Support." | "contact Data Center Light Support." | ||||||
| msgstr "" | msgstr "Kontaktiere den Data Center Light Support." | ||||||
| 
 | 
 | ||||||
| #~ msgid "" | #~ msgid "" | ||||||
| #~ "\n" | #~ "\n" | ||||||
|  |  | ||||||
|  | @ -34,8 +34,7 @@ | ||||||
|                                     <h5 class="membership-lead">{% trans "Type" %}: {{credit_card_data.cc_brand}}</h5> |                                     <h5 class="membership-lead">{% trans "Type" %}: {{credit_card_data.cc_brand}}</h5> | ||||||
|                                 </div> |                                 </div> | ||||||
|                             {% else %} |                             {% else %} | ||||||
|                                 <h4>{% trans "No Cards found for your account." %}</h4> |                                 <h4>{% trans "Add a new Card." %}</h4> | ||||||
|                                 {% comment %} |  | ||||||
|                                 <form action="" id="payment-form-new" class="credit-card-form" method="POST"> |                                 <form action="" id="payment-form-new" class="credit-card-form" method="POST"> | ||||||
|                                     <input type="hidden" name="token"/> |                                     <input type="hidden" name="token"/> | ||||||
|                                     <div class="credit-card-goup"> |                                     <div class="credit-card-goup"> | ||||||
|  | @ -92,7 +91,6 @@ | ||||||
|                                         <p class="payment-errors"></p> |                                         <p class="payment-errors"></p> | ||||||
|                                     </div> |                                     </div> | ||||||
|                                 </form> |                                 </form> | ||||||
|                                 {% endcomment %} |  | ||||||
|                             {% endif %} |                             {% endif %} | ||||||
|                         </div> |                         </div> | ||||||
|                     </div> |                     </div> | ||||||
|  |  | ||||||
|  | @ -41,7 +41,8 @@ class LoginFormMixin(forms.Form): | ||||||
|         password = self.cleaned_data.get('password') |         password = self.cleaned_data.get('password') | ||||||
|         is_auth = authenticate(email=email, password=password) |         is_auth = authenticate(email=email, password=password) | ||||||
|         if not is_auth: |         if not is_auth: | ||||||
|             raise forms.ValidationError("Your username and/or password were incorrect.") |             raise forms.ValidationError( | ||||||
|  |                 "Your username and/or password were incorrect.") | ||||||
|         return self.cleaned_data |         return self.cleaned_data | ||||||
| 
 | 
 | ||||||
|     def clean_email(self): |     def clean_email(self): | ||||||
|  | @ -101,7 +102,8 @@ class BillingAddressForm(forms.ModelForm): | ||||||
| 
 | 
 | ||||||
|     class Meta: |     class Meta: | ||||||
|         model = BillingAddress |         model = BillingAddress | ||||||
|         fields = ['cardholder_name', 'street_address', 'city', 'postal_code', 'country'] |         fields = ['cardholder_name', 'street_address', | ||||||
|  |                   'city', 'postal_code', 'country'] | ||||||
|         labels = { |         labels = { | ||||||
|             'cardholder_name': _('Cardholder Name'), |             'cardholder_name': _('Cardholder Name'), | ||||||
|             'street_address': _('Street Address'), |             'street_address': _('Street Address'), | ||||||
|  | @ -117,9 +119,10 @@ class UserBillingAddressForm(forms.ModelForm): | ||||||
| 
 | 
 | ||||||
|     class Meta: |     class Meta: | ||||||
|         model = UserBillingAddress |         model = UserBillingAddress | ||||||
|         # cardholder name not saved |         fields = ['cardholder_name', 'street_address', | ||||||
|         fields = ['street_address', 'city', 'postal_code', 'country', 'user'] |                   'city', 'postal_code', 'country', 'user'] | ||||||
|         labels = { |         labels = { | ||||||
|  |             'cardholder_name': _('Cardholder Name'), | ||||||
|             'street_address': _('Street Building'), |             'street_address': _('Street Building'), | ||||||
|             'city': _('City'), |             'city': _('City'), | ||||||
|             'postal_code': _('Postal Code'), |             'postal_code': _('Postal Code'), | ||||||
|  | @ -147,8 +150,10 @@ class ContactUsForm(forms.ModelForm): | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|     def send_email(self, email_to='info@digitalglarus.ch'): |     def send_email(self, email_to='info@digitalglarus.ch'): | ||||||
|         text_content = render_to_string('emails/contact.txt', {'data': self.cleaned_data}) |         text_content = render_to_string( | ||||||
|         html_content = render_to_string('emails/contact.html', {'data': self.cleaned_data}) |             'emails/contact.txt', {'data': self.cleaned_data}) | ||||||
|  |         html_content = render_to_string( | ||||||
|  |             'emails/contact.html', {'data': self.cleaned_data}) | ||||||
|         email = EmailMultiAlternatives('Subject', text_content) |         email = EmailMultiAlternatives('Subject', text_content) | ||||||
|         email.attach_alternative(html_content, "text/html") |         email.attach_alternative(html_content, "text/html") | ||||||
|         email.to = [email_to] |         email.to = [email_to] | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue