From c87e2cd36b334efe81640344d606c9dbadd55776 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Thu, 24 Aug 2017 20:28:02 +0530 Subject: [PATCH 01/38] 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/38] 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/38] 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/38] 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/38] 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/38] 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/38] 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/38] 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/38] 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/38] 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/38] 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/38] 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/38] 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/38] 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/38] 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/38] 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 %}
From c072d382eecc6094fe81fff58c2edacbaece8d62 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Wed, 6 Sep 2017 20:13:30 +0200 Subject: [PATCH 17/38] Added /fb and /li routes to datacenterlight --- datacenterlight/urls.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/datacenterlight/urls.py b/datacenterlight/urls.py index 5c9ffcd7..b2a774ec 100644 --- a/datacenterlight/urls.py +++ b/datacenterlight/urls.py @@ -7,9 +7,11 @@ from .views import IndexView, BetaProgramView, LandingProgramView, \ urlpatterns = [ url(r'^$', IndexView.as_view(), name='index'), - url(r'^t$', IndexView.as_view(), name='index_t'), - url(r'^g$', IndexView.as_view(), name='index_g'), - url(r'^f$', IndexView.as_view(), name='index_f'), + url(r'^t/$', IndexView.as_view(), name='index_t'), + url(r'^g/$', IndexView.as_view(), name='index_g'), + url(r'^f/$', IndexView.as_view(), name='index_f'), + url(r'^fb/$', IndexView.as_view(), name='index_fb'), + url(r'^li/$', IndexView.as_view(), name='index_li'), url(r'^whydatacenterlight/?$', WhyDataCenterLightView.as_view(), name='whydatacenterlight'), url(r'^beta-program/?$', BetaProgramView.as_view(), name='beta'), From 4925146715a573cbb091947715de81483e5446d1 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Wed, 6 Sep 2017 22:05:52 +0200 Subject: [PATCH 18/38] Using one lettered url patterns for social media links --- datacenterlight/urls.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/datacenterlight/urls.py b/datacenterlight/urls.py index b2a774ec..772e691d 100644 --- a/datacenterlight/urls.py +++ b/datacenterlight/urls.py @@ -10,8 +10,7 @@ urlpatterns = [ url(r'^t/$', IndexView.as_view(), name='index_t'), url(r'^g/$', IndexView.as_view(), name='index_g'), url(r'^f/$', IndexView.as_view(), name='index_f'), - url(r'^fb/$', IndexView.as_view(), name='index_fb'), - url(r'^li/$', IndexView.as_view(), name='index_li'), + url(r'^l/$', IndexView.as_view(), name='index_l'), url(r'^whydatacenterlight/?$', WhyDataCenterLightView.as_view(), name='whydatacenterlight'), url(r'^beta-program/?$', BetaProgramView.as_view(), name='beta'), From 7c87b520c1a1c3b9018a78a999b1e5e38e53fc87 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Wed, 6 Sep 2017 22:58:44 +0200 Subject: [PATCH 19/38] Updated Changelog for 1.2.1 --- Changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Changelog b/Changelog index 1f5b70e6..3d6e1589 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,5 @@ +1.2.1: 2017-09-06 + * #3757: [datacenterlight] Added /l route for linkedin 1.1.1: 2017-08-29 * #3709: [datacenterlight] Added faq tos cms template * #3657: [datacenterlight] Added a new contact section at landing From d643e6a5b135e9c12234f00ee5a391fa38694433 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Thu, 7 Sep 2017 20:24:19 +0530 Subject: [PATCH 20/38] login btn on datacenterlight pages --- .../datacenterlight/css/landing-page.css | 25 +++++++++++++++++++ .../datacenterlight/includes/_navbar.html | 7 ++++++ 2 files changed, 32 insertions(+) diff --git a/datacenterlight/static/datacenterlight/css/landing-page.css b/datacenterlight/static/datacenterlight/css/landing-page.css index 9025473e..1507de2c 100755 --- a/datacenterlight/static/datacenterlight/css/landing-page.css +++ b/datacenterlight/static/datacenterlight/css/landing-page.css @@ -175,6 +175,31 @@ button, input, optgroup, select, textarea { .navbar-default .btn-link { box-shadow: none; } +.navbar-default .navbar-nav>li>.topnav_login { +/* color: #179; */ + font-weight: 400; + background: rgba(0,0,0,0.03); + border-radius: 5px; + padding-top: 10px; + padding-bottom: 10px; + top: 5px; +} +.navbar-default .navbar-nav>li>.topnav_login:hover, +.navbar-default .navbar-nav>li>.topnav_login:focus { + background: rgba(0,0,0,0.02); +} +.navbar-transparent .navbar-nav>li>.topnav_login { + background: rgba(0,0,0,0.2); + border-radius: 5px; + padding-top: 10px; + padding-bottom: 10px; + top: 5px; + color: #fff; +} +.navbar-transparent .navbar-nav>li>.topnav_login:hover, +.navbar-transparent .navbar-nav>li>.topnav_login:focus { + background: rgba(0,0,0,0.1); +} .navbar-brand { padding: 10px 15px; diff --git a/datacenterlight/templates/datacenterlight/includes/_navbar.html b/datacenterlight/templates/datacenterlight/includes/_navbar.html index ee791648..b2ae4cb4 100644 --- a/datacenterlight/templates/datacenterlight/includes/_navbar.html +++ b/datacenterlight/templates/datacenterlight/includes/_navbar.html @@ -34,6 +34,13 @@ Deutsch   {% else %} English   {% endif %} + {% if not request.user.is_authenticated %} +
  • + +
  • + {% endif %} + {% if request.path == '/en-us/datacenterlight/' or request.path == '/de/datacenterlight/' %} + {% endif %} {% comment %} {% if not request.user.is_authenticated %}
  • - +
  • {% endif %} {% if request.path == '/en-us/datacenterlight/' or request.path == '/de/datacenterlight/' %} From db891aaa1ef0b590a08a4ff33658fb0a88bac761 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Thu, 7 Sep 2017 21:01:17 +0530 Subject: [PATCH 22/38] hosting navbar changed and consistent with dcl navbar --- .../datacenterlight/includes/_navbar.html | 6 +- dynamicweb/urls.py | 78 +++++++++++-------- hosting/static/hosting/css/commons.css | 2 +- hosting/static/hosting/css/landing-page.css | 8 +- hosting/templates/hosting/base_short.html | 56 +------------ .../hosting/includes/_navbar_user.html | 50 ++++++++++++ hosting/urls.py | 1 + 7 files changed, 108 insertions(+), 93 deletions(-) create mode 100644 hosting/templates/hosting/includes/_navbar_user.html diff --git a/datacenterlight/templates/datacenterlight/includes/_navbar.html b/datacenterlight/templates/datacenterlight/includes/_navbar.html index ee791648..9c17d39e 100644 --- a/datacenterlight/templates/datacenterlight/includes/_navbar.html +++ b/datacenterlight/templates/datacenterlight/includes/_navbar.html @@ -1,10 +1,12 @@ -{% load staticfiles i18n%} {% load custom_tags %} {% get_current_language as LANGUAGE_CODE %} +{% load staticfiles i18n%} +{% load custom_tags %} +{% get_current_language as LANGUAGE_CODE %} + {% include "hosting/includes/_navbar_user.html" %} {% endblock navbar %} diff --git a/hosting/templates/hosting/includes/_navbar_user.html b/hosting/templates/hosting/includes/_navbar_user.html new file mode 100644 index 00000000..cfd313ce --- /dev/null +++ b/hosting/templates/hosting/includes/_navbar_user.html @@ -0,0 +1,50 @@ +{% load staticfiles %} +{% load i18n %} +{% load custom_tags %} + + + + \ No newline at end of file diff --git a/hosting/urls.py b/hosting/urls.py index e6b6fee3..94444107 100644 --- a/hosting/urls.py +++ b/hosting/urls.py @@ -11,6 +11,7 @@ from .views import ( HostingBillDetailView, SSHKeyDeleteView, SSHKeyCreateView, SSHKeyListView, SSHKeyChoiceView, DashboardView) + urlpatterns = [ url(r'index/?$', IndexView.as_view(), name='index'), url(r'django/?$', DjangoHostingView.as_view(), name='djangohosting'), From e26b6ac4169bdcea047ddf983b397ea45776e41f Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Thu, 7 Sep 2017 22:24:03 +0530 Subject: [PATCH 23/38] default page for hosting changed from /hosting/my-virtual-machines -> /hosting/dashboard --- hosting/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosting/views.py b/hosting/views.py index 08f0862e..d864cc4e 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -190,7 +190,7 @@ class IndexView(View): class LoginView(LoginViewMixin): template_name = "hosting/login.html" form_class = HostingUserLoginForm - success_url = reverse_lazy('hosting:virtual_machines') + success_url = reverse_lazy('hosting:dashboard') class SignupView(CreateView): From ac2791a3f1d0477e68a414277380fc8207f94b49 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Thu, 7 Sep 2017 22:44:06 +0530 Subject: [PATCH 24/38] dcl navbar border dadded --- datacenterlight/static/datacenterlight/css/landing-page.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datacenterlight/static/datacenterlight/css/landing-page.css b/datacenterlight/static/datacenterlight/css/landing-page.css index 9025473e..052e55c8 100755 --- a/datacenterlight/static/datacenterlight/css/landing-page.css +++ b/datacenterlight/static/datacenterlight/css/landing-page.css @@ -122,7 +122,7 @@ button, input, optgroup, select, textarea { .navbar-default { background: #fff; - border: none; + /* border: none; */ padding: 5px; } From 73bbe291135c71a897f5a9dd40d4e87572b07372 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Thu, 7 Sep 2017 22:47:56 +0530 Subject: [PATCH 25/38] transparent navbar added to signup validate page --- hosting/templates/hosting/signup_validate.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hosting/templates/hosting/signup_validate.html b/hosting/templates/hosting/signup_validate.html index 3ccbe15b..449064dc 100644 --- a/hosting/templates/hosting/signup_validate.html +++ b/hosting/templates/hosting/signup_validate.html @@ -1,6 +1,10 @@ {% extends "hosting/base_short.html" %} {% load staticfiles bootstrap3 i18n %} +{% block navbar %} + {% include 'hosting/includes/_navbar_transparent.html' %} +{% endblock navbar %} + {% block content %}
    From c8b0e2388dcb4fe8c54c759a67621a91fcd20a2f Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Thu, 7 Sep 2017 23:10:05 +0530 Subject: [PATCH 26/38] login btn special style reset --- .../datacenterlight/css/landing-page.css | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/datacenterlight/static/datacenterlight/css/landing-page.css b/datacenterlight/static/datacenterlight/css/landing-page.css index 1507de2c..9025473e 100755 --- a/datacenterlight/static/datacenterlight/css/landing-page.css +++ b/datacenterlight/static/datacenterlight/css/landing-page.css @@ -175,31 +175,6 @@ button, input, optgroup, select, textarea { .navbar-default .btn-link { box-shadow: none; } -.navbar-default .navbar-nav>li>.topnav_login { -/* color: #179; */ - font-weight: 400; - background: rgba(0,0,0,0.03); - border-radius: 5px; - padding-top: 10px; - padding-bottom: 10px; - top: 5px; -} -.navbar-default .navbar-nav>li>.topnav_login:hover, -.navbar-default .navbar-nav>li>.topnav_login:focus { - background: rgba(0,0,0,0.02); -} -.navbar-transparent .navbar-nav>li>.topnav_login { - background: rgba(0,0,0,0.2); - border-radius: 5px; - padding-top: 10px; - padding-bottom: 10px; - top: 5px; - color: #fff; -} -.navbar-transparent .navbar-nav>li>.topnav_login:hover, -.navbar-transparent .navbar-nav>li>.topnav_login:focus { - background: rgba(0,0,0,0.1); -} .navbar-brand { padding: 10px 15px; From 223606947ac717ff45f40679b60be26eed5256a1 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Thu, 7 Sep 2017 23:48:53 +0530 Subject: [PATCH 27/38] removed icon --- .../templates/datacenterlight/includes/_navbar.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/datacenterlight/templates/datacenterlight/includes/_navbar.html b/datacenterlight/templates/datacenterlight/includes/_navbar.html index ab6a2ffe..b098c916 100644 --- a/datacenterlight/templates/datacenterlight/includes/_navbar.html +++ b/datacenterlight/templates/datacenterlight/includes/_navbar.html @@ -36,7 +36,11 @@ {% if not request.user.is_authenticated %}
  • - + {% trans "Login" %}   +
  • + {% else %} +
  • + {% trans "Dashboard" %}
  • {% endif %} {% if request.path == '/en-us/datacenterlight/' or request.path == '/de/datacenterlight/' %} From b4641e9dfddab42e7de54c7ac20008207c8b751b Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Fri, 8 Sep 2017 00:07:09 +0530 Subject: [PATCH 28/38] font wieght 300 --- hosting/static/hosting/css/landing-page.css | 1 + 1 file changed, 1 insertion(+) diff --git a/hosting/static/hosting/css/landing-page.css b/hosting/static/hosting/css/landing-page.css index 076ec34c..8ae52442 100644 --- a/hosting/static/hosting/css/landing-page.css +++ b/hosting/static/hosting/css/landing-page.css @@ -44,6 +44,7 @@ h6 { .navbar-default .navbar-nav>li>a { padding-top: 20px; padding-bottom: 20px; + font-weight: 300; } .navbar-transparent { From 84d35ea9164256cfb1d919293461a2ce6acfc1c0 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Fri, 8 Sep 2017 00:11:20 +0530 Subject: [PATCH 29/38] padding fixed --- hosting/static/hosting/css/landing-page.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hosting/static/hosting/css/landing-page.css b/hosting/static/hosting/css/landing-page.css index 8ae52442..8881f7fd 100644 --- a/hosting/static/hosting/css/landing-page.css +++ b/hosting/static/hosting/css/landing-page.css @@ -35,6 +35,8 @@ h6 { .navbar-default { background: #fff; /* box-shadow: 0 3px 3px -2px hsla(0,0%,78%,.72); */ + padding-left: 5px; + padding-right: 5px; } .navbar-default .navbar-header { From 4937baa2e0e9aaf01bf809923ea4be321f59b66d Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Fri, 8 Sep 2017 02:22:03 +0530 Subject: [PATCH 30/38] dropdown style updated --- .../static/datacenterlight/css/landing-page.css | 2 +- hosting/static/hosting/css/landing-page.css | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/datacenterlight/static/datacenterlight/css/landing-page.css b/datacenterlight/static/datacenterlight/css/landing-page.css index 052e55c8..5eeed036 100755 --- a/datacenterlight/static/datacenterlight/css/landing-page.css +++ b/datacenterlight/static/datacenterlight/css/landing-page.css @@ -924,7 +924,7 @@ tech-sub-sec h2 { border: 1px solid #fff; -webkit-box-shadow: -8px 13px 31px -8px rgba(77, 77, 77, 1); -moz-box-shadow: -8px 13px 31px -8px rgba(77, 77, 77, 1); - box-shadow: -8px 13px 31px -8px rgba(77, 77, 77, 1); + box-shadow: -8px 14px 20px -5px rgba(77, 77, 77, 0.5); display: none; text-align: center; border-radius: 4px !important; diff --git a/hosting/static/hosting/css/landing-page.css b/hosting/static/hosting/css/landing-page.css index 8881f7fd..7522827d 100644 --- a/hosting/static/hosting/css/landing-page.css +++ b/hosting/static/hosting/css/landing-page.css @@ -85,13 +85,17 @@ h6 { left: 0 !important; min-width: 155px; margin-left: 15px; - padding: 5px !important; + padding: 0 5px 8px !important; } @media(min-width: 768px) { .navbar-right .highlights-dropdown .dropdown-menu { - border: 1px solid #fff; + box-shadow: 0 2px 5px 0 rgba(0,0,0,0.02); + border-width: 0 0 1px 0; + border-color: #e7e7e7; + box-shadow: -8px 14px 20px -5px rgba(77, 77, 77, 0.5); + top: 53px; } - .navbar-right .highlights-dropdown .dropdown-menu:before { +/* .navbar-right .highlights-dropdown .dropdown-menu:before { content: ''; display: block; height: 1px; @@ -100,7 +104,7 @@ h6 { top: -1px; left: -1px; right: -1px; - } + } */ } .navbar-right .highlights-dropdown .dropdown-menu > li > a{ font-size: 13px; From 9721784ff20d748cc6e76f7a09fcb8339ec197f3 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Fri, 8 Sep 2017 02:32:46 +0530 Subject: [PATCH 31/38] logo href fixed --- hosting/templates/hosting/base_short.html | 2 +- hosting/templates/hosting/includes/_navbar_transparent.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hosting/templates/hosting/base_short.html b/hosting/templates/hosting/base_short.html index 5030d9ab..4bfe9be0 100644 --- a/hosting/templates/hosting/base_short.html +++ b/hosting/templates/hosting/base_short.html @@ -66,7 +66,7 @@ {% endif %} - +
    {% if request.user.is_authenticated %} diff --git a/hosting/templates/hosting/includes/_navbar_transparent.html b/hosting/templates/hosting/includes/_navbar_transparent.html index 4efd5920..b03b2bd9 100644 --- a/hosting/templates/hosting/includes/_navbar_transparent.html +++ b/hosting/templates/hosting/includes/_navbar_transparent.html @@ -4,7 +4,7 @@
    From 6a56f4c689e26abcf47411e90be25f7ee2c0b7b2 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Fri, 8 Sep 2017 02:43:11 +0530 Subject: [PATCH 32/38] logo position fix --- hosting/templates/hosting/includes/_navbar_transparent.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosting/templates/hosting/includes/_navbar_transparent.html b/hosting/templates/hosting/includes/_navbar_transparent.html index b03b2bd9..dec9cd49 100644 --- a/hosting/templates/hosting/includes/_navbar_transparent.html +++ b/hosting/templates/hosting/includes/_navbar_transparent.html @@ -1,7 +1,7 @@ {% load static i18n %}