Merge pull request #362 from pcoder/new_flow_enhancement

- DE translations added
 - Missing OS configuration added to payment and order confirmation pages
 - Autofill of billing address when pressing back button on order confirmation page
This commit is contained in:
Pcoder 2017-07-01 00:32:36 +02:00 committed by GitHub
commit 3aa1357960
5 changed files with 110 additions and 35 deletions

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-19 12:22+0530\n"
"POT-Creation-Date: 2017-07-01 02:15+0530\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -99,15 +99,18 @@ msgid ""
"datacenterlight account.<br/>\n"
" %(base_url)s%(activation_link)s\n"
" "
msgstr "\n"
" <a href=\"%(base_url)s%(activation_link)s\">Klicke hier</a> um deinen %(dcl_text)s zu aktivieren.<br/><br/>\n"
" Oder kopiere den folgenden Link in die Adressleiste deines Browsers und folge dann dem Link um deinen %(dcl_text)s Account zu aktivieren.<br/>\n"
msgstr ""
"\n"
" <a href=\"%(base_url)s%(activation_link)s\">Klicke hier</a> "
"um deinen %(dcl_text)s zu aktivieren.<br/><br/>\n"
" Oder kopiere den folgenden Link in die Adressleiste deines "
"Browsers und folge dann dem Link um deinen %(dcl_text)s Account zu "
"aktivieren.<br/>\n"
" %(base_url)s%(activation_link)s\n"
" "
#: templates/datacenterlight/emails/user_activation.html:123
#: templates/datacenterlight/emails/user_activation.txt:11
#| msgid "Your Name"
msgid "Your"
msgstr "Dein"
@ -128,8 +131,9 @@ msgstr ""
"\n"
"Hallo,\n"
"\n"
"Du kannst deinen %(dcl_text)s Account aktivieren, indem du hier klickst %(base_url)s"
"%(activation_link)s\n"
"Du kannst deinen %(dcl_text)s Account aktivieren, indem du hier klickst "
"%(base_url)s%(activation_link)s\n"
#: templates/datacenterlight/includes/_footer.html:11
#: templates/datacenterlight/includes/_footer.html:31
#: templates/datacenterlight/includes/_navbar.html:27
@ -298,6 +302,54 @@ msgstr "Fragen?"
msgid "Contact us!"
msgstr "Kontaktiere uns!"
#: templates/datacenterlight/order_detail.html:24
msgid "Confirm Order"
msgstr "Bestellung Bestätigen"
#: templates/datacenterlight/order_detail.html:30
msgid "Billed To:"
msgstr "Rechnungsadresse"
#: templates/datacenterlight/order_detail.html:39
msgid "Date"
msgstr "Datum"
#: templates/datacenterlight/order_detail.html:48
msgid "Payment Method:"
msgstr "Bezahlmethode"
#: templates/datacenterlight/order_detail.html:49
msgid "ending"
msgstr "endend in"
#: templates/datacenterlight/order_detail.html:59
msgid "Order summary"
msgstr "Bestellungsübersicht"
#: templates/datacenterlight/order_detail.html:63
msgid "Cores"
msgstr "Prozessorkerne"
#: templates/datacenterlight/order_detail.html:65
msgid "Memory"
msgstr "Arbeitsspeicher"
#: templates/datacenterlight/order_detail.html:67
msgid "Disk space"
msgstr "Festplattenkapazität"
#: templates/datacenterlight/order_detail.html:69
msgid "Configuration"
msgstr "Konfiguration"
#: templates/datacenterlight/order_detail.html:71
msgid "Total"
msgstr ""
#: templates/datacenterlight/order_detail.html:78
msgid "Place order"
msgstr "Bestellen"
#: templates/datacenterlight/pricing.html:9
msgid "We are cutting down the costs significantly!"
msgstr "Wir sorgen dafür, dass die Kosten für Dich signifikant abnehmen"

View file

@ -46,7 +46,7 @@
<div class="col-xs-6">
<address>
<strong>{% trans "Payment Method:"%}</strong><br>
{{cc_brand}} ending **** {{cc_last4}}<br>
{{cc_brand}} {% trans "ending" %} **** {{cc_last4}}<br>
{{request.session.user.email}}
</address>
</div>
@ -66,6 +66,8 @@
<hr>
<p><b>{% trans "Disk space"%}</b> <span class="pull-right">{{vm.disk_size}} GB</span></p>
<hr>
<p><b>{% trans "Configuration"%}</b> <span class="pull-right">{{request.session.template.name}}</span></p>
<hr>
<h4>{% trans "Total"%}<p class="pull-right"><b>{{vm.price}} CHF</b></p></h4>
{% endwith %}
</div>

View file

@ -198,6 +198,8 @@ class IndexView(CreateView):
del request.session['specs']
if 'user' in request.session :
del request.session['user']
if 'billing_address_data' in request.session :
del request.session['billing_address_data']
try:
manager = OpenNebulaManager()
templates = manager.get_templates()
@ -310,6 +312,21 @@ class PaymentOrderView(FormView):
template_name = 'hosting/payment.html'
form_class = BillingAddressForm
def get_form_kwargs(self):
form_kwargs = super(PaymentOrderView, self).get_form_kwargs()
billing_address_data = self.request.session.get('billing_address_data')
if billing_address_data:
form_kwargs.update({
'initial': {
'street_address': billing_address_data['street_address'],
'city': billing_address_data['city'],
'postal_code': billing_address_data['postal_code'],
'country': billing_address_data['country'],
}
})
return form_kwargs
def get_context_data(self, **kwargs):
context = super(PaymentOrderView, self).get_context_data(**kwargs)
context.update({

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-23 02:28+0530\n"
"POT-Creation-Date: 2017-07-01 02:09+0530\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -26,47 +26,47 @@ msgstr "Dein Account wurde noch nicht aktiviert."
msgid "Paste here your public key"
msgstr "Fügen Sie Ihren public key ein"
#: templates/hosting/base_short.html:67
#: templates/hosting/base_short.html:68
msgid "My Virtual Machines"
msgstr "Meine virtuellen Maschinen"
#: templates/hosting/base_short.html:72 templates/hosting/orders.html.py:12
#: templates/hosting/base_short.html:73 templates/hosting/orders.html.py:12
msgid "My Orders"
msgstr "Meine Bestellungen"
#: templates/hosting/base_short.html:81
#: templates/hosting/base_short.html:82
msgid "Keys"
msgstr "Schlüssel"
#: templates/hosting/base_short.html:86
#: templates/hosting/base_short.html:87
msgid "Notifications "
msgstr "Benachrichtigungen"
#: templates/hosting/base_short.html:89
#: templates/hosting/base_short.html:90
msgid "Logout"
msgstr "Abmelden"
#: templates/hosting/base_short.html:94
#: templates/hosting/base_short.html:95
msgid "How it works"
msgstr "So funktioniert es"
#: templates/hosting/base_short.html:97
#: templates/hosting/base_short.html:98
msgid "Your infrastructure"
msgstr "deine Infrastruktur"
#: templates/hosting/base_short.html:100
#: templates/hosting/base_short.html:101
msgid "Our inftrastructure"
msgstr "Unsere Infrastruktur"
#: templates/hosting/base_short.html:103
#: templates/hosting/base_short.html:104
msgid "Pricing"
msgstr "Preise"
#: templates/hosting/base_short.html:106
#: templates/hosting/base_short.html:107
msgid "Contact"
msgstr "Kontakt"
#: templates/hosting/base_short.html:109
#: templates/hosting/base_short.html:110
#: templates/hosting/confirm_reset_password.html:38
#: templates/hosting/login.html:17 templates/hosting/login.html.py:26
#: templates/hosting/reset_password.html:32 templates/hosting/signup.html:30
@ -347,11 +347,11 @@ msgstr "Bestellung stornieren"
msgid "Do You want to delete your order?"
msgstr "Willst du deine Bestellung löschen?"
#: templates/hosting/orders.html:63 templates/hosting/user_keys.html.py:62
#: templates/hosting/orders.html:63 templates/hosting/user_keys.html.py:63
msgid "Close"
msgstr "Schliessen"
#: templates/hosting/orders.html:65 templates/hosting/user_keys.html.py:64
#: templates/hosting/orders.html:65 templates/hosting/user_keys.html.py:65
msgid "Delete"
msgstr "Löschen"
@ -359,31 +359,36 @@ msgstr "Löschen"
msgid "Billing Amount"
msgstr "Rechnungsbetrag"
#: templates/hosting/payment.html:35
#: templates/hosting/payment.html:26
#: templates/hosting/virtual_machine_detail.html:98
msgid "Configuration"
msgstr "Konfiguration"
#: templates/hosting/payment.html:38
msgid "Billing Address"
msgstr "Rechnungsadresse"
#: templates/hosting/payment.html:49
#: templates/hosting/payment.html:52
msgid "Payment Details"
msgstr "Rechnungsdetails"
#: templates/hosting/payment.html:62
#: templates/hosting/payment.html:65
msgid "Submit Payment"
msgstr "Betrag überweisen"
#: templates/hosting/payment.html:81
#: templates/hosting/payment.html:84
msgid "CARD NUMBER"
msgstr "Kreditkartennummer"
#: templates/hosting/payment.html:86
#: templates/hosting/payment.html:89
msgid "Valid Card Number"
msgstr "Gültige Kreditkartennummer"
#: templates/hosting/payment.html:95
#: templates/hosting/payment.html:98
msgid "EXPIRATION DATE"
msgstr "Ablaufdatum"
#: templates/hosting/payment.html:106
#: templates/hosting/payment.html:109
msgid "CV CODE"
msgstr "CV Code"
@ -425,13 +430,13 @@ msgstr "Schlüssel hinzufügen"
msgid "Created at"
msgstr "Erstellt am"
#: templates/hosting/user_keys.html:42
#: templates/hosting/user_keys.html:43
#, fuzzy
#| msgid "Delete"
msgid "Delete Key"
msgstr "Löschen"
#: templates/hosting/user_keys.html:55
#: templates/hosting/user_keys.html:56
#, fuzzy
#| msgid "Do You want do delete your order?"
msgid "Do You want to delete this key?"
@ -453,10 +458,6 @@ msgstr "Ip nicht zugewiesen"
msgid "Disk"
msgstr "Festplatte"
#: templates/hosting/virtual_machine_detail.html:98
msgid "Configuration"
msgstr "Konfiguration"
#: templates/hosting/virtual_machine_detail.html:108
msgid "Current pricing"
msgstr "Aktueller Preis"

View file

@ -22,6 +22,9 @@
<hr>
<p><b>{%trans "Disk space"%}</b> <span
class="pull-right">{{request.session.specs.disk_size|floatformat}} GB</span></p>
<hr>
<p><b>{%trans "Configuration"%}</b> <span
class="pull-right">{{request.session.template.name}}</span></p>
<hr>
<h4>Total<p
class="pull-right"><b>{{request.session.specs.price }} CHF</b></p></h4>