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