diff --git a/datacenterlight/templates/datacenterlight/landing_payment.html b/datacenterlight/templates/datacenterlight/landing_payment.html index fb6d51b0..4e71eab9 100644 --- a/datacenterlight/templates/datacenterlight/landing_payment.html +++ b/datacenterlight/templates/datacenterlight/landing_payment.html @@ -131,6 +131,7 @@
{% trans "Credit Card" %}
{% trans "Last" %} 4: ***** {{card.last4}}
{% trans "Type" %}: {{card.brand}}
+
{% trans "Expiry" %}: {{card.exp_month}}/{{card.exp_year}}
{% trans "SELECT" %} diff --git a/datacenterlight/templates/datacenterlight/order_detail.html b/datacenterlight/templates/datacenterlight/order_detail.html index 31933e12..8a444bef 100644 --- a/datacenterlight/templates/datacenterlight/order_detail.html +++ b/datacenterlight/templates/datacenterlight/order_detail.html @@ -41,6 +41,7 @@

{% trans "Payment method" %}:

{{cc_brand|default:_('Credit Card')}} {% trans "ending in" %} ****{{cc_last4}}
+ {% trans "Expiry" %} {{cc_exp_year}}/{{cc_exp_month}}
{{request.user.email}}

diff --git a/datacenterlight/views.py b/datacenterlight/views.py index 3763d465..ae649623 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -568,11 +568,15 @@ class OrderConfirmationView(DetailView, FormView): card_details_response = card_details['response_object'] context['cc_last4'] = card_details_response['last4'] context['cc_brand'] = card_details_response['brand'] + context['cc_exp_year'] = card_details_response['exp_year'] + context['cc_exp_month'] = '{:02d}'.format(card_details_response['exp_month']) else: card_id = self.request.session.get('card_id') card_detail = UserCardDetail.objects.get(id=card_id) context['cc_last4'] = card_detail.last4 context['cc_brand'] = card_detail.brand + context['cc_exp_year'] = card_detail.exp_year + context['cc_exp_month'] ='{:02d}'.format(card_detail.exp_month) if ('generic_payment_type' in request.session and self.request.session['generic_payment_type'] == 'generic'): diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index 0e337cfb..14d48da9 100644 --- a/hosting/locale/de/LC_MESSAGES/django.po +++ b/hosting/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-09-08 08:45+0000\n" +"POT-Creation-Date: 2019-07-09 15:21+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -27,6 +27,30 @@ msgstr "Dein Account wurde noch nicht aktiviert." msgid "User does not exist" msgstr "Der Benutzer existiert nicht" +msgid "Choose a product" +msgstr "" + +msgid "Amount in CHF" +msgstr "Betrag" + +msgid "Recurring monthly" +msgstr "" + +msgid "Amount field does not match" +msgstr "" + +msgid "Recurring field does not match" +msgstr "" + +msgid "Product name" +msgstr "Produkt" + +msgid "Monthly subscription" +msgstr "" + +msgid "One time payment" +msgstr "" + msgid "Confirm Password" msgstr "Passwort Bestätigung" @@ -52,6 +76,9 @@ msgstr "Bitte verwende einen gültigen SSH-Key" msgid "This key exists already with the name \"%(name)s\"" msgstr "Der SSH-Key mit dem Name \"%(name)s\" existiert bereits" +msgid "Comma not accepted in the name of the key" +msgstr "" + msgid "All Rights Reserved" msgstr "Alle Rechte vorbehalten" @@ -209,7 +236,8 @@ msgstr "Du hast eine neue virtuelle Maschine bestellt!" #, python-format msgid "Your order of %(vm_name)s has been charged." -msgstr "Deine Bestellung von %(vm_name)s wurde entgegengenommen." +msgstr "" +"Deine Bestellung von %(vm_name)s wurde entgegengenommen." msgid "You can view your VM detail by clicking the button below." msgstr "Um die Rechnung zu sehen, klicke auf den Button unten." @@ -305,6 +333,100 @@ msgstr "Dashboard" msgid "Logout" msgstr "Abmelden" +#, python-format +msgid "%(page_header_text)s" +msgstr "" + +msgid "Invoice #" +msgstr "Rechnung" + +msgid "Date" +msgstr "Datum" + +msgid "Status" +msgstr "" + +msgid "Terminated" +msgstr "Beendet" + +msgid "Approved" +msgstr "Akzeptiert" + +msgid "Declined" +msgstr "Abgelehnt" + +msgid "Billed to" +msgstr "Rechnungsadresse" + +msgid "Payment method" +msgstr "Bezahlmethode" + +msgid "ending in" +msgstr "endend in" + +msgid "Invoice summary" +msgstr "" + +msgid "Product" +msgstr "Produkt" + +msgid "Period" +msgstr "Periode" + +msgid "Cores" +msgstr "Prozessorkerne" + +msgid "Memory" +msgstr "Arbeitsspeicher" + +msgid "Disk space" +msgstr "Festplattenkapazität" + +msgid "Subtotal" +msgstr "Zwischensumme" + +msgid "VAT" +msgstr "Mehrwertsteuer" + +msgid "Discount" +msgstr "Rabatt" + +msgid "Total" +msgstr "Gesamt" + +msgid "Amount" +msgstr "Betrag" + +msgid "Description" +msgstr "" + +msgid "Recurring" +msgstr "" + +msgid "of every month" +msgstr "" + +msgid "BACK TO LIST" +msgstr "ZURÜCK ZUR LISTE" + +msgid "Some problem encountered. Please try again later." +msgstr "Ein Problem ist aufgetreten. Bitte versuche es später noch einmal." + +msgid "VM ID" +msgstr "" + +msgid "IP Address" +msgstr "" + +msgid "See Invoice" +msgstr "Siehe Rechnung" + +msgid "Page" +msgstr "" + +msgid "of" +msgstr "" + msgid "Log in" msgstr "Anmelden" @@ -338,67 +460,15 @@ msgstr "Als gelesen markieren" msgid "All notifications" msgstr "Alle Benachrichtigungen" -#, python-format -msgid "%(page_header_text)s" -msgstr "" - -msgid "Date" -msgstr "Datum" - -msgid "Status" -msgstr "" - -msgid "Terminated" -msgstr "Beendet" - -msgid "Approved" -msgstr "Akzeptiert" - -msgid "Declined" -msgstr "Abgelehnt" - -msgid "Billed to" -msgstr "Rechnungsadresse" - -msgid "Payment method" -msgstr "Bezahlmethode" - -msgid "ending in" -msgstr "endend in" - msgid "Credit Card" msgstr "Kreditkarte" +msgid "Expiry" +msgstr "Gültig bis" + msgid "Order summary" msgstr "Bestellungsübersicht" -msgid "Product" -msgstr "Produkt" - -msgid "Period" -msgstr "Periode" - -msgid "Cores" -msgstr "Prozessorkerne" - -msgid "Memory" -msgstr "Arbeitsspeicher" - -msgid "Disk space" -msgstr "Festplattenkapazität" - -msgid "Subtotal" -msgstr "Zwischensumme" - -msgid "VAT" -msgstr "Mehrwertsteuer" - -msgid "Discount" -msgstr "Rabatt" - -msgid "Total" -msgstr "Gesamt" - #, python-format msgid "" "By clicking \"Place order\" this plan will charge your credit card account " @@ -410,9 +480,6 @@ msgstr "" msgid "Place order" msgstr "Bestellen" -msgid "BACK TO LIST" -msgstr "ZURÜCK ZUR LISTE" - msgid "Processing..." msgstr "Abarbeitung..." @@ -425,24 +492,9 @@ msgstr "" msgid "Close" msgstr "Schliessen" -msgid "Some problem encountered. Please try again later." -msgstr "Ein Problem ist aufgetreten. Bitte versuche es später noch einmal." - msgid "Order Nr." msgstr "Bestellung Nr." -msgid "Amount" -msgstr "Betrag" - -msgid "See Invoice" -msgstr "Siehe Rechnung" - -msgid "Page" -msgstr "" - -msgid "of" -msgstr "" - msgid "Your Order" msgstr "Deine Bestellung" @@ -539,9 +591,6 @@ msgstr "" "Wir nutzen Stripe für " "die Bezahlung und speichern keine Informationen in unserer Datenbank." -msgid "Add your public SSH key" -msgstr "Füge deinen öffentlichen SSH-Key hinzu" - msgid "Use your created key to access to the VM" msgstr "Benutze deinen erstellten SSH-Key um auf deine VM zugreifen zu können" @@ -783,6 +832,9 @@ msgstr "" msgid "Invalid number of cores" msgstr "Ungültige Anzahle CPU-Kerne" +msgid "Invalid calculator properties" +msgstr "" + msgid "Invalid RAM size" msgstr "Ungültige RAM-Grösse" @@ -821,6 +873,9 @@ msgstr "" "Es gab einen Fehler bei der Bearbeitung Deine Anfrage. Bitte versuche es " "noch einmal." +#~ msgid "Add your public SSH key" +#~ msgstr "Füge deinen öffentlichen SSH-Key hinzu" + #~ msgid "Do you want to cancel your Virtual Machine" #~ msgstr "Bist Du sicher, dass Du Deine virtuelle Maschine beenden willst" @@ -830,9 +885,6 @@ msgstr "" #~ msgid "My VM page" #~ msgstr "Meine VM page" -#~ msgid "Invoice Date" -#~ msgstr "Rechnung Datum" - #~ msgid "VM %(VM_ID)s terminated successfully" #~ msgstr "VM %(VM_ID)s erfolgreich beendet" diff --git a/hosting/models.py b/hosting/models.py index 311ee953..7b08948e 100644 --- a/hosting/models.py +++ b/hosting/models.py @@ -597,6 +597,8 @@ class UserCardDetail(AssignPermissionsMixin, models.Model): for card in user_card_details: cards_list.append({ 'last4': card.last4, 'brand': card.brand, 'id': card.id, + 'exp_year': card.exp_year, + 'exp_month': '{:02d}'.format(card.exp_month), 'preferred': card.preferred }) return cards_list diff --git a/hosting/templates/hosting/order_detail.html b/hosting/templates/hosting/order_detail.html index 4a62e9fa..a84e4e4f 100644 --- a/hosting/templates/hosting/order_detail.html +++ b/hosting/templates/hosting/order_detail.html @@ -82,6 +82,7 @@ {{user.email}} {% else %} {{cc_brand|default:_('Credit Card')}} {% trans "ending in" %} ****{{cc_last4}}
+ {% trans "Expiry" %} {{cc_exp_year}}/{{cc_exp_month}}
{% if request.user.is_authenticated %} {{request.user.email}} {% else %} diff --git a/hosting/templates/hosting/payment.html b/hosting/templates/hosting/payment.html index e09775cf..f0512fdb 100644 --- a/hosting/templates/hosting/payment.html +++ b/hosting/templates/hosting/payment.html @@ -131,6 +131,7 @@
{% trans "Credit Card" %}
{% trans "Last" %} 4: ***** {{card.last4}}
{% trans "Type" %}: {{card.brand}}
+
{% trans "Expiry" %}: {{card.exp_month}}/{{card.exp_year}}
{% trans "SELECT" %} diff --git a/hosting/templates/hosting/settings.html b/hosting/templates/hosting/settings.html index 56818cbf..5cdd830c 100644 --- a/hosting/templates/hosting/settings.html +++ b/hosting/templates/hosting/settings.html @@ -37,6 +37,7 @@
{% trans "Credit Card" %}
{% trans "Last" %} 4: ***** {{card.last4}}
{% trans "Type" %}: {{card.brand}}
+
{% trans "Expiry" %}: {{card.exp_month}}/{{card.exp_year}}
{% if card_list_len > 1 %} diff --git a/hosting/views.py b/hosting/views.py index 201d58e7..87cb948c 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -906,11 +906,15 @@ class OrdersHostingDetailView(LoginRequiredMixin, DetailView, FormView): card_details_response = card_details['response_object'] context['cc_last4'] = card_details_response['last4'] context['cc_brand'] = card_details_response['brand'] + context['cc_exp_year'] = card_details_response['exp_year'] + context['cc_exp_month'] = card_details_response['exp_month'] else: card_id = self.request.session.get('card_id') card_detail = UserCardDetail.objects.get(id=card_id) context['cc_last4'] = card_detail.last4 context['cc_brand'] = card_detail.brand + context['cc_exp_year'] = card_detail.exp_year + context['cc_exp_month'] = '{:02d}'.format(card_detail.exp_month) context['site_url'] = reverse('hosting:create_virtual_machine') context['vm'] = self.request.session.get('specs') return context