From c87e2cd36b334efe81640344d606c9dbadd55776 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Thu, 24 Aug 2017 20:28:02 +0530 Subject: [PATCH 01/16] hosting settings url, view and template added --- hosting/urls.py | 4 +++- hosting/views.py | 20 ++++++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/hosting/urls.py b/hosting/urls.py index 23709904..90e32c14 100644 --- a/hosting/urls.py +++ b/hosting/urls.py @@ -7,7 +7,8 @@ from .views import DjangoHostingView, RailsHostingView, PaymentVMView,\ VirtualMachineView, OrdersHostingDeleteView, NotificationsView, \ MarkAsReadNotificationView, PasswordResetView, PasswordResetConfirmView, HostingPricingView,\ CreateVirtualMachinesView, HostingBillListView, HostingBillDetailView, \ - SSHKeyDeleteView, SSHKeyCreateView, SSHKeyListView, SSHKeyChoiceView + SSHKeyDeleteView, SSHKeyCreateView, SSHKeyListView, SSHKeyChoiceView, \ + SettingsView urlpatterns = [ url(r'index/?$', IndexView.as_view(), name='index'), @@ -16,6 +17,7 @@ urlpatterns = [ url(r'rails/?$', RailsHostingView.as_view(), name='railshosting'), url(r'pricing/?$', HostingPricingView.as_view(), name='pricing'), url(r'payment/?$', PaymentVMView.as_view(), name='payment'), + url(r'settings/?$', SettingsView.as_view(), name='settings'), url(r'orders/?$', OrdersHostingListView.as_view(), name='orders'), url(r'orders/(?P\d+)/?$', OrdersHostingDetailView.as_view(), name='orders'), url(r'bills/?$', HostingBillListView.as_view(), name='bills'), diff --git a/hosting/views.py b/hosting/views.py index 0747f134..dba74c8f 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -40,6 +40,20 @@ CONNECTION_ERROR = "Your VMs cannot be displayed at the moment due to a backend connection error. please try again in a few minutes." +class SettingsView(View): + template_name = "hosting/settings.html" + + def get_context_data(self, **kwargs): + context = { + + } + return context + + def get(self, request, *args, **kwargs): + context = self.get_context_data() + return render(request, self.template_name, context) + + class DjangoHostingView(ProcessVMSelectionMixin, View): template_name = "hosting/django.html" @@ -558,7 +572,8 @@ class PaymentVMView(LoginRequiredMixin, FormView): token=token) if not customer: msg = _("Invalid credit card") - messages.add_message(self.request, messages.ERROR, msg, extra_tags='make_charge_error') + messages.add_message( + self.request, messages.ERROR, msg, extra_tags='make_charge_error') return HttpResponseRedirect(reverse('hosting:payment') + '#payment_error') # Create Billing Address @@ -572,7 +587,8 @@ class PaymentVMView(LoginRequiredMixin, FormView): # Check if the payment was approved if not charge_response.get('response_object'): msg = charge_response.get('error') - messages.add_message(self.request, messages.ERROR, msg, extra_tags='make_charge_error') + messages.add_message( + self.request, messages.ERROR, msg, extra_tags='make_charge_error') return HttpResponseRedirect(reverse('hosting:payment') + '#payment_error') charge = charge_response.get('response_object') From daa50d467238fcba442d17d6bf7525e3f9a3a36a Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Thu, 24 Aug 2017 22:11:15 +0530 Subject: [PATCH 02/16] settings page design --- hosting/static/hosting/css/commons.css | 28 +++++ hosting/templates/hosting/settings.html | 151 ++++++++++++++++++++++++ hosting/views.py | 60 +++++++--- 3 files changed, 225 insertions(+), 14 deletions(-) create mode 100644 hosting/templates/hosting/settings.html diff --git a/hosting/static/hosting/css/commons.css b/hosting/static/hosting/css/commons.css index 1ebae4b4..e8ba9ceb 100644 --- a/hosting/static/hosting/css/commons.css +++ b/hosting/static/hosting/css/commons.css @@ -6,6 +6,11 @@ max-width: 768px; } +.dashboard-container.wide { + padding-top: 90px; + max-width: 980px; +} + .content-dashboard{ min-height: calc(100vh - 70px); width: 80%; @@ -233,4 +238,27 @@ -webkit-transform: translate(-50%,-50%); -ms-transform: translate(-50%,-50%); transform: translate(-50%,-50%); +} + +.settings-container { + padding: 8px; +} + +.settings-container h4 { + margin-bottom: 15px; + color: #999; +} + +.settings-container .card-expiry-element, +.settings-container .card-cvc-element { + padding: 0 15px; +} + +.settings-container .stripe-payment-btn { + float: none; + position: static; +} + +.credit-card-form { + max-width: 360px; } \ No newline at end of file diff --git a/hosting/templates/hosting/settings.html b/hosting/templates/hosting/settings.html new file mode 100644 index 00000000..c540918e --- /dev/null +++ b/hosting/templates/hosting/settings.html @@ -0,0 +1,151 @@ +{% extends "hosting/base_short.html" %} +{% load staticfiles bootstrap3 i18n %} + +{% block content %} +
+
+

{% trans "My Settings" %}

+
+ +
+
+
+

{%trans "Billing Address"%}

+
+
+ {% for field in form %} + {% csrf_token %} + {% bootstrap_field field show_label=False type='fields'%} + {% endfor %} +
+
+
+

{%trans "Credit Card"%}

+
+
+
+ {% 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 %} +

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

+ {% 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 %} +
+
+
+
+ +
+
+
+ {% endif %} +

{% trans "Add new Card" %}

+
+ +
+
+ +
+
+
+
+ +
+
+
+ +
+
+
+
+ + +
+
+ +
+ {% if not messages and not form.non_field_errors %} +

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

+ {% 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 %} +
+
+
+ +
+
+
+ +
+

+
+
+
+
+
+
+
+
+ + + {% if stripe_key %} + {% get_current_language as LANGUAGE_CODE %} + + {%endif%} + + {% if credit_card_data.last4 and credit_card_data.cc_brand %} + + {%endif%} +{%endblock%} diff --git a/hosting/views.py b/hosting/views.py index dba74c8f..a860dfc9 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -40,20 +40,6 @@ CONNECTION_ERROR = "Your VMs cannot be displayed at the moment due to a backend connection error. please try again in a few minutes." -class SettingsView(View): - template_name = "hosting/settings.html" - - def get_context_data(self, **kwargs): - context = { - - } - return context - - def get(self, request, *args, **kwargs): - context = self.get_context_data() - return render(request, self.template_name, context) - - class DjangoHostingView(ProcessVMSelectionMixin, View): template_name = "hosting/django.html" @@ -489,6 +475,52 @@ class SSHKeyCreateView(LoginRequiredMixin, FormView): return self.form_invalid(form) +class SettingsView(LoginRequiredMixin, FormView): + template_name = "hosting/settings.html" + login_url = reverse_lazy('hosting:login') + form_class = BillingAddressForm + + def get_form_kwargs(self): + current_billing_address = self.request.user.billing_addresses.first() + form_kwargs = super(SettingsView, self).get_form_kwargs() + if not current_billing_address: + return form_kwargs + + form_kwargs.update({ + 'initial': { + 'cardholder_name': current_billing_address.cardholder_name, + 'street_address': current_billing_address.street_address, + 'city': current_billing_address.city, + 'postal_code': current_billing_address.postal_code, + 'country': current_billing_address.country, + } + }) + return form_kwargs + + def get_context_data(self, **kwargs): + context = super(SettingsView, self).get_context_data(**kwargs) + # Get user + user = self.request.user + + # Get user last order + last_hosting_order = HostingOrder.objects.filter( + customer__user=user).last() + + # If user has already an hosting order, get the credit card data from + # it + if last_hosting_order: + credit_card_data = last_hosting_order.get_cc_data() + context.update({ + 'credit_card_data': credit_card_data if credit_card_data else None, + }) + + context.update({ + 'stripe_key': settings.STRIPE_API_PUBLIC_KEY + }) + + return context + + class PaymentVMView(LoginRequiredMixin, FormView): template_name = 'hosting/payment.html' login_url = reverse_lazy('hosting:login') From 49cc441fa027661c20ba9c98ac71fa8ad8c1795e Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Tue, 29 Aug 2017 14:53:03 +0530 Subject: [PATCH 03/16] style changes --- hosting/locale/de/LC_MESSAGES/django.po | 21 ++++- hosting/static/hosting/css/commons.css | 12 +++ hosting/templates/hosting/settings.html | 113 ++++++++++++------------ 3 files changed, 89 insertions(+), 57 deletions(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index ddb853da..36a9cc09 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-08-24 11:12+0000\n" +"POT-Creation-Date: 2017-08-29 14:38+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -330,6 +330,25 @@ msgstr "Deine Kreditkartennummer" msgid "Reset your password" msgstr "Passwort zurücksetzen" +#, fuzzy +#| msgid "VM Settings" +msgid "My Settings" +msgstr "VM Einstellungen" + +msgid "Last" +msgstr "" + +#, fuzzy +#| msgid "Card Type" +msgid "Type" +msgstr "Kartentyp" + +msgid "You are not making any payment here." +msgstr "" + +msgid "Add new Card" +msgstr "" + msgid "Add your public SSH key" msgstr "Füge deinen öffentlichen SSH-Key hinzu" diff --git a/hosting/static/hosting/css/commons.css b/hosting/static/hosting/css/commons.css index e8ba9ceb..4710b294 100644 --- a/hosting/static/hosting/css/commons.css +++ b/hosting/static/hosting/css/commons.css @@ -253,12 +253,24 @@ .settings-container .card-cvc-element { padding: 0 15px; } +.settings-container .card-cvc-element .my-input, +.settings-container .card-cvc-element label { + padding-left: 0; +} .settings-container .stripe-payment-btn { float: none; position: static; } +.settings-container h3 { + font-weight: bold; +} + +.settings-container hr { + margin-top: 15px; +} + .credit-card-form { max-width: 360px; } \ No newline at end of file diff --git a/hosting/templates/hosting/settings.html b/hosting/templates/hosting/settings.html index c540918e..f044b4b6 100644 --- a/hosting/templates/hosting/settings.html +++ b/hosting/templates/hosting/settings.html @@ -26,16 +26,16 @@
{% if credit_card_data.last4 %}
-
Credit Card
-
Last 4: *****{{credit_card_data.last4}}
-
Type: {{credit_card_data.cc_brand}}
+
{% trans "Credit Card" %}
+
{% trans "Last" %} 4: *****{{credit_card_data.last4}}
+
{% trans "Type" %}: {{credit_card_data.cc_brand}}
{% if not messages and not form.non_field_errors %}

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

{% endif %}
@@ -62,64 +62,65 @@
- {% endif %} -

{% trans "Add new Card" %}

-
- -
-
- -
-
-
-
- -
+ {% else %} +

{% trans "Add new Card" %}

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

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

- {% 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 %}
-
-
- + +
+ {% if not messages and not form.non_field_errors %} +

+ {% blocktrans %}You are not making any payment here.{% endblocktrans %} +

+ {% 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 %} +
+
+
+ +
-
-
-

-
- +
+

+
+ + {% endif %}
From ce1d346bc112c71780129078e5502138a22e8f7a Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Tue, 29 Aug 2017 17:42:35 +0530 Subject: [PATCH 04/16] billing form in settings page --- hosting/locale/de/LC_MESSAGES/django.po | 7 ++--- hosting/static/hosting/css/commons.css | 14 +++++++++ hosting/templates/hosting/settings.html | 41 +++++-------------------- hosting/views.py | 40 ++++++++++++++---------- utils/forms.py | 1 + 5 files changed, 48 insertions(+), 55 deletions(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index 36a9cc09..e2bba040 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-08-29 14:38+0530\n" +"POT-Creation-Date: 2017-08-29 17:41+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -343,10 +343,7 @@ msgstr "" msgid "Type" msgstr "Kartentyp" -msgid "You are not making any payment here." -msgstr "" - -msgid "Add new Card" +msgid "No Cards found for your account." msgstr "" msgid "Add your public SSH key" diff --git a/hosting/static/hosting/css/commons.css b/hosting/static/hosting/css/commons.css index 4710b294..dd81a423 100644 --- a/hosting/static/hosting/css/commons.css +++ b/hosting/static/hosting/css/commons.css @@ -271,6 +271,20 @@ margin-top: 15px; } +.settings-container .credit-card-details { + padding-bottom: 15px; + border-bottom: 1px solid #eee; +} + +.settings-container .credit-card-details h5 { + font-weight: bold; + font-size: 16px; +} + .credit-card-form { max-width: 360px; +} + +.btn-wide { + min-width: 120px; } \ No newline at end of file diff --git a/hosting/templates/hosting/settings.html b/hosting/templates/hosting/settings.html index f044b4b6..130234db 100644 --- a/hosting/templates/hosting/settings.html +++ b/hosting/templates/hosting/settings.html @@ -17,6 +17,9 @@ {% csrf_token %} {% bootstrap_field field show_label=False type='fields'%} {% endfor %} +
+ +
@@ -25,45 +28,14 @@
{% if credit_card_data.last4 %} -
+
{% trans "Credit Card" %}
{% trans "Last" %} 4: *****{{credit_card_data.last4}}
{% trans "Type" %}: {{credit_card_data.cc_brand}}
- - -
-
- {% if not messages and not form.non_field_errors %} -

- {% blocktrans %}You are not making any payment here.{% endblocktrans %} -

- {% 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 %} -
-
-
-
- -
-
{% else %} -

{% trans "Add new Card" %}

+

{% trans "No Cards found for your account." %}

+ {% comment %}
@@ -120,6 +92,7 @@

+ {% endcomment %} {% endif %}
diff --git a/hosting/views.py b/hosting/views.py index a860dfc9..9853078b 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -480,22 +480,14 @@ class SettingsView(LoginRequiredMixin, FormView): login_url = reverse_lazy('hosting:login') form_class = BillingAddressForm - def get_form_kwargs(self): - current_billing_address = self.request.user.billing_addresses.first() - form_kwargs = super(SettingsView, self).get_form_kwargs() - if not current_billing_address: - return form_kwargs - - form_kwargs.update({ - 'initial': { - 'cardholder_name': current_billing_address.cardholder_name, - 'street_address': current_billing_address.street_address, - 'city': current_billing_address.city, - 'postal_code': current_billing_address.postal_code, - 'country': current_billing_address.country, - } - }) - return form_kwargs + def get_form(self, form_class): + """ + Check if the user already saved contact details. If so, then show + the form populated with those details, to let user change them. + """ + return form_class( + instance=self.request.user.billing_addresses.first(), + **self.get_form_kwargs()) def get_context_data(self, **kwargs): context = super(SettingsView, self).get_context_data(**kwargs) @@ -520,6 +512,22 @@ class SettingsView(LoginRequiredMixin, FormView): return context + def post(self, request, *args, **kwargs): + form = self.get_form() + if form.is_valid(): + billing_address_data = form.cleaned_data + billing_address_data.update({ + 'user': self.request.user.id + }) + billing_address_user_form = UserBillingAddressForm( + instance=self.request.user.billing_addresses.first(), + data=billing_address_data) + billing_address_user_form.save() + return self.render_to_response(self.get_context_data()) + else: + billing_address_data = form.cleaned_data + return self.form_invalid(form) + class PaymentVMView(LoginRequiredMixin, FormView): template_name = 'hosting/payment.html' diff --git a/utils/forms.py b/utils/forms.py index c521e3ba..7d9d20c0 100644 --- a/utils/forms.py +++ b/utils/forms.py @@ -117,6 +117,7 @@ class UserBillingAddressForm(forms.ModelForm): class Meta: model = UserBillingAddress + # cardholder name not saved fields = ['street_address', 'city', 'postal_code', 'country', 'user'] labels = { 'street_address': _('Street Building'), From 58e7a2aca797250cf6b42937241e1766d359ee09 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Tue, 29 Aug 2017 17:48:41 +0530 Subject: [PATCH 05/16] saving cardholder name --- hosting/locale/de/LC_MESSAGES/django.po | 10 +++------- hosting/templates/hosting/settings.html | 4 +--- utils/forms.py | 17 +++++++++++------ 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index d46b33d1..6056dc15 100644 --- a/hosting/locale/de/LC_MESSAGES/django.po +++ b/hosting/locale/de/LC_MESSAGES/django.po @@ -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" diff --git a/hosting/templates/hosting/settings.html b/hosting/templates/hosting/settings.html index 130234db..11283b94 100644 --- a/hosting/templates/hosting/settings.html +++ b/hosting/templates/hosting/settings.html @@ -34,8 +34,7 @@
{% trans "Type" %}: {{credit_card_data.cc_brand}}
{% else %} -

{% trans "No Cards found for your account." %}

- {% comment %} +

{% trans "Add a new Card." %}

@@ -92,7 +91,6 @@

- {% endcomment %} {% endif %}
diff --git a/utils/forms.py b/utils/forms.py index 7d9d20c0..c3f3b6db 100644 --- a/utils/forms.py +++ b/utils/forms.py @@ -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] From f45ec160913d38525db4daa3dc1077e115b6f26f Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Wed, 30 Aug 2017 19:35:23 +0530 Subject: [PATCH 06/16] added options to card details --- hosting/static/hosting/css/commons.css | 24 ++++++++++++++++++++- hosting/static/hosting/css/landing-page.css | 5 +++-- hosting/static/hosting/img/delete.svg | 7 ++++++ hosting/templates/hosting/settings.html | 17 +++++++++++++-- 4 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 hosting/static/hosting/img/delete.svg diff --git a/hosting/static/hosting/css/commons.css b/hosting/static/hosting/css/commons.css index dd81a423..18edfa22 100644 --- a/hosting/static/hosting/css/commons.css +++ b/hosting/static/hosting/css/commons.css @@ -246,7 +246,8 @@ .settings-container h4 { margin-bottom: 15px; - color: #999; + color: #333; + font-size: 14px; } .settings-container .card-expiry-element, @@ -287,4 +288,25 @@ .btn-wide { min-width: 120px; +} + +.caps_link { + font-weight: 600; + color: #8da4c0; + fill: #8da4c0; + padding: 6px 0; + display: block; +} +.caps_link:hover { + color: #627388; + fill: #627388; + text-decoration: none; +} + +.settings-container .credit-card-details-opt { + padding-top: 15px; +} + +.caps_link .un-icon { + margin-right: 5px; } \ No newline at end of file diff --git a/hosting/static/hosting/css/landing-page.css b/hosting/static/hosting/css/landing-page.css index d1dc657a..07e7490c 100644 --- a/hosting/static/hosting/css/landing-page.css +++ b/hosting/static/hosting/css/landing-page.css @@ -568,6 +568,7 @@ a.unlink:hover { border: 1px solid #a1a1a1; border-radius: 3px; padding: 5px; + margin-bottom: 15px; } .card-warning-error { border: 1px solid #EB4D5C; @@ -725,12 +726,12 @@ a.unlink:hover { @media (min-width: 768px) { .dcl-billing { - padding-right: 50px; + padding-right: 65px; border-right: 1px solid #eee; } .dcl-creditcard { - padding-left: 50px; + padding-left: 65px; } .tbl-tot { diff --git a/hosting/static/hosting/img/delete.svg b/hosting/static/hosting/img/delete.svg new file mode 100644 index 00000000..31991c4a --- /dev/null +++ b/hosting/static/hosting/img/delete.svg @@ -0,0 +1,7 @@ + + + + + Svg Vector Icons : http://www.onlinewebfonts.com/icon + + \ No newline at end of file diff --git a/hosting/templates/hosting/settings.html b/hosting/templates/hosting/settings.html index 11283b94..04a2a017 100644 --- a/hosting/templates/hosting/settings.html +++ b/hosting/templates/hosting/settings.html @@ -27,14 +27,27 @@
- {% if credit_card_data.last4 %} + {% if not credit_card_data.last4 %}
{% trans "Credit Card" %}
{% trans "Last" %} 4: *****{{credit_card_data.last4}}
{% trans "Type" %}: {{credit_card_data.cc_brand}}
+
{% else %} -

{% trans "Add a new Card." %}

+

+ {% trans "Add a new Card." %}
+ {% trans "We are using Stripe for payment and store your information in our database." %} +

From 9ab82298c5e12508abdf417267997c6b0500bf17 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Wed, 30 Aug 2017 20:00:59 +0530 Subject: [PATCH 07/16] edit card, remove settings styles --- hosting/locale/de/LC_MESSAGES/django.po | 57 +++++++++++++++---------- hosting/static/hosting/css/commons.css | 19 +++++++-- hosting/templates/hosting/settings.html | 14 +++--- 3 files changed, 58 insertions(+), 32 deletions(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index 525320a8..726af613 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-08-29 17:41+0530\n" +"POT-Creation-Date: 2017-08-30 19:54+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -323,9 +323,8 @@ msgid "" "You are not making any payment yet. After submitting your card information, " "you will be taken to the Confirm Order Page." 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." +"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" @@ -351,18 +350,46 @@ msgstr "Deine Kreditkartennummer" msgid "Reset your password" msgstr "Passwort zurücksetzen" -msgid "My Settings" -msgstr "Meine Einstellungen" - msgid "Last" msgstr "" msgid "Type" msgstr "Kartentyp" +msgid "REMOVE CARD" +msgstr "" + +msgid "EDIT CARD" +msgstr "" + msgid "Add a new Card." msgstr "" +#, fuzzy +#| 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" +#| " " +msgid "" +"\n" +" Please fill in your credit card " +"information below. We are using Stripe for payment and do not store your information in our " +"database.\n" +" " +msgstr "" +"\n" +"Bitte füll Deine Kreditkarteninformationen unten aus. Wir nutzen Stripe für die Bezahlung und " +"speichern keine Informationen in unserer Datenbank." + +msgid "You are not making any payment here." +msgstr "" + msgid "Add your public SSH key" msgstr "Füge deinen öffentlichen SSH-Key hinzu" @@ -519,22 +546,6 @@ msgid "" "We could not find the requested VM. Please " "contact Data Center Light Support." msgstr "Kontaktiere den Data Center Light Support." -<<<<<<< HEAD - -#~ msgid "" -#~ "\n" -#~ " You are not making any " -#~ "payment yet. After submitting your card\n" -#~ " information, you will be " -#~ "taken to the Confirm Order Page.\n" -#~ " " -#~ msgstr "" -#~ "\n" -#~ "Es wird noch keine Bezahlung vorgenommen. Nach der Eingabe Deiner " -#~ "Kreditkateninformationen wirst du auf die Bestellbestätigungsseite " -#~ "weitergeleitet." -======= ->>>>>>> master #~ msgid "Approved" #~ msgstr "Akzeptiert" diff --git a/hosting/static/hosting/css/commons.css b/hosting/static/hosting/css/commons.css index 18edfa22..2516ed24 100644 --- a/hosting/static/hosting/css/commons.css +++ b/hosting/static/hosting/css/commons.css @@ -290,14 +290,14 @@ min-width: 120px; } -.caps_link { +.caps-link { font-weight: 600; color: #8da4c0; fill: #8da4c0; padding: 6px 0; display: block; } -.caps_link:hover { +.caps-link:hover { color: #627388; fill: #627388; text-decoration: none; @@ -307,6 +307,19 @@ padding-top: 15px; } -.caps_link .un-icon { +.caps-link .svg-img { margin-right: 5px; + height: 12px; + position: relative; + top: 1px; +} + +.settings-container .caps-link { + font-size: 12px; + letter-spacing: 1.1px; +} + +.settings-container .credit-card-details-opt .btn-vm-contact { + font-weight: 600; + padding: 4px 15px; } \ No newline at end of file diff --git a/hosting/templates/hosting/settings.html b/hosting/templates/hosting/settings.html index 04a2a017..e841e534 100644 --- a/hosting/templates/hosting/settings.html +++ b/hosting/templates/hosting/settings.html @@ -27,7 +27,7 @@
- {% if not credit_card_data.last4 %} + {% if credit_card_data.last4 %}
{% trans "Credit Card" %}
{% trans "Last" %} 4: *****{{credit_card_data.last4}}
@@ -35,7 +35,7 @@
{% else %} -

- {% trans "Add a new Card." %}
- {% trans "We are using Stripe for payment and store your information in our database." %} -

+

{% trans "Add a new 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 %} +

From a07922e4d45bf69bb47bf734c24528d412366fea Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Thu, 31 Aug 2017 15:54:01 +0530 Subject: [PATCH 08/16] style and translations fix --- hosting/locale/de/LC_MESSAGES/django.po | 23 +++++------------------ hosting/static/hosting/css/commons.css | 6 +++--- hosting/templates/hosting/base_short.html | 2 ++ hosting/templates/hosting/payment.html | 6 +++++- hosting/templates/hosting/settings.html | 10 ++++++---- hosting/views.py | 3 --- 6 files changed, 21 insertions(+), 29 deletions(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index 726af613..a0f8506a 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-08-30 19:54+0530\n" +"POT-Creation-Date: 2017-08-31 15:51+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -365,30 +365,17 @@ msgstr "" msgid "Add a new Card." msgstr "" -#, fuzzy -#| 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" -#| " " msgid "" -"\n" -" Please fill in your credit card " -"information below. We are using Stripe for payment and do not store 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." msgid "You are not making any payment here." -msgstr "" +msgstr "Es wird noch keine Bezahlung vorgenommen" msgid "Add your public SSH key" msgstr "Füge deinen öffentlichen SSH-Key hinzu" diff --git a/hosting/static/hosting/css/commons.css b/hosting/static/hosting/css/commons.css index 2516ed24..efa47ec6 100644 --- a/hosting/static/hosting/css/commons.css +++ b/hosting/static/hosting/css/commons.css @@ -294,7 +294,7 @@ font-weight: 600; color: #8da4c0; fill: #8da4c0; - padding: 6px 0; + padding: 8px 0; display: block; } .caps-link:hover { @@ -309,13 +309,13 @@ .caps-link .svg-img { margin-right: 5px; - height: 12px; + height: 11px; position: relative; top: 1px; } .settings-container .caps-link { - font-size: 12px; + font-size: 11px; letter-spacing: 1.1px; } diff --git a/hosting/templates/hosting/base_short.html b/hosting/templates/hosting/base_short.html index 4dcf5074..18d8bc30 100644 --- a/hosting/templates/hosting/base_short.html +++ b/hosting/templates/hosting/base_short.html @@ -25,6 +25,8 @@ + {% block css_extra %} + {% endblock css_extra %} diff --git a/hosting/templates/hosting/payment.html b/hosting/templates/hosting/payment.html index 543234f0..5d4c66e3 100644 --- a/hosting/templates/hosting/payment.html +++ b/hosting/templates/hosting/payment.html @@ -1,8 +1,12 @@ {% extends "hosting/base_short.html" %} {% load staticfiles bootstrap3 i18n %} + +{% block css_extra %} + +{% endblock css_extra %} + {% block content %} -
diff --git a/hosting/templates/hosting/settings.html b/hosting/templates/hosting/settings.html index e841e534..fed85c9f 100644 --- a/hosting/templates/hosting/settings.html +++ b/hosting/templates/hosting/settings.html @@ -1,6 +1,10 @@ {% extends "hosting/base_short.html" %} {% load staticfiles bootstrap3 i18n %} +{% block css_extra %} + +{% endblock css_extra %} + {% block content %}
@@ -15,7 +19,7 @@ {% for field in form %} {% csrf_token %} - {% bootstrap_field field show_label=False type='fields'%} + {% bootstrap_field field show_label=False type='fields' bound_css_class='' %} {% endfor %}
@@ -46,9 +50,7 @@ {% else %}

{% trans "Add a new 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 %}

diff --git a/hosting/views.py b/hosting/views.py index 1ee4c73b..47b18d2a 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -505,11 +505,9 @@ class SettingsView(LoginRequiredMixin, FormView): context = super(SettingsView, self).get_context_data(**kwargs) # Get user user = self.request.user - # Get user last order last_hosting_order = HostingOrder.objects.filter( customer__user=user).last() - # If user has already an hosting order, get the credit card data from # it if last_hosting_order: @@ -517,7 +515,6 @@ class SettingsView(LoginRequiredMixin, FormView): context.update({ 'credit_card_data': credit_card_data if credit_card_data else None, }) - context.update({ 'stripe_key': settings.STRIPE_API_PUBLIC_KEY }) From cf673c8f90bd3ab0e1d67c4487897f26a28a1b4d Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Thu, 31 Aug 2017 22:47:47 +0530 Subject: [PATCH 09/16] icon added to my settings page --- hosting/locale/de/LC_MESSAGES/django.po | 4 ++-- hosting/static/hosting/css/virtual-machine.css | 10 ++++++++++ hosting/templates/hosting/settings.html | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index a0f8506a..87bf0493 100644 --- a/hosting/locale/de/LC_MESSAGES/django.po +++ b/hosting/locale/de/LC_MESSAGES/django.po @@ -363,7 +363,7 @@ msgid "EDIT CARD" msgstr "" msgid "Add a new Card." -msgstr "" +msgstr "Neue Kreditkarte hinzufügen." msgid "" "Please fill in your credit card information below. We are using
-

{% trans "My Settings" %}

+

{% trans "My Settings" %}

From eafabf29a7adae66c77231f3f0b2c20605617099 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Thu, 31 Aug 2017 23:05:06 +0530 Subject: [PATCH 10/16] remove card link style bugfix --- hosting/static/hosting/css/commons.css | 5 ++++- hosting/static/hosting/js/initial.js | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hosting/static/hosting/css/commons.css b/hosting/static/hosting/css/commons.css index efa47ec6..98a75d71 100644 --- a/hosting/static/hosting/css/commons.css +++ b/hosting/static/hosting/css/commons.css @@ -297,7 +297,9 @@ padding: 8px 0; display: block; } -.caps-link:hover { +.caps-link:hover, +.caps-link:focus, +.caps-link:active { color: #627388; fill: #627388; text-decoration: none; @@ -312,6 +314,7 @@ height: 11px; position: relative; top: 1px; + vertical-align: baseline; } .settings-container .caps-link { diff --git a/hosting/static/hosting/js/initial.js b/hosting/static/hosting/js/initial.js index 2f00c996..400de367 100644 --- a/hosting/static/hosting/js/initial.js +++ b/hosting/static/hosting/js/initial.js @@ -17,7 +17,6 @@ $( document ).ready(function() { * Replace all SVG images with inline SVG */ $('.svg-img').each(function() { - console.log('asa') var $img = $(this); var imgID = $img.attr('id'); var imgClass = $img.attr('class'); From 31552b886f3c5e8ceeef7f0f111c84916f391a62 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Sat, 2 Sep 2017 00:11:16 +0530 Subject: [PATCH 11/16] btn styles fixed --- hosting/locale/de/LC_MESSAGES/django.po | 5 ++++- hosting/static/hosting/css/commons.css | 11 ++++++----- hosting/templates/hosting/settings.html | 6 +++--- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index 35687e29..d114b029 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-08-31 23:46+0530\n" +"POT-Creation-Date: 2017-09-02 00:05+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -347,6 +347,9 @@ msgstr "Deine Kreditkartennummer" msgid "Reset your password" msgstr "Passwort zurücksetzen" +msgid "UPDATE" +msgstr "" + msgid "Last" msgstr "" diff --git a/hosting/static/hosting/css/commons.css b/hosting/static/hosting/css/commons.css index b171764d..8304a846 100644 --- a/hosting/static/hosting/css/commons.css +++ b/hosting/static/hosting/css/commons.css @@ -293,7 +293,7 @@ } .btn-wide { - min-width: 120px; + min-width: 100px; } .caps-link { @@ -317,18 +317,19 @@ .caps-link .svg-img { margin-right: 5px; - height: 11px; + height: 12px; position: relative; top: 1px; vertical-align: baseline; } .settings-container .caps-link { - font-size: 11px; + font-size: 13px; letter-spacing: 1.1px; } -.settings-container .credit-card-details-opt .btn-vm-contact { +.settings-container .btn-vm-contact { font-weight: 600; - padding: 4px 15px; + font-size: 13px; + /* padding: 4px 15px; */ } \ No newline at end of file diff --git a/hosting/templates/hosting/settings.html b/hosting/templates/hosting/settings.html index 83bff422..87e52869 100644 --- a/hosting/templates/hosting/settings.html +++ b/hosting/templates/hosting/settings.html @@ -22,7 +22,7 @@ {% bootstrap_field field show_label=False type='fields' bound_css_class='' %} {% endfor %}
- +
@@ -31,7 +31,7 @@
From 4a3ab29bd571d53592d59876e4e2969016f2b3c3 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Sat, 2 Sep 2017 00:14:12 +0530 Subject: [PATCH 12/16] minor fix --- hosting/templates/hosting/settings.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosting/templates/hosting/settings.html b/hosting/templates/hosting/settings.html index 87e52869..e5c22e2b 100644 --- a/hosting/templates/hosting/settings.html +++ b/hosting/templates/hosting/settings.html @@ -31,7 +31,7 @@
- {% if not credit_card_data.last4 %} + {% if credit_card_data.last4 %}
{% trans "Credit Card" %}
{% trans "Last" %} 4: *****{{credit_card_data.last4}}
From 765432acbc50ceec16e228b222ffefa79f9d105c Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Sat, 2 Sep 2017 00:17:01 +0530 Subject: [PATCH 13/16] minor fix --- hosting/static/hosting/css/commons.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosting/static/hosting/css/commons.css b/hosting/static/hosting/css/commons.css index 8304a846..aefb20ea 100644 --- a/hosting/static/hosting/css/commons.css +++ b/hosting/static/hosting/css/commons.css @@ -317,7 +317,7 @@ .caps-link .svg-img { margin-right: 5px; - height: 12px; + height: 13px; position: relative; top: 1px; vertical-align: baseline; From f0bca697b14f7f75f253d0ead755d1d15e4464b3 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Sat, 2 Sep 2017 03:20:32 +0530 Subject: [PATCH 14/16] fix --- datacenterlight/locale/de/LC_MESSAGES/django.po | 4 ++-- datacenterlight/templates/datacenterlight/order_detail.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/datacenterlight/locale/de/LC_MESSAGES/django.po b/datacenterlight/locale/de/LC_MESSAGES/django.po index 80d88c04..08781bf1 100644 --- a/datacenterlight/locale/de/LC_MESSAGES/django.po +++ b/datacenterlight/locale/de/LC_MESSAGES/django.po @@ -344,8 +344,8 @@ msgstr "Rechnungsadresse" msgid "Payment Method:" msgstr "Bezahlmethode" -msgid "ending" -msgstr "endend" +msgid "ending in" +msgstr "endend in" msgid "Order summary" msgstr "Bestellungsübersicht" diff --git a/datacenterlight/templates/datacenterlight/order_detail.html b/datacenterlight/templates/datacenterlight/order_detail.html index b55953bf..085b0c37 100644 --- a/datacenterlight/templates/datacenterlight/order_detail.html +++ b/datacenterlight/templates/datacenterlight/order_detail.html @@ -50,7 +50,7 @@
{% trans "Payment Method:"%}
- {{cc_brand}} {% trans "ending" %} **** {{cc_last4}}
+ {{cc_brand}} {% trans "ending in" %} **** {{cc_last4}}
{{request.session.user.email}}
From 5d3f355c361f954cc9cd8f7089d344e12c6a6ee4 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Tue, 5 Sep 2017 01:51:53 +0530 Subject: [PATCH 15/16] no card added --- hosting/locale/de/LC_MESSAGES/django.po | 22 +++++++------ hosting/static/hosting/css/commons.css | 19 +++++++++++ hosting/templates/hosting/dashboard.html | 2 +- hosting/templates/hosting/settings.html | 41 ++++++++++++++---------- 4 files changed, 56 insertions(+), 28 deletions(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index a65c8bea..9ba7f22b 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-09-02 03:08+0530\n" +"POT-Creation-Date: 2017-09-05 00:59+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -371,21 +371,17 @@ msgstr "KARTE ENTFERNEN" msgid "EDIT CARD" msgstr "BEARBEITEN" -msgid "Add a new Card." -msgstr "Neue Kreditkarte hinzufügen." +msgid "No Credit Cards Added" +msgstr "Es wurde keine Kreditkarte hinzugefügt" msgid "" -"Please fill in your credit card information below. We are using Stripe for payment and do not " -"store your information in our database." +"We are using Stripe for payment and do " +"not store your information in our database." msgstr "" -"Bitte füll Deine Kreditkarteninformationen unten aus. Wir nutzen Stripe für die Bezahlung und " "speichern keine Informationen in unserer Datenbank." -msgid "You are not making any payment here." -msgstr "Es wird noch keine Bezahlung vorgenommen" - msgid "Add your public SSH key" msgstr "Füge deinen öffentlichen SSH-Key hinzu" @@ -543,6 +539,12 @@ msgid "" "contact Data Center Light Support." msgstr "Kontaktiere den Data Center Light Support." +#~ msgid "Add a new Card." +#~ msgstr "Neue Kreditkarte hinzufügen." + +#~ msgid "You are not making any payment here." +#~ msgstr "Es wird noch keine Bezahlung vorgenommen" + #~ msgid "Your SSH Keys" #~ msgstr "Deine SSH Keys" diff --git a/hosting/static/hosting/css/commons.css b/hosting/static/hosting/css/commons.css index 5998b259..8c8a9470 100644 --- a/hosting/static/hosting/css/commons.css +++ b/hosting/static/hosting/css/commons.css @@ -336,4 +336,23 @@ .btn-wide { min-width: 100px; +} + +.no-cards { + text-align: center; + color: #999; + padding: 15px; + background: rgba(0,0,0,0.02); + display: flex; + flex-direction: column; + height: 230px; + justify-content: center; +} + +.no-cards h4 { + font-size: 24px; +} + +.no-cards a { + color: #7ca3d0; } \ No newline at end of file diff --git a/hosting/templates/hosting/dashboard.html b/hosting/templates/hosting/dashboard.html index 4d41874e..d12f75ee 100644 --- a/hosting/templates/hosting/dashboard.html +++ b/hosting/templates/hosting/dashboard.html @@ -32,7 +32,7 @@
- +

{% trans "My Settings" %}

diff --git a/hosting/templates/hosting/settings.html b/hosting/templates/hosting/settings.html index e5c22e2b..3729ac80 100644 --- a/hosting/templates/hosting/settings.html +++ b/hosting/templates/hosting/settings.html @@ -30,24 +30,29 @@

{%trans "Credit Card"%}


-
- {% if credit_card_data.last4 %} -
-
{% trans "Credit Card" %}
-
{% trans "Last" %} 4: *****{{credit_card_data.last4}}
-
{% trans "Type" %}: {{credit_card_data.cc_brand}}
-
-
- - + {% if credit_card_data.last4 %} +
+
{% trans "Credit Card" %}
+
{% trans "Last" %} 4: *****{{credit_card_data.last4}}
+
{% trans "Type" %}: {{credit_card_data.cc_brand}}
+ - {% else %} +
+ {% else %} +
+

{% trans "No Credit Cards Added" %}

+

{% blocktrans %}We are using Stripe for payment and do not store your information in our database.{% endblocktrans %}

+
+ + {% comment %}

{% trans "Add a new 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 %} @@ -108,14 +113,15 @@

- {% endif %} -
+ {% endcomment %} + {% endif %}
+ {% comment %} {% if stripe_key %} {% get_current_language as LANGUAGE_CODE %} @@ -137,4 +143,5 @@ })(); {%endif%} + {% endcomment %} {%endblock%} From d13d9bf4416bf95f7f149b045ed8054fbee30413 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Tue, 5 Sep 2017 22:09:18 +0530 Subject: [PATCH 16/16] removed edit option from card details --- hosting/templates/hosting/settings.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hosting/templates/hosting/settings.html b/hosting/templates/hosting/settings.html index 3729ac80..0bafe8e5 100644 --- a/hosting/templates/hosting/settings.html +++ b/hosting/templates/hosting/settings.html @@ -35,6 +35,7 @@
{% trans "Credit Card" %}
{% trans "Last" %} 4: *****{{credit_card_data.last4}}
{% trans "Type" %}: {{credit_card_data.cc_brand}}
+ {% comment %}
@@ -45,6 +46,7 @@
+ {% endcomment %}
{% else %}