diff --git a/Changelog b/Changelog index 8defa619..11d2443f 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,7 @@ +Next Release + * #3785: [hosting] update 'my bills' page design + * Bugfix: [hosting] card details input form alignment fix + * #3823: [hosting] favicon link fixed 1.2.4: 2017-10-02 * #3780: [hosting] Store VM details locally * #3764: [hosting] Show cancelled VMs' invoices diff --git a/datacenterlight/locale/de/LC_MESSAGES/django.po b/datacenterlight/locale/de/LC_MESSAGES/django.po index a797eeab..a62dad8a 100644 --- a/datacenterlight/locale/de/LC_MESSAGES/django.po +++ b/datacenterlight/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: 2017-10-03 18:54+0530\n" +"POT-Creation-Date: 2017-10-03 23:48+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -346,9 +346,6 @@ msgstr "" "Es wird noch keine Bezahlung vorgenommen. Die Bezahlung wird erst ausgelöst, " "nachdem Du die Bestellung auf der nächsten Seite bestätigt hast." -msgid "Submit" -msgstr "Absenden" - msgid "Card Number" msgstr "Kreditkartennummer" @@ -510,6 +507,9 @@ msgstr "" #~ msgid "Some problem encountered. Please try again later." #~ msgstr "Ein Problem ist aufgetreten. Bitte versuche es später noch einmal." +#~ msgid "Submit" +#~ msgstr "Absenden" + #~ msgid "Date" #~ msgstr "Datum" diff --git a/datacenterlight/templates/datacenterlight/landing_payment.html b/datacenterlight/templates/datacenterlight/landing_payment.html index c7ada779..fa638d77 100644 --- a/datacenterlight/templates/datacenterlight/landing_payment.html +++ b/datacenterlight/templates/datacenterlight/landing_payment.html @@ -104,9 +104,11 @@
{% for message in messages %} {% if 'failed_payment' or 'make_charge_error' in message.tags %} -
  • -

    {{ message|safe }}

    -
+
    +
  • +

    {{ message|safe }}

    +
  • +
{% endif %} {% endfor %} {% for error in form.non_field_errors %} @@ -116,7 +118,7 @@ {% endfor %}
- +
{% else %}
diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index e422a166..960fb842 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: 2017-10-03 18:54+0530\n" +"POT-Creation-Date: 2017-10-03 23:48+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -413,15 +413,10 @@ msgid "Billing Address" msgstr "Rechnungsadresse" msgid "" -"\n" -" Please fill in your credit card information " -"below. We are using Stripe for payment and do not store\n" -" your information in our database.\n" -" " +"Please fill in your credit card information below. We are using Stripe for payment and do not " +"store your information in our database." msgstr "" -"\n" "Bitte füll Deine Kreditkarteninformationen unten aus. Wir nutzen Stripe für die Bezahlung und " "speichern keine Informationen in unserer Datenbank." @@ -433,8 +428,8 @@ msgstr "" "Es wird noch keine Bezahlung vorgenommen. Die Bezahlung wird erst ausgelöst, " "nachdem Du die Bestellung auf der nächsten Seite bestätigt hast." -msgid "Submit" -msgstr "Absenden" +msgid "SUBMIT" +msgstr "ABSENDEN" msgid "Card Number" msgstr "Kreditkartennummer" @@ -454,6 +449,9 @@ msgstr "Weiter" msgid "Enter your credit card number" msgstr "Deine Kreditkartennummer" +msgid "Submit" +msgstr "Absenden" + msgid "Reset your password" msgstr "Passwort zurücksetzen" diff --git a/hosting/static/hosting/css/payment.css b/hosting/static/hosting/css/payment.css index b1b0460d..c6cc80a9 100644 --- a/hosting/static/hosting/css/payment.css +++ b/hosting/static/hosting/css/payment.css @@ -47,7 +47,7 @@ font-weight: 600; } .dcl-payment-section p { - padding: 0 5px; + /*padding: 0 5px;*/ font-weight: 400; } .dcl-payment-section .card-warning-content { @@ -77,7 +77,6 @@ .dcl-payment-user h4 { font-weight: 600; - padding-left: 5px; font-size: 17px; } @@ -118,4 +117,4 @@ top: 20px; bottom: 20px; } -} \ No newline at end of file +} diff --git a/hosting/static/hosting/css/virtual-machine.css b/hosting/static/hosting/css/virtual-machine.css index a14abc31..3329d6fe 100644 --- a/hosting/static/hosting/css/virtual-machine.css +++ b/hosting/static/hosting/css/virtual-machine.css @@ -618,9 +618,8 @@ left: 8px; } .table-switch .last-td { - position: absolute; - bottom: 13px; - right: 0; + padding-top: 12px; + text-align: right; } .table-switch tbody tr .xs-td-inline { text-align: right; diff --git a/hosting/templates/hosting/base_short.html b/hosting/templates/hosting/base_short.html index 5cf0953c..07d3a54b 100644 --- a/hosting/templates/hosting/base_short.html +++ b/hosting/templates/hosting/base_short.html @@ -33,7 +33,7 @@ - + diff --git a/hosting/templates/hosting/orders.html b/hosting/templates/hosting/orders.html index 7ec3e91b..d747979d 100644 --- a/hosting/templates/hosting/orders.html +++ b/hosting/templates/hosting/orders.html @@ -1,6 +1,6 @@ {% extends "hosting/base_short.html" %} {% load staticfiles bootstrap3 %} -{% load i18n %} +{% load i18n l10n %} {% block content %}
@@ -22,7 +22,6 @@ {% trans "Order Nr." %} {% trans "Date" %} {% trans "Amount" %} - {% trans "Status" %} @@ -30,15 +29,8 @@ {% for order in orders %} {{ order.id }} - {{ order.created_at | date:"M d, Y" }} - {{ order.price }} - - {% if order.approved %} - {% trans "Approved" %} - {% else %} - {% trans "Declined" %} - {% endif %} - + {{ order.created_at | date:"M d, Y H:i" }} + {{ order.price|unlocalize }} {% trans 'See Invoice' %} diff --git a/hosting/templates/hosting/payment.html b/hosting/templates/hosting/payment.html index 9b1c9e45..e9d6476f 100644 --- a/hosting/templates/hosting/payment.html +++ b/hosting/templates/hosting/payment.html @@ -69,83 +69,67 @@

{%trans "Credit Card"%}


-
-

- {% blocktrans %} - Please fill in your credit card information below. We are using Stripe for payment and do not store - your information in our database. - {% endblocktrans %} -

-
-
+

+ {% blocktrans %}Please fill in your credit card information below. We are using Stripe for payment and do not store your information in our database.{% endblocktrans %} +

{% if credit_card_data.last4 %} - -
Credit Card
-
Last 4: *****{{credit_card_data.last4}}
-
Type: {{credit_card_data.cc_brand}}
- - -
-
- {% if not messages and not form.non_field_errors %} -

- {% trans "You are not making any payment yet. After submitting your card information, you will be taken to the Confirm Order Page." %} -

+
+
Credit Card
+
Last 4: *****{{credit_card_data.last4}}
+
Type: {{credit_card_data.cc_brand}}
+ +
+ {% if not messages and not form.non_field_errors %} +

+ {% trans "You are not making any payment yet. After submitting your card information, you will be taken to the Confirm Order Page." %} +

+ {% endif %} +
+ {% for message in messages %} + {% if 'failed_payment' or 'make_charge_error' in message.tags %} +
    +
  • +

    {{ message|safe }}

    +
  • +
{% endif %} -
- {% for message in messages %} - {% if 'failed_payment' or 'make_charge_error' in message.tags %} -
  • -

    {{ message|safe }}

    -
- {% endif %} - {% endfor %} - {% for error in form.non_field_errors %} -

- {{ error|escape }} -

- {% endfor %} + {% endfor %} + {% for error in form.non_field_errors %} +

+ {{ error|escape }} +

+ {% endfor %} +
+
+ +
+ {% else %} +
+ +
+
+
+ +
+
+
+
+ +
+
+
+ +
+
+
+
+ + +
-
-
- -
-
-
- - {% else %} - - -
-
-
- -
-
-
- -
-
-
-
- -
-
-
- - -
-
-
- -
-
+
{% if not messages and not form.non_field_errors %}

{% trans "You are not making any payment yet. After submitting your card information, you will be taken to the Confirm Order Page." %} @@ -154,9 +138,11 @@

{% for message in messages %} {% if 'failed_payment' or 'make_charge_error' in message.tags %} -
  • -

    {{ message|safe }}

    -
+
    +
  • +

    {{ message|safe }}

    +
  • +
{% endif %} {% endfor %} @@ -166,22 +152,15 @@

{% endfor %}
-
-
-
- +
+
-
-
diff --git a/hosting/urls.py b/hosting/urls.py index f40e803a..b00a199c 100644 --- a/hosting/urls.py +++ b/hosting/urls.py @@ -10,6 +10,7 @@ from .views import ( HostingBillDetailView, SSHKeyDeleteView, SSHKeyCreateView, SSHKeyListView, SSHKeyChoiceView, DashboardView, SettingsView, ResendActivationEmailView) + urlpatterns = [ url(r'index/?$', IndexView.as_view(), name='index'), url(r'django/?$', DjangoHostingView.as_view(), name='djangohosting'), diff --git a/hosting/views.py b/hosting/views.py index a46325e2..007aa3fb 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -632,7 +632,6 @@ class PaymentVMView(LoginRequiredMixin, FormView): def get(self, request, *args, **kwargs): if 'next' in request.session: del request.session['next'] - return self.render_to_response(self.get_context_data()) def post(self, request, *args, **kwargs): @@ -655,7 +654,7 @@ class PaymentVMView(LoginRequiredMixin, FormView): request.session['billing_address_data'] = billing_address_data request.session['token'] = token - request.session['customer'] = customer.id + request.session['customer'] = customer.stripe_id return HttpResponseRedirect("{url}?{query_params}".format( url=reverse('hosting:order-confirmation'), query_params='page=payment')) @@ -680,16 +679,12 @@ class OrdersHostingDetailView(LoginRequiredMixin, context = super(DetailView, self).get_context_data(**kwargs) obj = self.get_object() owner = self.request.user - stripe_customer_id = self.request.session.get('customer') - customer = StripeCustomer.objects.filter(id=stripe_customer_id).first() + stripe_api_cus_id = self.request.session.get('customer') stripe_utils = StripeUtils() - if customer: - card_details = stripe_utils.get_card_details( - customer.stripe_id, - self.request.session.get('token') - ) - else: - card_details = {} + card_details = stripe_utils.get_card_details( + stripe_api_cus_id, + self.request.session.get('token') + ) if self.request.GET.get('page') == 'payment': context['page_header_text'] = _('Confirm Order')