From 6cbbbc70be7787ec39353555a61c3e61a8e348ab Mon Sep 17 00:00:00 2001 From: Mondi Geetha Date: Sun, 2 Jul 2017 02:45:22 +0530 Subject: [PATCH 01/77] Alinged Logo, Text, Signature to left side --- .../emails/request_access_confirmation.html | 8 ++++---- .../emails/request_access_notification.html | 8 ++++---- .../emails/request_beta_access_notification.html | 8 ++++---- .../templates/datacenterlight/emails/user_activation.html | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/datacenterlight/templates/datacenterlight/emails/request_access_confirmation.html b/datacenterlight/templates/datacenterlight/emails/request_access_confirmation.html index e96a8ef1..2f71944f 100644 --- a/datacenterlight/templates/datacenterlight/emails/request_access_confirmation.html +++ b/datacenterlight/templates/datacenterlight/emails/request_access_confirmation.html @@ -74,7 +74,7 @@
-
+ logo @@ -95,12 +95,12 @@
- -
+ {% trans "Thank you for your request." %}
+

{% trans "You are one step away from being our beta tester!" %}

{% trans "Currently we are running our tests to make sure everything runs perfectly." %}
{% trans "In the meantime, we would like to ask you a little patience
until our team contacts you with beta access." %}
@@ -117,7 +117,7 @@

-
Your data center light team
+
Your data center light team
diff --git a/datacenterlight/templates/datacenterlight/emails/request_access_notification.html b/datacenterlight/templates/datacenterlight/emails/request_access_notification.html index 09531ba6..095c917e 100644 --- a/datacenterlight/templates/datacenterlight/emails/request_access_notification.html +++ b/datacenterlight/templates/datacenterlight/emails/request_access_notification.html @@ -73,7 +73,7 @@
-
+ logo @@ -94,12 +94,12 @@
- - @@ -113,7 +113,7 @@
+ An user requested a beta access
+

User {{email}} requested beta access

-
Your data center light team
+
Your data center light team
diff --git a/datacenterlight/templates/datacenterlight/emails/request_beta_access_notification.html b/datacenterlight/templates/datacenterlight/emails/request_beta_access_notification.html index 7991eb69..c6f3033e 100644 --- a/datacenterlight/templates/datacenterlight/emails/request_beta_access_notification.html +++ b/datacenterlight/templates/datacenterlight/emails/request_beta_access_notification.html @@ -73,7 +73,7 @@
-
+ logo @@ -94,14 +94,14 @@
- -
+ An user requested a beta access
+

User {{email}} requested beta access

{% for vm in vms %} Type: {{vm.type}} - Amount: {{vm.amount}} @@ -119,7 +119,7 @@
-
Your data center light team
+
Your data center light team
diff --git a/datacenterlight/templates/datacenterlight/emails/user_activation.html b/datacenterlight/templates/datacenterlight/emails/user_activation.html index bf688127..e591fc54 100644 --- a/datacenterlight/templates/datacenterlight/emails/user_activation.html +++ b/datacenterlight/templates/datacenterlight/emails/user_activation.html @@ -74,7 +74,7 @@
-
+ logo @@ -95,12 +95,12 @@
- -
+ {{dcl_text}} {% trans 'account activation' %}
+

{% blocktrans %} You can activate your {{dcl_text}} account by clicking here.

@@ -120,7 +120,7 @@

-
{% trans 'Your' %} {{dcl_text}} {% trans 'team' %}
+
{% trans 'Your' %} {{dcl_text}} {% trans 'team' %}
From 2045c424ca2922c21392a0ec8c7172234b51b960 Mon Sep 17 00:00:00 2001 From: Mondi Geetha Date: Sun, 2 Jul 2017 03:00:02 +0530 Subject: [PATCH 02/77] Added padding to LOGO in user activation email --- .../templates/datacenterlight/emails/user_activation.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datacenterlight/templates/datacenterlight/emails/user_activation.html b/datacenterlight/templates/datacenterlight/emails/user_activation.html index e591fc54..4b8a7d2b 100644 --- a/datacenterlight/templates/datacenterlight/emails/user_activation.html +++ b/datacenterlight/templates/datacenterlight/emails/user_activation.html @@ -74,7 +74,7 @@
-
+ logo From c87e2cd36b334efe81640344d606c9dbadd55776 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Thu, 24 Aug 2017 20:28:02 +0530 Subject: [PATCH 03/77] 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 04/77] 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 05/77] 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 06/77] 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 07/77] 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 08/77] 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 09/77] 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 10/77] 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 11/77] 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 12/77] 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 13/77] 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 14/77] 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 15/77] 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 16/77] 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 79f4b38e4cf666934f01c14acd21b7ba3890e95d Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 2 Sep 2017 12:24:10 +0530 Subject: [PATCH 17/77] Refactored user activation email --- .../datacenterlight/img/dcl-email-bg.jpg | Bin 0 -> 1941 bytes .../datacenterlight/emails/base_email.html | 178 ++++++++++++++++++ .../datacenterlight/emails/base_email.txt | 9 + .../emails/user_activation.html | 142 ++------------ 4 files changed, 199 insertions(+), 130 deletions(-) create mode 100644 datacenterlight/static/datacenterlight/img/dcl-email-bg.jpg create mode 100644 datacenterlight/templates/datacenterlight/emails/base_email.html create mode 100644 datacenterlight/templates/datacenterlight/emails/base_email.txt diff --git a/datacenterlight/static/datacenterlight/img/dcl-email-bg.jpg b/datacenterlight/static/datacenterlight/img/dcl-email-bg.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5a62f3e7c568ae366c5154f6e8e8a0d45f6dc298 GIT binary patch literal 1941 zcmd^8Nl@En6#i{_W0|C;kdT~Ikp*aFEw(I66PE!S8am^Yumswf9JKrf6>K?@0K+YT zZd^K9x}F-6CTY{j3`x3$L$lHCmZdF8Pb6KLOq-=^F77Xbfy_`&z4eXsFK_+c``^n= z=Vm}5 zDV8OX25AnZEh$T;&8mWjI5ZVQ%UGJ8#%+(1toK_{0wJACA(cra791~ItyId+E3a)@ zt#A>>vf5_*PzF-1(A4`41tRsTf-$Py%7JV}ghqVI(9okueQ{msPrPc& zOscdT6p|7t&`F*Qg?NUHM4&=SNsdV>JTHgkNWsr?_B`Dn2=#oU5DteKrZLpOHpLq` zmW?yPdY0wm1>5GdX-R1X7Gi5C_PlL;MO!guK*`dLc3tl)bU{mxZs}%^p21_W{Hx>D z2}#k?HnYZlsJXo3(9i~;+GOY{JYQ*1TLuNo2O&oXd6EyqAgX{8A|q;0C84bHYEn^o zfkPFTvsaf?aIRAk2W65e01_igkmY#^lB&u@NQU8gQkFTIlo*AByuz?DEfExgNZHM^ zq?rmV)S>oqVKmTXVYpx#O_YH~C-)0jl^+P8o<$?-$bAb&0p_#`t(Xf#zZ*m3cDr2m z=XHA!xxHSWugK@~mXws1+CQRI3*^Y_yNkWv;?P6W#7 za(cWNTAZfCiTPc?{YV*8zuoh&MC{sK&h9Cb&kvy}{UXXJahXwr~8T zVxH&XoA)0&6<*t}S{E+g@NF6?Dz02NdZ4lC@aY{_I;z*-y?O8A)$e|T{m;Gf_WM&` zegAuM;Q3dNeDLYlKm5Tz(b+xt!fQuA{Op?_|BP(y>dC(N`mv8bpZ@8u8lm}VZRn*p z-ud{8Yd`;8D?a(mv%_O=zI*1&>$CS!;!cDT)!prJ`7kVn^6_IX8?k#kLhRYKdoO!% z;&%DDOEXms6|J&yC%7RL+p}h0+s1L_@rf}o>&8pSG-#v8d zLUqlRoA*W!96tRZ$V`oMx`aQL?r5#t7Vdp^Z+CRJrtrGwM literal 0 HcmV?d00001 diff --git a/datacenterlight/templates/datacenterlight/emails/base_email.html b/datacenterlight/templates/datacenterlight/emails/base_email.html new file mode 100644 index 00000000..ae279731 --- /dev/null +++ b/datacenterlight/templates/datacenterlight/emails/base_email.html @@ -0,0 +1,178 @@ +{% load static from staticfiles %} +{% load i18n %} + + + + + + + {{dcl_text}} + + + + + + + + + + + + + +
+
+ + + + +
+ +
+ + + + + +
+ logo + +
+
+ +
+
+
+
+ + + + + + + + + + +
+ {% block email_head %} + {% endblock %} +
+

+ {% block email_body %} + {% endblock %} +

  +
+
+
+
+ + + + +
{% trans 'Your' %} {{dcl_text}} {% + trans 'team' %}
+
+
+
+ + + diff --git a/datacenterlight/templates/datacenterlight/emails/base_email.txt b/datacenterlight/templates/datacenterlight/emails/base_email.txt new file mode 100644 index 00000000..f0abda8f --- /dev/null +++ b/datacenterlight/templates/datacenterlight/emails/base_email.txt @@ -0,0 +1,9 @@ +{% load static from staticfiles %} +{% load i18n %} +{% block email_head %} +{% endblock %} + +{% block email_body %} +{% endblock %} + +{% trans 'Your' %} {{dcl_text}} {% trans 'team' %} diff --git a/datacenterlight/templates/datacenterlight/emails/user_activation.html b/datacenterlight/templates/datacenterlight/emails/user_activation.html index 4b8a7d2b..1f0df691 100644 --- a/datacenterlight/templates/datacenterlight/emails/user_activation.html +++ b/datacenterlight/templates/datacenterlight/emails/user_activation.html @@ -1,132 +1,14 @@ +{% extends "datacenterlight/emails/base_email.html" %} {% load static from staticfiles %} {% load i18n %} - - - - - - -{{dcl_text}} - - - - - - - - - - - - - -
-
- - -
- -
- - - -
- logo - -
-
- -
-
-
-
- - - - - - - - - - -
- {{dcl_text}} {% trans 'account activation' %} -
-

- {% blocktrans %} - You can activate your {{dcl_text}} account by clicking here.

- You can also copy and paste the following link into the address bar of your browser and follow the link in order to activate your datacenterlight account.
- {{base_url}}{{activation_link}} - {% endblocktrans %} -

 
-
-
-
- - -
{% trans 'Your' %} {{dcl_text}} {% trans 'team' %}
-
-
-
- - - +{% block email_head %} + {{dcl_text}} {% trans 'account activation' %} +{% endblock %} +{% block email_body %} +{% blocktrans %} +You can activate your Data Center Light account by clicking here.
+You can also copy and paste the following link into the address bar of your browser
+to activate your Data Center Light account.
+{{base_url}}{{activation_link}} +{% endblocktrans %} +{% endblock %} From f4726954b8213ab61cfc4c7d99e5dc9695a054a4 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 2 Sep 2017 12:35:01 +0530 Subject: [PATCH 18/77] Removed Raleway font --- .../datacenterlight/emails/base_email.html | 66 +++++++++---------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/datacenterlight/templates/datacenterlight/emails/base_email.html b/datacenterlight/templates/datacenterlight/emails/base_email.html index ae279731..193e8fac 100644 --- a/datacenterlight/templates/datacenterlight/emails/base_email.html +++ b/datacenterlight/templates/datacenterlight/emails/base_email.html @@ -3,14 +3,14 @@ + style="font-family: 'Lato', 'sans-serif' !important;"> {{dcl_text}} + style="font-family: 'Lato', 'sans-serif' !important; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; color: white; margin: 0;"> - + style="border-collapse: collapse !important; min-width: 600px; font-family: 'Lato', 'sans-serif' !important;"> +
-
+
- + style="border-collapse: collapse !important; font-family: 'Lato', 'sans-serif' !important; background: transparent;"> +
-
+
- + style="border-collapse: collapse !important; font-family: 'Lato', 'sans-serif' !important;"> + @@ -120,33 +120,33 @@ - +
logo + style="max-width: 600px; outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; font-family: 'Lato', 'sans-serif' !important; border: none;">
-
+
- + style="border-collapse: collapse !important; font-family: 'Lato', 'sans-serif' !important;"> + - + - + @@ -154,18 +154,18 @@ - +
{% block email_head %} {% endblock %}

{% block email_body %} {% endblock %}

 
-
+
- - +
+
{% trans 'Your' %} {{dcl_text}} {% trans 'team' %}
+ style="font-family: 'Lato', 'sans-serif' !important;">
From aecdff2ab7e2f7b4747a9ac2edd530dcfd3d6125 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 2 Sep 2017 12:47:44 +0530 Subject: [PATCH 19/77] Made into a single text -- Your Data Center Light Team --- .../templates/datacenterlight/emails/base_email.html | 4 +--- .../templates/datacenterlight/emails/base_email.txt | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/datacenterlight/templates/datacenterlight/emails/base_email.html b/datacenterlight/templates/datacenterlight/emails/base_email.html index 193e8fac..be8479d9 100644 --- a/datacenterlight/templates/datacenterlight/emails/base_email.html +++ b/datacenterlight/templates/datacenterlight/emails/base_email.html @@ -163,9 +163,7 @@ style="border-collapse: collapse !important; font-family: 'Lato', 'sans-serif' !important;">
{% trans 'Your' %} {{dcl_text}} {% - trans 'team' %}
+ align="left">{% trans 'Your Data Center Light Team' %}
diff --git a/datacenterlight/templates/datacenterlight/emails/base_email.txt b/datacenterlight/templates/datacenterlight/emails/base_email.txt index f0abda8f..ddf9b9cf 100644 --- a/datacenterlight/templates/datacenterlight/emails/base_email.txt +++ b/datacenterlight/templates/datacenterlight/emails/base_email.txt @@ -6,4 +6,4 @@ {% block email_body %} {% endblock %} -{% trans 'Your' %} {{dcl_text}} {% trans 'team' %} +{% trans 'Your Data Center Light Team' %} From eb79251fc013d365f762c06aae337d5115141ba4 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 2 Sep 2017 13:25:47 +0530 Subject: [PATCH 20/77] Added translation and refactored user activation txt email --- .../locale/de/LC_MESSAGES/django.po | 45 +++++++++---------- .../emails/user_activation.html | 2 +- .../emails/user_activation.txt | 9 ++-- 3 files changed, 29 insertions(+), 27 deletions(-) diff --git a/datacenterlight/locale/de/LC_MESSAGES/django.po b/datacenterlight/locale/de/LC_MESSAGES/django.po index 80d88c04..cdffc92f 100644 --- a/datacenterlight/locale/de/LC_MESSAGES/django.po +++ b/datacenterlight/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-09-02 03:08+0530\n" +"POT-Creation-Date: 2017-09-02 07:47+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -102,6 +102,9 @@ msgstr "" msgid "SUBMIT" msgstr "ABSENDEN" +msgid "Your Data Center Light Team" +msgstr "Dein Data Center Light Team" + msgid "Thank you for your request." msgstr "Vielen Dank für Ihre Anfrage." @@ -125,34 +128,24 @@ msgstr "" msgid "Thank you!" msgstr "Vielen Dank!" -msgid "account activation" -msgstr "Accountaktivierung" +msgid "Account Activation" +msgstr "Account Aktivierung" #, python-format msgid "" "\n" -" You can activate your %(dcl_text)s account by clicking here.

\n" -" You can also copy and paste the following link into the " -"address bar of your browser and follow the link in order to activate your " -"datacenterlight account.
\n" -" %(base_url)s%(activation_link)s\n" -" " +"You can activate your Data Center Light account by clicking here.
\n" +"You can also copy and paste the following link into the address bar of your " +"browser
\n" +"to activate your Data Center Light account.
\n" +"%(base_url)s%(activation_link)s\n" msgstr "" "\n" -" Klicke hier " -"um deinen %(dcl_text)s zu aktivieren.

\n" -" Oder kopiere den folgenden Link in die Adressleiste deines " -"Browsers und folge dann dem Link um deinen %(dcl_text)s Account zu " -"aktivieren.
\n" -" %(base_url)s%(activation_link)s\n" -" " - -msgid "Your" -msgstr "Dein" - -msgid "team" -msgstr "Team" +"Klicke hier " +"um deinen Data Center Light Account zu aktivieren oder kopiere den folgenden " +"Link in die Adressleiste deines Browsers.
\n" +"%(base_url)s%(activation_link)s\n" #, python-format msgid "" @@ -481,6 +474,12 @@ msgstr "ist kein gültiger Name" msgid "is not a proper email" msgstr "ist keine gültige E-Mailadresse" +#~ msgid "Your" +#~ msgstr "Dein" + +#~ msgid "team" +#~ msgstr "Team" + #~ msgid "Questions?" #~ msgstr "Fragen?" diff --git a/datacenterlight/templates/datacenterlight/emails/user_activation.html b/datacenterlight/templates/datacenterlight/emails/user_activation.html index 1f0df691..ed2753a3 100644 --- a/datacenterlight/templates/datacenterlight/emails/user_activation.html +++ b/datacenterlight/templates/datacenterlight/emails/user_activation.html @@ -2,7 +2,7 @@ {% load static from staticfiles %} {% load i18n %} {% block email_head %} - {{dcl_text}} {% trans 'account activation' %} + {{dcl_text}} {% trans 'Account Activation' %} {% endblock %} {% block email_body %} {% blocktrans %} diff --git a/datacenterlight/templates/datacenterlight/emails/user_activation.txt b/datacenterlight/templates/datacenterlight/emails/user_activation.txt index e40ef956..881e8087 100644 --- a/datacenterlight/templates/datacenterlight/emails/user_activation.txt +++ b/datacenterlight/templates/datacenterlight/emails/user_activation.txt @@ -1,11 +1,14 @@ +{% extends "datacenterlight/emails/base_email.txt" %} {% load static from staticfiles %} {% load i18n %} -{{dcl_text}} {% trans 'account activation' %} +{% block email_head %} + {{dcl_text}} {% trans 'Account Activation' %} +{% endblock %} +{% block email_body %} {% blocktrans %} Hi, You can activate your {{dcl_text}} account by clicking here {{base_url}}{{activation_link}} {% endblocktrans %} - -{% trans 'Your' %} {{dcl_text}} {% trans 'team' %} +{% endblock %} From 75611deaddb7712dc7c4e340d3f14c22c44b2992 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 2 Sep 2017 13:32:08 +0530 Subject: [PATCH 21/77] Further refactored user activation email --- datacenterlight/templates/datacenterlight/emails/base_email.txt | 2 -- .../templates/datacenterlight/emails/user_activation.html | 2 +- .../templates/datacenterlight/emails/user_activation.txt | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/datacenterlight/templates/datacenterlight/emails/base_email.txt b/datacenterlight/templates/datacenterlight/emails/base_email.txt index ddf9b9cf..46fd0730 100644 --- a/datacenterlight/templates/datacenterlight/emails/base_email.txt +++ b/datacenterlight/templates/datacenterlight/emails/base_email.txt @@ -2,8 +2,6 @@ {% load i18n %} {% block email_head %} {% endblock %} - {% block email_body %} {% endblock %} - {% trans 'Your Data Center Light Team' %} diff --git a/datacenterlight/templates/datacenterlight/emails/user_activation.html b/datacenterlight/templates/datacenterlight/emails/user_activation.html index ed2753a3..24c0d040 100644 --- a/datacenterlight/templates/datacenterlight/emails/user_activation.html +++ b/datacenterlight/templates/datacenterlight/emails/user_activation.html @@ -2,7 +2,7 @@ {% load static from staticfiles %} {% load i18n %} {% block email_head %} - {{dcl_text}} {% trans 'Account Activation' %} +{{dcl_text}} {% trans 'Account Activation' %} {% endblock %} {% block email_body %} {% blocktrans %} diff --git a/datacenterlight/templates/datacenterlight/emails/user_activation.txt b/datacenterlight/templates/datacenterlight/emails/user_activation.txt index 881e8087..d626bc8f 100644 --- a/datacenterlight/templates/datacenterlight/emails/user_activation.txt +++ b/datacenterlight/templates/datacenterlight/emails/user_activation.txt @@ -2,7 +2,7 @@ {% load static from staticfiles %} {% load i18n %} {% block email_head %} - {{dcl_text}} {% trans 'Account Activation' %} +{{dcl_text}} {% trans 'Account Activation' %} {% endblock %} {% block email_body %} From cf83a67d51d6966a360425f736301e28aec17717 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 2 Sep 2017 14:17:08 +0530 Subject: [PATCH 22/77] Further refactored to base_email_datacenterlight.html --- .../templates/datacenterlight/emails/base_email.html | 4 +++- .../datacenterlight/emails/base_email_datacenterlight.html | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 datacenterlight/templates/datacenterlight/emails/base_email_datacenterlight.html diff --git a/datacenterlight/templates/datacenterlight/emails/base_email.html b/datacenterlight/templates/datacenterlight/emails/base_email.html index be8479d9..b65f06aa 100644 --- a/datacenterlight/templates/datacenterlight/emails/base_email.html +++ b/datacenterlight/templates/datacenterlight/emails/base_email.html @@ -163,7 +163,9 @@ style="border-collapse: collapse !important; font-family: 'Lato', 'sans-serif' !important;">
{% trans 'Your Data Center Light Team' %} + align="left"> + {% block email_tail %} + {% endblock %}
diff --git a/datacenterlight/templates/datacenterlight/emails/base_email_datacenterlight.html b/datacenterlight/templates/datacenterlight/emails/base_email_datacenterlight.html new file mode 100644 index 00000000..fbe5b4ff --- /dev/null +++ b/datacenterlight/templates/datacenterlight/emails/base_email_datacenterlight.html @@ -0,0 +1,6 @@ +{% extends "datacenterlight/emails/base_email.html" %} +{% load static from staticfiles %} +{% load i18n %} +{% block email_tail %} +{% trans 'Your Data Center Light Team' %} +{% endblock %} From 61988ae27b92f178d53cb69a277234fc668537be Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 2 Sep 2017 14:24:23 +0530 Subject: [PATCH 23/77] Renamed base_email to base_email_datacenterlight --- .../datacenterlight/emails/base_email.html | 178 ------------------ ...ail.txt => base_email_datacenterlight.txt} | 0 2 files changed, 178 deletions(-) delete mode 100644 datacenterlight/templates/datacenterlight/emails/base_email.html rename datacenterlight/templates/datacenterlight/emails/{base_email.txt => base_email_datacenterlight.txt} (100%) diff --git a/datacenterlight/templates/datacenterlight/emails/base_email.html b/datacenterlight/templates/datacenterlight/emails/base_email.html deleted file mode 100644 index b65f06aa..00000000 --- a/datacenterlight/templates/datacenterlight/emails/base_email.html +++ /dev/null @@ -1,178 +0,0 @@ -{% load static from staticfiles %} -{% load i18n %} - - - - - - - {{dcl_text}} - - - - - - - - - - - - - -
-
- - - - -
- -
- - - - - -
- logo - -
-
- -
-
-
-
- - - - - - - - - - -
- {% block email_head %} - {% endblock %} -
-

- {% block email_body %} - {% endblock %} -

  -
-
-
-
- - - - -
- {% block email_tail %} - {% endblock %} -
-
-
- - - diff --git a/datacenterlight/templates/datacenterlight/emails/base_email.txt b/datacenterlight/templates/datacenterlight/emails/base_email_datacenterlight.txt similarity index 100% rename from datacenterlight/templates/datacenterlight/emails/base_email.txt rename to datacenterlight/templates/datacenterlight/emails/base_email_datacenterlight.txt From ede949004e6e3dc3ae3d372fb38bd5aa09032d92 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 2 Sep 2017 14:28:18 +0530 Subject: [PATCH 24/77] Fixed an incorrect template name --- .../emails/base_email_datacenterlight.html | 178 +++++++++++++++++- .../emails/user_activation.txt | 2 +- 2 files changed, 175 insertions(+), 5 deletions(-) diff --git a/datacenterlight/templates/datacenterlight/emails/base_email_datacenterlight.html b/datacenterlight/templates/datacenterlight/emails/base_email_datacenterlight.html index fbe5b4ff..be8479d9 100644 --- a/datacenterlight/templates/datacenterlight/emails/base_email_datacenterlight.html +++ b/datacenterlight/templates/datacenterlight/emails/base_email_datacenterlight.html @@ -1,6 +1,176 @@ -{% extends "datacenterlight/emails/base_email.html" %} {% load static from staticfiles %} {% load i18n %} -{% block email_tail %} -{% trans 'Your Data Center Light Team' %} -{% endblock %} + + + + + + + {{dcl_text}} + + + + + + + + + + + + + +
+
+ + + + +
+ +
+ + + + + +
+ logo + +
+
+ +
+
+
+
+ + + + + + + + + + +
+ {% block email_head %} + {% endblock %} +
+

+ {% block email_body %} + {% endblock %} +

  +
+
+
+
+ + + + +
{% trans 'Your Data Center Light Team' %} +
+
+
+ + + diff --git a/datacenterlight/templates/datacenterlight/emails/user_activation.txt b/datacenterlight/templates/datacenterlight/emails/user_activation.txt index d626bc8f..bae6789a 100644 --- a/datacenterlight/templates/datacenterlight/emails/user_activation.txt +++ b/datacenterlight/templates/datacenterlight/emails/user_activation.txt @@ -1,4 +1,4 @@ -{% extends "datacenterlight/emails/base_email.txt" %} +{% extends "datacenterlight/emails/base_email_datacenterlight.txt" %} {% load static from staticfiles %} {% load i18n %} {% block email_head %} From 5381e0fa6759465b02e48f4031c1e5fad970ad4f Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 2 Sep 2017 14:30:10 +0530 Subject: [PATCH 25/77] Fixed another incorrect template --- .../templates/datacenterlight/emails/user_activation.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datacenterlight/templates/datacenterlight/emails/user_activation.html b/datacenterlight/templates/datacenterlight/emails/user_activation.html index 24c0d040..955eed18 100644 --- a/datacenterlight/templates/datacenterlight/emails/user_activation.html +++ b/datacenterlight/templates/datacenterlight/emails/user_activation.html @@ -1,4 +1,4 @@ -{% extends "datacenterlight/emails/base_email.html" %} +{% extends "datacenterlight/emails/base_email_datacenterlight.html" %} {% load static from staticfiles %} {% load i18n %} {% block email_head %} From 7c70ee637a63cb34ae380f7e09f8cf8416d3e87b Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 2 Sep 2017 15:56:17 +0530 Subject: [PATCH 26/77] Updated password reset template --- .../hosting/emails/password_reset_email.html | 27 ++++++++++--------- .../hosting/emails/password_reset_email.txt | 27 ++++++++++--------- utils/views.py | 12 +++------ 3 files changed, 32 insertions(+), 34 deletions(-) diff --git a/hosting/templates/hosting/emails/password_reset_email.html b/hosting/templates/hosting/emails/password_reset_email.html index 682834f5..192d043c 100644 --- a/hosting/templates/hosting/emails/password_reset_email.html +++ b/hosting/templates/hosting/emails/password_reset_email.html @@ -1,13 +1,14 @@ -{% load i18n %}{% autoescape off %} -{% blocktrans %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endblocktrans %} - -{% trans "Please go to the following page and choose a new password:" %} - {% block reset_link %} - {{ base_url }}{% url 'hosting:reset_password_confirm' uidb64=uid token=token %} - {% endblock %} - -{% trans "Thanks for using our site!" %} - -{% blocktrans %}The {{ site_name }} team{% endblocktrans %} - -{% endautoescape %} \ No newline at end of file +{% extends "datacenterlight/emails/base_email_datacenterlight.html" %} +{% load i18n %} +{% block email_head %} +{% trans 'Password Reset' %} +{% endblock %} +{% block email_body %} +{% url 'hosting:reset_password_confirm' uidb64=uid token=token as password_reset_url %} +{% blocktrans %} +You're receiving this email because you requested a password reset for your user account at {{site_name}}. +Please go to the following page and choose a new password: {{base_url}}{{ password_reset_url }} +If you didn't request a new password, ignore this e-mail. +Thank you! +{% endblocktrans %} +{% endblock %} diff --git a/hosting/templates/hosting/emails/password_reset_email.txt b/hosting/templates/hosting/emails/password_reset_email.txt index 682834f5..67ac9a08 100644 --- a/hosting/templates/hosting/emails/password_reset_email.txt +++ b/hosting/templates/hosting/emails/password_reset_email.txt @@ -1,13 +1,14 @@ -{% load i18n %}{% autoescape off %} -{% blocktrans %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endblocktrans %} - -{% trans "Please go to the following page and choose a new password:" %} - {% block reset_link %} - {{ base_url }}{% url 'hosting:reset_password_confirm' uidb64=uid token=token %} - {% endblock %} - -{% trans "Thanks for using our site!" %} - -{% blocktrans %}The {{ site_name }} team{% endblocktrans %} - -{% endautoescape %} \ No newline at end of file +{% extends "datacenterlight/emails/base_email_datacenterlight.txt" %} +{% load i18n %} +{% block email_head %} +{% trans 'Password Reset' %} +{% endblock %} +{% block email_body %} +{% url 'hosting:reset_password_confirm' uidb64=uid token=token as password_reset_url %} +{% blocktrans with amount=article.price%} +You're receiving this email because you requested a password reset for your user account at {{site_name}}. +Please go to the following page and choose a new password: {{base_url}}{{ password_reset_url }} +If you didn't request a new password, ignore this e-mail. +Thank you! +{% endblocktrans %} +{% endblock %} diff --git a/utils/views.py b/utils/views.py index 039e08d8..011a8491 100644 --- a/utils/views.py +++ b/utils/views.py @@ -1,11 +1,12 @@ from django.views.generic import FormView, CreateView from django.utils.http import urlsafe_base64_encode, urlsafe_base64_decode +from django.conf import settings from django.contrib import messages from django.contrib.auth.tokens import default_token_generator from django.utils.encoding import force_bytes from django.http import HttpResponseRedirect from django.contrib.auth import authenticate, login - +from django.utils.translation import ugettext_lazy as _ from membership.models import CustomUser from .mailer import BaseEmail @@ -65,10 +66,8 @@ class LoginViewMixin(FormView): class PasswordResetViewMixin(FormView): # template_name = 'hosting/reset_password.html' # form_class = PasswordResetRequestForm - success_message = "The link to reset your email has been sent to your email" + success_message = _("The link to reset your email has been sent to your email") site = '' - success_message = "Thank you! You will shortly receive a password reset mail from us" - # success_url = reverse_lazy('hosting:login') def test_generate_email_context(self, user): context = { @@ -82,12 +81,9 @@ class PasswordResetViewMixin(FormView): return context def form_valid(self, form): - email = form.cleaned_data.get('email') user = CustomUser.objects.get(email=email) - messages.add_message(self.request, messages.SUCCESS, self.success_message) - context = self.test_generate_email_context(user) email_data = { 'subject': 'Password Reset', @@ -97,7 +93,7 @@ class PasswordResetViewMixin(FormView): 'template_path': self.template_email_path } if self.site == 'dcl': - email_data['from_address'] = '(Data Center Light) Data Center Light Support ' + email_data['from_address'] = settings.DCL_SUPPORT_FROM_ADDRESS email = BaseEmail(**email_data) email.send() From b4ba882c9cc4c738c9cc4650c2714870f93a074a Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 2 Sep 2017 16:01:39 +0530 Subject: [PATCH 27/77] Added password reset email translation --- hosting/locale/de/LC_MESSAGES/django.po | 28 ++++++++++++++----------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index f905d905..8f0af274 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-02 10:28+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -193,21 +193,25 @@ msgstr "Meine Einstellungen" msgid "Support / Contact" msgstr "Support / Kontakt" +msgid "Password Reset" +msgstr "Passwort zurücksetzen" + #, python-format msgid "" +"\n" "You're receiving this email because you requested a password reset for your " -"user account at %(site_name)s." -msgstr "" - -msgid "Please go to the following page and choose a new password:" -msgstr "" - -msgid "Thanks for using our site!" -msgstr "" - -#, python-format -msgid "The %(site_name)s team" +"user account at %(site_name)s.\n" +"Please go to the following page and choose a new password: %(base_url)s" +"%(password_reset_url)s\n" +"If you didn't request a new password, ignore this e-mail.\n" +"Thank you!\n" msgstr "" +"\n" +"Du erhälst diese E-Mail da du dein Passwort für deinen Account bei " +"Data Center Light zurücksetzen möchtest.\n" +"Bitte folge diesem Link und wähle ein neues Passwort: %(base_url)s" +"Solltest du kein neues Passwort angefordert haben, dann ignoriere diese E-Mail.\n" +"Dankeschön!" msgid "Don't have an account yet ? " msgstr "Besitzt du kein Benutzerkonto?" From 00e4ae5b768cb1fcc22756d8f5610df04ccf66a9 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 2 Sep 2017 16:03:39 +0530 Subject: [PATCH 28/77] Added missing new line character --- hosting/locale/de/LC_MESSAGES/django.po | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index 8f0af274..e02f598e 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 10:28+0000\n" +"POT-Creation-Date: 2017-09-02 10:32+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -207,11 +207,11 @@ msgid "" "Thank you!\n" msgstr "" "\n" -"Du erhälst diese E-Mail da du dein Passwort für deinen Account bei " -"Data Center Light zurücksetzen möchtest.\n" -"Bitte folge diesem Link und wähle ein neues Passwort: %(base_url)s" -"Solltest du kein neues Passwort angefordert haben, dann ignoriere diese E-Mail.\n" -"Dankeschön!" +"Du erhälst diese E-Mail da du dein Passwort für deinen Account bei Data " +"Center Light zurücksetzen möchtest.\n" +"Bitte folge diesem Link und wähle ein neues Passwort: %(base_url)s Solltest " +"du kein neues Passwort angefordert haben, dann ignoriere diese E-Mail.\n" +"Dankeschön!\n" msgid "Don't have an account yet ? " msgstr "Besitzt du kein Benutzerkonto?" From 22f07837e05657cf69025073a2248d063e81181c Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 2 Sep 2017 16:05:24 +0530 Subject: [PATCH 29/77] Added missing password_reset_url --- hosting/locale/de/LC_MESSAGES/django.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index e02f598e..58893523 100644 --- a/hosting/locale/de/LC_MESSAGES/django.po +++ b/hosting/locale/de/LC_MESSAGES/django.po @@ -209,7 +209,7 @@ msgstr "" "\n" "Du erhälst diese E-Mail da du dein Passwort für deinen Account bei Data " "Center Light zurücksetzen möchtest.\n" -"Bitte folge diesem Link und wähle ein neues Passwort: %(base_url)s Solltest " +"Bitte folge diesem Link und wähle ein neues Passwort: %(base_url)s%(password_reset_url)s Solltest " "du kein neues Passwort angefordert haben, dann ignoriere diese E-Mail.\n" "Dankeschön!\n" From f701f10e24ef7f55539e80be612c400cbe39021c Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 2 Sep 2017 16:07:05 +0530 Subject: [PATCH 30/77] Added missing site_name --- hosting/locale/de/LC_MESSAGES/django.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index 58893523..ef35eab6 100644 --- a/hosting/locale/de/LC_MESSAGES/django.po +++ b/hosting/locale/de/LC_MESSAGES/django.po @@ -207,8 +207,8 @@ msgid "" "Thank you!\n" msgstr "" "\n" -"Du erhälst diese E-Mail da du dein Passwort für deinen Account bei Data " -"Center Light zurücksetzen möchtest.\n" +"Du erhälst diese E-Mail da du dein Passwort für deinen Account bei %(site_name)s " +"zurücksetzen möchtest.\n" "Bitte folge diesem Link und wähle ein neues Passwort: %(base_url)s%(password_reset_url)s Solltest " "du kein neues Passwort angefordert haben, dann ignoriere diese E-Mail.\n" "Dankeschön!\n" From 1c426239649f1cfaaaa166ebd54703a7ef51c63a Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 2 Sep 2017 16:24:25 +0530 Subject: [PATCH 31/77] Fixed some password reset email translation issues --- hosting/locale/de/LC_MESSAGES/django.po | 29 +++++++++++++++---- .../hosting/emails/password_reset_email.html | 6 ++-- .../hosting/emails/password_reset_email.txt | 7 ++--- utils/views.py | 2 +- 4 files changed, 29 insertions(+), 15 deletions(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index ef35eab6..fc9f9765 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 10:32+0000\n" +"POT-Creation-Date: 2017-09-02 10:50+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -200,17 +200,34 @@ msgstr "Passwort zurücksetzen" msgid "" "\n" "You're receiving this email because you requested a password reset for your " +"user account at %(site_name)s.
\n" +"Please go to the following page and choose a new password: %(base_url)s" +"%(password_reset_url)s
\n" +"If you didn't request a new password, ignore this e-mail.
\n" +"Thank you!\n" +msgstr "" +"\n" +"Du erhälst diese E-Mail da du dein Passwort für deinen Account bei " +"%(site_name)s zurücksetzen möchtest.
\n" +"Bitte folge diesem Link und wähle ein neues Passwort: %(base_url)s" +"%(password_reset_url)s Solltest du kein neues Passwort angefordert haben, " +"dann ignoriere diese E-Mail.
\n" +"Dankeschön!\n" + +#, python-format +msgid "" +"You're receiving this email because you requested a password reset for your " "user account at %(site_name)s.\n" "Please go to the following page and choose a new password: %(base_url)s" "%(password_reset_url)s\n" "If you didn't request a new password, ignore this e-mail.\n" "Thank you!\n" msgstr "" -"\n" -"Du erhälst diese E-Mail da du dein Passwort für deinen Account bei %(site_name)s " -"zurücksetzen möchtest.\n" -"Bitte folge diesem Link und wähle ein neues Passwort: %(base_url)s%(password_reset_url)s Solltest " -"du kein neues Passwort angefordert haben, dann ignoriere diese E-Mail.\n" +"Du erhälst diese E-Mail da du dein Passwort für deinen Account bei " +"%(site_name)s zurücksetzen möchtest.\n" +"Bitte folge diesem Link und wähle ein neues Passwort: %(base_url)s" +"%(password_reset_url)s Solltest du kein neues Passwort angefordert haben, " +"dann ignoriere diese E-Mail.\n" "Dankeschön!\n" msgid "Don't have an account yet ? " diff --git a/hosting/templates/hosting/emails/password_reset_email.html b/hosting/templates/hosting/emails/password_reset_email.html index 192d043c..b83a08f2 100644 --- a/hosting/templates/hosting/emails/password_reset_email.html +++ b/hosting/templates/hosting/emails/password_reset_email.html @@ -6,9 +6,9 @@ {% block email_body %} {% url 'hosting:reset_password_confirm' uidb64=uid token=token as password_reset_url %} {% blocktrans %} -You're receiving this email because you requested a password reset for your user account at {{site_name}}. -Please go to the following page and choose a new password: {{base_url}}{{ password_reset_url }} -If you didn't request a new password, ignore this e-mail. +You're receiving this email because you requested a password reset for your user account at {{site_name}}.
+Please go to the following page and choose a new password: {{base_url}}{{ password_reset_url }}
+If you didn't request a new password, ignore this e-mail.
Thank you! {% endblocktrans %} {% endblock %} diff --git a/hosting/templates/hosting/emails/password_reset_email.txt b/hosting/templates/hosting/emails/password_reset_email.txt index 67ac9a08..769166ed 100644 --- a/hosting/templates/hosting/emails/password_reset_email.txt +++ b/hosting/templates/hosting/emails/password_reset_email.txt @@ -1,12 +1,9 @@ {% extends "datacenterlight/emails/base_email_datacenterlight.txt" %} {% load i18n %} -{% block email_head %} -{% trans 'Password Reset' %} -{% endblock %} +{% block email_head %}{% trans 'Password Reset' %}{% endblock %} {% block email_body %} {% url 'hosting:reset_password_confirm' uidb64=uid token=token as password_reset_url %} -{% blocktrans with amount=article.price%} -You're receiving this email because you requested a password reset for your user account at {{site_name}}. +{% blocktrans %}You're receiving this email because you requested a password reset for your user account at {{site_name}}. Please go to the following page and choose a new password: {{base_url}}{{ password_reset_url }} If you didn't request a new password, ignore this e-mail. Thank you! diff --git a/utils/views.py b/utils/views.py index 011a8491..8aea6d5b 100644 --- a/utils/views.py +++ b/utils/views.py @@ -86,7 +86,7 @@ class PasswordResetViewMixin(FormView): messages.add_message(self.request, messages.SUCCESS, self.success_message) context = self.test_generate_email_context(user) email_data = { - 'subject': 'Password Reset', + 'subject': _('Password Reset'), 'to': email, 'context': context, 'template_name': 'password_reset_email', From 2276533185fa7ebf5998222042bf1e021580d91d Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 2 Sep 2017 16:36:20 +0530 Subject: [PATCH 32/77] Reformatted utils/views.py and added a condition to DCL_TEXT in passoword reset email --- utils/views.py | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/utils/views.py b/utils/views.py index 8aea6d5b..8198a01c 100644 --- a/utils/views.py +++ b/utils/views.py @@ -1,16 +1,16 @@ -from django.views.generic import FormView, CreateView -from django.utils.http import urlsafe_base64_encode, urlsafe_base64_decode from django.conf import settings from django.contrib import messages -from django.contrib.auth.tokens import default_token_generator -from django.utils.encoding import force_bytes -from django.http import HttpResponseRedirect from django.contrib.auth import authenticate, login +from django.contrib.auth.tokens import default_token_generator +from django.http import HttpResponseRedirect +from django.utils.encoding import force_bytes +from django.utils.http import urlsafe_base64_encode, urlsafe_base64_decode from django.utils.translation import ugettext_lazy as _ -from membership.models import CustomUser +from django.views.generic import FormView, CreateView -from .mailer import BaseEmail +from membership.models import CustomUser from .forms import SetPasswordForm +from .mailer import BaseEmail class SignupViewMixin(CreateView): @@ -18,8 +18,8 @@ class SignupViewMixin(CreateView): success_url = None def get_success_url(self): - - next_url = self.request.POST.get('next') if self.request.POST.get('next')\ + next_url = self.request.POST.get('next') if self.request.POST.get( + 'next') \ else self.success_url return next_url @@ -66,7 +66,8 @@ class LoginViewMixin(FormView): class PasswordResetViewMixin(FormView): # template_name = 'hosting/reset_password.html' # form_class = PasswordResetRequestForm - success_message = _("The link to reset your email has been sent to your email") + success_message = _( + "The link to reset your email has been sent to your email") site = '' def test_generate_email_context(self, user): @@ -74,8 +75,9 @@ class PasswordResetViewMixin(FormView): 'user': user, 'token': default_token_generator.make_token(user), 'uid': urlsafe_base64_encode(force_bytes(user.pk)), - 'site_name': 'ungleich', - 'base_url': "{0}://{1}".format(self.request.scheme, self.request.get_host()) + 'site_name': 'ungleich' if self.site != 'dcl' else settings.DCL_TEXT, + 'base_url': "{0}://{1}".format(self.request.scheme, + self.request.get_host()) } return context @@ -83,7 +85,8 @@ class PasswordResetViewMixin(FormView): def form_valid(self, form): email = form.cleaned_data.get('email') user = CustomUser.objects.get(email=email) - messages.add_message(self.request, messages.SUCCESS, self.success_message) + messages.add_message(self.request, messages.SUCCESS, + self.success_message) context = self.test_generate_email_context(user) email_data = { 'subject': _('Password Reset'), @@ -103,6 +106,7 @@ class PasswordResetViewMixin(FormView): class PasswordResetConfirmViewMixin(FormView): # template_name = 'hosting/confirm_reset_password.html' form_class = SetPasswordForm + # success_url = reverse_lazy('hosting:login') def post(self, request, uidb64=None, token=None, *arg, **kwargs): @@ -114,7 +118,8 @@ class PasswordResetConfirmViewMixin(FormView): form = self.form_class(request.POST) - if user is not None and default_token_generator.check_token(user, token): + if user is not None and default_token_generator.check_token(user, + token): if form.is_valid(): new_password = form.cleaned_data['new_password2'] user.set_password(new_password) @@ -122,11 +127,13 @@ class PasswordResetConfirmViewMixin(FormView): messages.success(request, 'Password has been reset.') return self.form_valid(form) else: - messages.error(request, 'Password reset has not been successful.') + messages.error(request, + 'Password reset has not been successful.') form.add_error(None, 'Password reset has not been successful.') return self.form_invalid(form) else: - messages.error(request, 'The reset password link is no longer valid.') + messages.error(request, + 'The reset password link is no longer valid.') form.add_error(None, 'The reset password link is no longer valid.') return self.form_invalid(form) From 7d12eff9be0b675152ea236ab96f0bf101607b41 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 2 Sep 2017 16:50:09 +0530 Subject: [PATCH 33/77] Added translations and reformatted code --- hosting/locale/de/LC_MESSAGES/django.po | 11 ++- hosting/views.py | 115 ++++++++++++++---------- utils/views.py | 12 +-- 3 files changed, 83 insertions(+), 55 deletions(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index fc9f9765..8ee04632 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 10:50+0000\n" +"POT-Creation-Date: 2017-09-02 11:16+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -523,6 +523,15 @@ msgstr "Du kannst dich nun" msgid "Sorry. Your request is invalid." msgstr "Entschuldigung, deine Anfrage ist ungültig." +msgid "Password has been reset." +msgstr "" + +msgid "Password reset has not been successful." +msgstr "" + +msgid "The reset password link is no longer valid." +msgstr "" + msgid "Invalid credit card" msgstr "Ungültige Kreditkarte" diff --git a/hosting/views.py b/hosting/views.py index 08f0862e..a5743e44 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -1,40 +1,41 @@ import uuid -from django.core.files.base import ContentFile - -from oca.pool import WrongNameError, WrongIdError -from django.shortcuts import render -from django.http import Http404 -from django.core.urlresolvers import reverse_lazy, reverse -from django.contrib.auth.mixins import LoginRequiredMixin -from django.views.generic import View, CreateView, FormView, ListView, DetailView, \ - DeleteView, TemplateView, UpdateView -from django.http import HttpResponseRedirect -from django.contrib import messages from django.conf import settings -from django.shortcuts import redirect -from django.utils.http import urlsafe_base64_decode +from django.contrib import messages +from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.auth.tokens import default_token_generator - -from guardian.mixins import PermissionRequiredMixin -from stored_messages.settings import stored_messages_settings -from stored_messages.models import Message -from stored_messages.api import mark_read +from django.core.files.base import ContentFile +from django.core.urlresolvers import reverse_lazy, reverse +from django.http import Http404 +from django.http import HttpResponseRedirect +from django.shortcuts import redirect +from django.shortcuts import render +from django.utils.http import urlsafe_base64_decode from django.utils.safestring import mark_safe +from django.utils.translation import ugettext_lazy as _ +from django.views.generic import View, CreateView, FormView, ListView, \ + DetailView, \ + DeleteView, TemplateView, UpdateView +from guardian.mixins import PermissionRequiredMixin +from oca.pool import WrongNameError, WrongIdError +from stored_messages.api import mark_read +from stored_messages.models import Message +from stored_messages.settings import stored_messages_settings from membership.models import CustomUser, StripeCustomer -from utils.stripe_utils import StripeUtils -from utils.forms import BillingAddressForm, PasswordResetRequestForm, UserBillingAddressForm -from utils.views import PasswordResetViewMixin, PasswordResetConfirmViewMixin, LoginViewMixin -from utils.mailer import BaseEmail -from .models import HostingOrder, HostingBill, HostingPlan, UserHostingKey -from .forms import HostingUserSignupForm, HostingUserLoginForm, UserHostingKeyForm, generate_ssh_key_name -from .mixins import ProcessVMSelectionMixin - from opennebula_api.models import OpenNebulaManager from opennebula_api.serializers import VirtualMachineSerializer, \ VirtualMachineTemplateSerializer -from django.utils.translation import ugettext_lazy as _ +from utils.forms import BillingAddressForm, PasswordResetRequestForm, \ + UserBillingAddressForm +from utils.mailer import BaseEmail +from utils.stripe_utils import StripeUtils +from utils.views import PasswordResetViewMixin, PasswordResetConfirmViewMixin, \ + LoginViewMixin +from .forms import HostingUserSignupForm, HostingUserLoginForm, \ + UserHostingKeyForm, generate_ssh_key_name +from .mixins import ProcessVMSelectionMixin +from .models import HostingOrder, HostingBill, HostingPlan, UserHostingKey CONNECTION_ERROR = "Your VMs cannot be displayed at the moment due to a backend \ connection error. please try again in a few minutes." @@ -296,12 +297,13 @@ class PasswordResetConfirmView(PasswordResetConfirmViewMixin): form = self.form_class(request.POST) - if user is not None and default_token_generator.check_token(user, token): + if user is not None and default_token_generator.check_token(user, + token): if form.is_valid(): new_password = form.cleaned_data['new_password2'] user.set_password(new_password) user.save() - messages.success(request, 'Password has been reset.') + messages.success(request, _('Password has been reset.')) # Change opennebula password opennebula_client.change_user_password(new_password) @@ -309,14 +311,15 @@ class PasswordResetConfirmView(PasswordResetConfirmViewMixin): return self.form_valid(form) else: messages.error( - request, 'Password reset has not been successful.') - form.add_error(None, 'Password reset has not been successful.') + request, _('Password reset has not been successful.')) + form.add_error(None, + _('Password reset has not been successful.')) return self.form_invalid(form) else: - messages.error( - request, 'The reset password link is no longer valid.') - form.add_error(None, 'The reset password link is no longer valid.') + error_msg = _('The reset password link is no longer valid.') + messages.error(request, _(error_msg)) + form.add_error(None, error_msg) return self.form_invalid(form) @@ -397,7 +400,8 @@ class SSHKeyListView(LoginRequiredMixin, ListView): def render_to_response(self, context, **response_kwargs): if not self.queryset: return HttpResponseRedirect(reverse('hosting:choice_ssh_keys')) - return super(SSHKeyListView, self).render_to_response(context, **response_kwargs) + return super(SSHKeyListView, self).render_to_response(context, + **response_kwargs) class SSHKeyChoiceView(LoginRequiredMixin, View): @@ -571,8 +575,10 @@ class PaymentVMView(LoginRequiredMixin, FormView): if not customer: msg = _("Invalid credit card") messages.add_message( - self.request, messages.ERROR, msg, extra_tags='make_charge_error') - return HttpResponseRedirect(reverse('hosting:payment') + '#payment_error') + self.request, messages.ERROR, msg, + extra_tags='make_charge_error') + return HttpResponseRedirect( + reverse('hosting:payment') + '#payment_error') # Create Billing Address billing_address = form.save() @@ -586,8 +592,10 @@ class PaymentVMView(LoginRequiredMixin, FormView): 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') - return HttpResponseRedirect(reverse('hosting:payment') + '#payment_error') + self.request, messages.ERROR, msg, + extra_tags='make_charge_error') + return HttpResponseRedirect( + reverse('hosting:payment') + '#payment_error') charge = charge_response.get('response_object') @@ -595,7 +603,8 @@ class PaymentVMView(LoginRequiredMixin, FormView): manager = OpenNebulaManager(email=owner.email, password=owner.password) # Get user ssh key - if not UserHostingKey.objects.filter(user=self.request.user).exists(): + if not UserHostingKey.objects.filter( + user=self.request.user).exists(): context.update({ 'sshError': 'error', 'form': form @@ -647,7 +656,8 @@ class PaymentVMView(LoginRequiredMixin, FormView): context = { 'vm': vm, 'order': order, - 'base_url': "{0}://{1}".format(request.scheme, request.get_host()) + 'base_url': "{0}://{1}".format(request.scheme, + request.get_host()) } email_data = { @@ -661,13 +671,15 @@ class PaymentVMView(LoginRequiredMixin, FormView): email.send() return HttpResponseRedirect( - "{url}?{query_params}".format(url=reverse('hosting:orders', kwargs={'pk': order.id}), - query_params='page=payment')) + "{url}?{query_params}".format( + url=reverse('hosting:orders', kwargs={'pk': order.id}), + query_params='page=payment')) else: return self.form_invalid(form) -class OrdersHostingDetailView(PermissionRequiredMixin, LoginRequiredMixin, DetailView): +class OrdersHostingDetailView(PermissionRequiredMixin, LoginRequiredMixin, + DetailView): template_name = "hosting/order_detail.html" context_object_name = "order" login_url = reverse_lazy('hosting:login') @@ -775,7 +787,8 @@ class CreateVirtualMachinesView(LoginRequiredMixin, View): configuration_options = HostingPlan.get_serialized_configs() context = { - 'templates': VirtualMachineTemplateSerializer(templates, many=True).data, + 'templates': VirtualMachineTemplateSerializer(templates, + many=True).data, 'configuration_options': configuration_options, } except: @@ -846,7 +859,8 @@ class VirtualMachineView(LoginRequiredMixin, View): serializer = VirtualMachineSerializer(vm) context = { 'virtual_machine': serializer.data, - 'order': HostingOrder.objects.get(vm_id=serializer.data['vm_id']) + 'order': HostingOrder.objects.get( + vm_id=serializer.data['vm_id']) } except: pass @@ -877,7 +891,8 @@ class VirtualMachineView(LoginRequiredMixin, View): context = { 'vm': vm, - 'base_url': "{0}://{1}".format(self.request.scheme, self.request.get_host()) + 'base_url': "{0}://{1}".format(self.request.scheme, + self.request.get_host()) } email_data = { 'subject': 'Virtual machine plan canceled', @@ -897,7 +912,8 @@ class VirtualMachineView(LoginRequiredMixin, View): return HttpResponseRedirect(self.get_success_url()) -class HostingBillListView(PermissionRequiredMixin, LoginRequiredMixin, ListView): +class HostingBillListView(PermissionRequiredMixin, LoginRequiredMixin, + ListView): template_name = "hosting/bills.html" login_url = reverse_lazy('hosting:login') permission_required = ['view_hostingview'] @@ -907,7 +923,8 @@ class HostingBillListView(PermissionRequiredMixin, LoginRequiredMixin, ListView) ordering = '-id' -class HostingBillDetailView(PermissionRequiredMixin, LoginRequiredMixin, DetailView): +class HostingBillDetailView(PermissionRequiredMixin, LoginRequiredMixin, + DetailView): template_name = "hosting/bill_detail.html" login_url = reverse_lazy('hosting:login') permission_required = ['view_hostingview'] diff --git a/utils/views.py b/utils/views.py index 8198a01c..3150fa6d 100644 --- a/utils/views.py +++ b/utils/views.py @@ -124,16 +124,18 @@ class PasswordResetConfirmViewMixin(FormView): new_password = form.cleaned_data['new_password2'] user.set_password(new_password) user.save() - messages.success(request, 'Password has been reset.') + messages.success(request, _('Password has been reset.')) return self.form_valid(form) else: messages.error(request, - 'Password reset has not been successful.') - form.add_error(None, 'Password reset has not been successful.') + _('Password reset has not been successful.')) + form.add_error(None, + _('Password reset has not been successful.')) return self.form_invalid(form) else: messages.error(request, - 'The reset password link is no longer valid.') - form.add_error(None, 'The reset password link is no longer valid.') + _('The reset password link is no longer valid.')) + form.add_error(None, + _('The reset password link is no longer valid.')) return self.form_invalid(form) From 3b444b38b1d08ee9a2105723e2fa50701321e790 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 2 Sep 2017 16:53:49 +0530 Subject: [PATCH 34/77] Regenerated dcl django.po --- datacenterlight/locale/de/LC_MESSAGES/django.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/datacenterlight/locale/de/LC_MESSAGES/django.po b/datacenterlight/locale/de/LC_MESSAGES/django.po index cdffc92f..00391df9 100644 --- a/datacenterlight/locale/de/LC_MESSAGES/django.po +++ b/datacenterlight/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-09-02 07:47+0000\n" +"POT-Creation-Date: 2017-09-02 11:22+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -142,9 +142,9 @@ msgid "" "%(base_url)s%(activation_link)s\n" msgstr "" "\n" -"Klicke hier " -"um deinen Data Center Light Account zu aktivieren oder kopiere den folgenden " -"Link in die Adressleiste deines Browsers.
\n" +"Klicke hier um deinen Data " +"Center Light Account zu aktivieren oder kopiere den folgenden Link in die " +"Adressleiste deines Browsers.
\n" "%(base_url)s%(activation_link)s\n" #, python-format From 3a739f1cde47cdde1354af29a8c9f254da1836b3 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 2 Sep 2017 17:23:10 +0530 Subject: [PATCH 35/77] Added utils django.po --- utils/locale/de/LC_MESSAGES/django.po | 784 ++++++++++++++++++++++++++ 1 file changed, 784 insertions(+) create mode 100644 utils/locale/de/LC_MESSAGES/django.po diff --git a/utils/locale/de/LC_MESSAGES/django.po b/utils/locale/de/LC_MESSAGES/django.po new file mode 100644 index 00000000..cd1d7d1b --- /dev/null +++ b/utils/locale/de/LC_MESSAGES/django.po @@ -0,0 +1,784 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-09-02 11:50+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Andorra" +msgstr "" + +msgid "United Arab Emirates" +msgstr "" + +msgid "Afghanistan" +msgstr "" + +msgid "Antigua & Barbuda" +msgstr "" + +msgid "Anguilla" +msgstr "" + +msgid "Albania" +msgstr "" + +msgid "Armenia" +msgstr "" + +msgid "Netherlands Antilles" +msgstr "" + +msgid "Angola" +msgstr "" + +msgid "Antarctica" +msgstr "" + +msgid "Argentina" +msgstr "" + +msgid "American Samoa" +msgstr "" + +msgid "Austria" +msgstr "" + +msgid "Australia" +msgstr "" + +msgid "Aruba" +msgstr "" + +msgid "Azerbaijan" +msgstr "" + +msgid "Bosnia and Herzegovina" +msgstr "" + +msgid "Barbados" +msgstr "" + +msgid "Bangladesh" +msgstr "" + +msgid "Belgium" +msgstr "" + +msgid "Burkina Faso" +msgstr "" + +msgid "Bulgaria" +msgstr "" + +msgid "Bahrain" +msgstr "" + +msgid "Burundi" +msgstr "" + +msgid "Benin" +msgstr "" + +msgid "Bermuda" +msgstr "" + +msgid "Brunei Darussalam" +msgstr "" + +msgid "Bolivia" +msgstr "" + +msgid "Brazil" +msgstr "" + +msgid "Bahama" +msgstr "" + +msgid "Bhutan" +msgstr "" + +msgid "Bouvet Island" +msgstr "" + +msgid "Botswana" +msgstr "" + +msgid "Belarus" +msgstr "" + +msgid "Belize" +msgstr "" + +msgid "Canada" +msgstr "" + +msgid "Cocos (Keeling) Islands" +msgstr "" + +msgid "Central African Republic" +msgstr "" + +msgid "Congo" +msgstr "" + +msgid "Switzerland" +msgstr "" + +msgid "Ivory Coast" +msgstr "" + +msgid "Cook Iislands" +msgstr "" + +msgid "Chile" +msgstr "" + +msgid "Cameroon" +msgstr "" + +msgid "China" +msgstr "" + +msgid "Colombia" +msgstr "" + +msgid "Costa Rica" +msgstr "" + +msgid "Cuba" +msgstr "" + +msgid "Cape Verde" +msgstr "" + +msgid "Christmas Island" +msgstr "" + +msgid "Cyprus" +msgstr "" + +msgid "Czech Republic" +msgstr "" + +msgid "Germany" +msgstr "" + +msgid "Djibouti" +msgstr "" + +msgid "Denmark" +msgstr "" + +msgid "Dominica" +msgstr "" + +msgid "Dominican Republic" +msgstr "" + +msgid "Algeria" +msgstr "" + +msgid "Ecuador" +msgstr "" + +msgid "Estonia" +msgstr "" + +msgid "Egypt" +msgstr "" + +msgid "Western Sahara" +msgstr "" + +msgid "Eritrea" +msgstr "" + +msgid "Spain" +msgstr "" + +msgid "Ethiopia" +msgstr "" + +msgid "Finland" +msgstr "" + +msgid "Fiji" +msgstr "" + +msgid "Falkland Islands (Malvinas)" +msgstr "" + +msgid "Micronesia" +msgstr "" + +msgid "Faroe Islands" +msgstr "" + +msgid "France" +msgstr "" + +msgid "France, Metropolitan" +msgstr "" + +msgid "Gabon" +msgstr "" + +msgid "United Kingdom (Great Britain)" +msgstr "" + +msgid "Grenada" +msgstr "" + +msgid "Georgia" +msgstr "" + +msgid "French Guiana" +msgstr "" + +msgid "Ghana" +msgstr "" + +msgid "Gibraltar" +msgstr "" + +msgid "Greenland" +msgstr "" + +msgid "Gambia" +msgstr "" + +msgid "Guinea" +msgstr "" + +msgid "Guadeloupe" +msgstr "" + +msgid "Equatorial Guinea" +msgstr "" + +msgid "Greece" +msgstr "" + +msgid "South Georgia and the South Sandwich Islands" +msgstr "" + +msgid "Guatemala" +msgstr "" + +msgid "Guam" +msgstr "" + +msgid "Guinea-Bissau" +msgstr "" + +msgid "Guyana" +msgstr "" + +msgid "Hong Kong" +msgstr "" + +msgid "Heard & McDonald Islands" +msgstr "" + +msgid "Honduras" +msgstr "" + +msgid "Croatia" +msgstr "" + +msgid "Haiti" +msgstr "" + +msgid "Hungary" +msgstr "" + +msgid "Indonesia" +msgstr "" + +msgid "Ireland" +msgstr "" + +msgid "Israel" +msgstr "" + +msgid "India" +msgstr "" + +msgid "British Indian Ocean Territory" +msgstr "" + +msgid "Iraq" +msgstr "" + +msgid "Islamic Republic of Iran" +msgstr "" + +msgid "Iceland" +msgstr "" + +msgid "Italy" +msgstr "" + +msgid "Jamaica" +msgstr "" + +msgid "Jordan" +msgstr "" + +msgid "Japan" +msgstr "" + +msgid "Kenya" +msgstr "" + +msgid "Kyrgyzstan" +msgstr "" + +msgid "Cambodia" +msgstr "" + +msgid "Kiribati" +msgstr "" + +msgid "Comoros" +msgstr "" + +msgid "St. Kitts and Nevis" +msgstr "" + +msgid "Korea, Democratic People's Republic of" +msgstr "" + +msgid "Korea, Republic of" +msgstr "" + +msgid "Kuwait" +msgstr "" + +msgid "Cayman Islands" +msgstr "" + +msgid "Kazakhstan" +msgstr "" + +msgid "Lao People's Democratic Republic" +msgstr "" + +msgid "Lebanon" +msgstr "" + +msgid "Saint Lucia" +msgstr "" + +msgid "Liechtenstein" +msgstr "" + +msgid "Sri Lanka" +msgstr "" + +msgid "Liberia" +msgstr "" + +msgid "Lesotho" +msgstr "" + +msgid "Lithuania" +msgstr "" + +msgid "Luxembourg" +msgstr "" + +msgid "Latvia" +msgstr "" + +msgid "Libyan Arab Jamahiriya" +msgstr "" + +msgid "Morocco" +msgstr "" + +msgid "Monaco" +msgstr "" + +msgid "Moldova, Republic of" +msgstr "" + +msgid "Madagascar" +msgstr "" + +msgid "Marshall Islands" +msgstr "" + +msgid "Mali" +msgstr "" + +msgid "Mongolia" +msgstr "" + +msgid "Myanmar" +msgstr "" + +msgid "Macau" +msgstr "" + +msgid "Northern Mariana Islands" +msgstr "" + +msgid "Martinique" +msgstr "" + +msgid "Mauritania" +msgstr "" + +msgid "Monserrat" +msgstr "" + +msgid "Malta" +msgstr "" + +msgid "Mauritius" +msgstr "" + +msgid "Maldives" +msgstr "" + +msgid "Malawi" +msgstr "" + +msgid "Mexico" +msgstr "" + +msgid "Malaysia" +msgstr "" + +msgid "Mozambique" +msgstr "" + +msgid "Namibia" +msgstr "" + +msgid "New Caledonia" +msgstr "" + +msgid "Niger" +msgstr "" + +msgid "Norfolk Island" +msgstr "" + +msgid "Nigeria" +msgstr "" + +msgid "Nicaragua" +msgstr "" + +msgid "Netherlands" +msgstr "" + +msgid "Norway" +msgstr "" + +msgid "Nepal" +msgstr "" + +msgid "Nauru" +msgstr "" + +msgid "Niue" +msgstr "" + +msgid "New Zealand" +msgstr "" + +msgid "Oman" +msgstr "" + +msgid "Panama" +msgstr "" + +msgid "Peru" +msgstr "" + +msgid "French Polynesia" +msgstr "" + +msgid "Papua New Guinea" +msgstr "" + +msgid "Philippines" +msgstr "" + +msgid "Pakistan" +msgstr "" + +msgid "Poland" +msgstr "" + +msgid "St. Pierre & Miquelon" +msgstr "" + +msgid "Pitcairn" +msgstr "" + +msgid "Puerto Rico" +msgstr "" + +msgid "Portugal" +msgstr "" + +msgid "Palau" +msgstr "" + +msgid "Paraguay" +msgstr "" + +msgid "Qatar" +msgstr "" + +msgid "Reunion" +msgstr "" + +msgid "Romania" +msgstr "" + +msgid "Russian Federation" +msgstr "" + +msgid "Rwanda" +msgstr "" + +msgid "Saudi Arabia" +msgstr "" + +msgid "Solomon Islands" +msgstr "" + +msgid "Seychelles" +msgstr "" + +msgid "Sudan" +msgstr "" + +msgid "Sweden" +msgstr "" + +msgid "Singapore" +msgstr "" + +msgid "St. Helena" +msgstr "" + +msgid "Slovenia" +msgstr "" + +msgid "Svalbard & Jan Mayen Islands" +msgstr "" + +msgid "Slovakia" +msgstr "" + +msgid "Sierra Leone" +msgstr "" + +msgid "San Marino" +msgstr "" + +msgid "Senegal" +msgstr "" + +msgid "Somalia" +msgstr "" + +msgid "Suriname" +msgstr "" + +msgid "Sao Tome & Principe" +msgstr "" + +msgid "El Salvador" +msgstr "" + +msgid "Syrian Arab Republic" +msgstr "" + +msgid "Swaziland" +msgstr "" + +msgid "Turks & Caicos Islands" +msgstr "" + +msgid "Chad" +msgstr "" + +msgid "French Southern Territories" +msgstr "" + +msgid "Togo" +msgstr "" + +msgid "Thailand" +msgstr "" + +msgid "Tajikistan" +msgstr "" + +msgid "Tokelau" +msgstr "" + +msgid "Turkmenistan" +msgstr "" + +msgid "Tunisia" +msgstr "" + +msgid "Tonga" +msgstr "" + +msgid "East Timor" +msgstr "" + +msgid "Turkey" +msgstr "" + +msgid "Trinidad & Tobago" +msgstr "" + +msgid "Tuvalu" +msgstr "" + +msgid "Taiwan, Province of China" +msgstr "" + +msgid "Tanzania, United Republic of" +msgstr "" + +msgid "Ukraine" +msgstr "" + +msgid "Uganda" +msgstr "" + +msgid "United States Minor Outlying Islands" +msgstr "" + +msgid "United States of America" +msgstr "" + +msgid "Uruguay" +msgstr "" + +msgid "Uzbekistan" +msgstr "" + +msgid "Vatican City State (Holy See)" +msgstr "" + +msgid "St. Vincent & the Grenadines" +msgstr "" + +msgid "Venezuela" +msgstr "" + +msgid "British Virgin Islands" +msgstr "" + +msgid "United States Virgin Islands" +msgstr "" + +msgid "Viet Nam" +msgstr "" + +msgid "Vanuatu" +msgstr "" + +msgid "Wallis & Futuna Islands" +msgstr "" + +msgid "Samoa" +msgstr "" + +msgid "Yemen" +msgstr "" + +msgid "Mayotte" +msgstr "" + +msgid "Yugoslavia" +msgstr "" + +msgid "South Africa" +msgstr "" + +msgid "Zambia" +msgstr "" + +msgid "Zaire" +msgstr "" + +msgid "Zimbabwe" +msgstr "" + +msgid "Unknown or unspecified country" +msgstr "" + +msgid "Enter your name or company name" +msgstr "" + +msgid "Cardholder Name" +msgstr "" + +msgid "Street Address" +msgstr "" + +msgid "City" +msgstr "" + +msgid "Postal Code" +msgstr "" + +msgid "Country" +msgstr "" + +msgid "Street Building" +msgstr "" + +msgid "Name" +msgstr "" + +msgid "Email" +msgstr "" + +msgid "Phone number" +msgstr "" + +msgid "Message" +msgstr "" + +msgid "The link to reset your email has been sent to your email" +msgstr "Der Link zum Zurücksetzen Ihrer E-Mail wurde an Ihre E-Mail gesendet" + +msgid "Password Reset" +msgstr "" + +msgid "Password has been reset." +msgstr "" + +msgid "Password reset has not been successful." +msgstr "" + +msgid "The reset password link is no longer valid." +msgstr "" From e38df305c4284689749c3ae6c394649ad758c55d Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 2 Sep 2017 22:08:25 +0530 Subject: [PATCH 36/77] New VM email template updated --- hosting/locale/de/LC_MESSAGES/django.po | 31 +++- .../hosting/emails/new_booked_vm.html | 151 ++---------------- .../hosting/emails/new_booked_vm.txt | 150 ++--------------- hosting/views.py | 10 +- 4 files changed, 59 insertions(+), 283 deletions(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index 8ee04632..86af85f3 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 11:16+0000\n" +"POT-Creation-Date: 2017-09-02 15:26+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -193,6 +193,31 @@ msgstr "Meine Einstellungen" msgid "Support / Contact" msgstr "Support / Kontakt" +#, python-format +msgid "" +"You have ordered a new virtual machine!
\n" +"Your order of [%(vm.name)s] has been charged.

\n" +"You can view your invoice by clicking the button below.

\n" +msgstr "" +"Du hast eine neue virtuelle Maschine bestellt!
\n" +"Deine Bestellung von [%(vm.name)s] wurde erhoben.

\n" +"Um die Rechnung zu sehen, klicke auf den Button unten.

\n" + +msgid "View Invoice" +msgstr "Zur Rechnung" + +#, python-format +msgid "" +"You have ordered a new virtual machine!\n" +"Your order of [%(vm.name)s] has been charged.\n" +"\n" +"You can view your invoice by clicking the link below.\n" +"\n" +msgstr "" +"Du hast eine neue virtuelle Maschine bestellt!\n" +"Deine Bestellung von [%(vm.name)s] wurde erhoben.\n\n" +"Um die Rechnung zu sehen, klicke auf den Button unten.\n\n" + msgid "Password Reset" msgstr "Passwort zurücksetzen" @@ -535,6 +560,10 @@ msgstr "" msgid "Invalid credit card" msgstr "Ungültige Kreditkarte" +#, python-brace-format +msgid "Your New VM {vm_name} at Data Center Light" +msgstr "Deine neue VM {vm_name} bei Data Center Light" + msgid "Confirm Order" msgstr "Bestellung Bestätigen" diff --git a/hosting/templates/hosting/emails/new_booked_vm.html b/hosting/templates/hosting/emails/new_booked_vm.html index 0f9b4f6e..34a500bb 100644 --- a/hosting/templates/hosting/emails/new_booked_vm.html +++ b/hosting/templates/hosting/emails/new_booked_vm.html @@ -1,140 +1,13 @@ -{% load static from staticfiles %} - - - - - - -Oxygen Invoice - - - - - - - - - - - - - -
-
- - -
- -
- - - -
- logo - -
-
- -
-
-
-
- - - - - - - - - - -
- You have booked a virtual machine! -
- Your virtual machine {{vm.name}} subscription has been charged, -
- we are going to contact you as soon your virtual machine has been activated. -
- You can view your invoice clicking on the button below. -
-
-View Invoice +{% extends "datacenterlight/emails/base_email_datacenterlight.html" %} +{% load i18n %} +{% block email_head %}{{page_header}}{% endblock %} +{% block email_body %} +{% url 'hosting:orders' order.id as order_url %} +{% blocktrans %}You have ordered a new virtual machine!
+Your order of [{{vm.name}}] has been charged.

+You can view your invoice by clicking the button below.

+{% endblocktrans %} + -
-
-
-
- - -
- ungleich
-
-
-
- - - +{% endblock %} diff --git a/hosting/templates/hosting/emails/new_booked_vm.txt b/hosting/templates/hosting/emails/new_booked_vm.txt index 0f9b4f6e..1e7f8aac 100644 --- a/hosting/templates/hosting/emails/new_booked_vm.txt +++ b/hosting/templates/hosting/emails/new_booked_vm.txt @@ -1,140 +1,12 @@ -{% load static from staticfiles %} - - - - - - -Oxygen Invoice - - - - - - - - - - - - - -
-
- - -
- -
- - - -
- logo - -
-
- -
-
-
-
- - - - - - - - - - -
- You have booked a virtual machine! -
- Your virtual machine {{vm.name}} subscription has been charged, -
- we are going to contact you as soon your virtual machine has been activated. -
- You can view your invoice clicking on the button below. -
- -
-
-
-
- - -
- ungleich
-
-
-
- - +{% extends "datacenterlight/emails/base_email_datacenterlight.txt" %} +{% load i18n %} +{% block email_head %}{{page_header}}{% endblock %} +{% block email_body %} +{% blocktrans %}You have ordered a new virtual machine! +Your order of [{{vm.name}}] has been charged. +You can view your invoice by clicking the link below. + +{% endblocktrans %} +{{ base_url }}{{order_url}} +{% endblock %} diff --git a/hosting/views.py b/hosting/views.py index a5743e44..d24f18f9 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -652,16 +652,18 @@ class PaymentVMView(LoginRequiredMixin, FormView): vm = VirtualMachineSerializer(manager.get_vm(vm_id)).data - # Send notification to ungleich as soon as VM has been booked + # Send notification to the user as soon as VM has been booked context = { 'vm': vm, 'order': order, 'base_url': "{0}://{1}".format(request.scheme, - request.get_host()) - + request.get_host()), + 'page_header': _( + 'Your New VM {vm_name} at Data Center Light'.format( + vm_name=vm.name)) } email_data = { - 'subject': 'New VM request', + 'subject': context.get('page_header'), 'to': request.user.email, 'context': context, 'template_name': 'new_booked_vm', From b5120040d33b526d2be2dfbac9136e53c5dd0c1b Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 2 Sep 2017 22:47:31 +0530 Subject: [PATCH 37/77] Fixed an error and from address in new vm email template --- hosting/templates/hosting/emails/new_booked_vm.html | 2 +- hosting/templates/hosting/emails/new_booked_vm.txt | 2 +- hosting/views.py | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hosting/templates/hosting/emails/new_booked_vm.html b/hosting/templates/hosting/emails/new_booked_vm.html index 34a500bb..00430dd5 100644 --- a/hosting/templates/hosting/emails/new_booked_vm.html +++ b/hosting/templates/hosting/emails/new_booked_vm.html @@ -4,7 +4,7 @@ {% block email_body %} {% url 'hosting:orders' order.id as order_url %} {% blocktrans %}You have ordered a new virtual machine!
-Your order of [{{vm.name}}] has been charged.

+Your order of [{{vm|get_value_from_dict:'name'}}] has been charged.

You can view your invoice by clicking the button below.

{% endblocktrans %}
diff --git a/hosting/templates/hosting/emails/new_booked_vm.txt b/hosting/templates/hosting/emails/new_booked_vm.txt index 1e7f8aac..3c8b06ad 100644 --- a/hosting/templates/hosting/emails/new_booked_vm.txt +++ b/hosting/templates/hosting/emails/new_booked_vm.txt @@ -3,7 +3,7 @@ {% block email_head %}{{page_header}}{% endblock %} {% block email_body %} {% blocktrans %}You have ordered a new virtual machine! -Your order of [{{vm.name}}] has been charged. +Your order of [{{vm|get_value_from_dict:'name'}}] has been charged. You can view your invoice by clicking the link below. diff --git a/hosting/views.py b/hosting/views.py index d24f18f9..465b8419 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -660,14 +660,15 @@ class PaymentVMView(LoginRequiredMixin, FormView): request.get_host()), 'page_header': _( 'Your New VM {vm_name} at Data Center Light'.format( - vm_name=vm.name)) + vm_name=vm.get('name'))) } email_data = { 'subject': context.get('page_header'), 'to': request.user.email, 'context': context, 'template_name': 'new_booked_vm', - 'template_path': 'hosting/emails/' + 'template_path': 'hosting/emails/', + 'from_email': settings.DCL_SUPPORT_FROM_ADDRESS, } email = BaseEmail(**email_data) email.send() From 50431542f8cac7fbe24f9136329e428be829f0f6 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sat, 2 Sep 2017 20:42:58 +0200 Subject: [PATCH 38/77] Corrected getting VM name in template --- hosting/templates/hosting/emails/new_booked_vm.html | 5 +++-- hosting/templates/hosting/emails/new_booked_vm.txt | 4 ++-- hosting/views.py | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/hosting/templates/hosting/emails/new_booked_vm.html b/hosting/templates/hosting/emails/new_booked_vm.html index 00430dd5..864cf813 100644 --- a/hosting/templates/hosting/emails/new_booked_vm.html +++ b/hosting/templates/hosting/emails/new_booked_vm.html @@ -3,8 +3,9 @@ {% block email_head %}{{page_header}}{% endblock %} {% block email_body %} {% url 'hosting:orders' order.id as order_url %} -{% blocktrans %}You have ordered a new virtual machine!
-Your order of [{{vm|get_value_from_dict:'name'}}] has been charged.

+{% blocktrans with vm.name as vm_name %}You have ordered a new virtual machine! +
+Your order of [{{vm_name}}] has been charged.

You can view your invoice by clicking the button below.

{% endblocktrans %}
diff --git a/hosting/templates/hosting/emails/new_booked_vm.txt b/hosting/templates/hosting/emails/new_booked_vm.txt index 3c8b06ad..3e90569d 100644 --- a/hosting/templates/hosting/emails/new_booked_vm.txt +++ b/hosting/templates/hosting/emails/new_booked_vm.txt @@ -2,8 +2,8 @@ {% load i18n %} {% block email_head %}{{page_header}}{% endblock %} {% block email_body %} -{% blocktrans %}You have ordered a new virtual machine! -Your order of [{{vm|get_value_from_dict:'name'}}] has been charged. +{% blocktrans with vm.name as vm_name %}You have ordered a new virtual machine! +Your order of [{{vm_name}}] has been charged. You can view your invoice by clicking the link below. diff --git a/hosting/views.py b/hosting/views.py index 465b8419..128bd4db 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -668,7 +668,7 @@ class PaymentVMView(LoginRequiredMixin, FormView): 'context': context, 'template_name': 'new_booked_vm', 'template_path': 'hosting/emails/', - 'from_email': settings.DCL_SUPPORT_FROM_ADDRESS, + 'from_address': settings.DCL_SUPPORT_FROM_ADDRESS, } email = BaseEmail(**email_data) email.send() From 8f2655bda240e1a7e940f44b6a3f65ce710c2868 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sat, 2 Sep 2017 21:35:57 +0200 Subject: [PATCH 39/77] Getting vm name properly in hosting views --- hosting/locale/de/LC_MESSAGES/django.po | 23 +++++++++++++---------- hosting/views.py | 4 ++-- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index 86af85f3..4a837fcc 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 15:26+0000\n" +"POT-Creation-Date: 2017-09-02 19:31+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -195,12 +195,13 @@ msgstr "Support / Kontakt" #, python-format msgid "" -"You have ordered a new virtual machine!
\n" -"Your order of [%(vm.name)s] has been charged.

\n" +"You have ordered a new virtual machine!\n" +"
\n" +"Your order of [%(vm_name)s] has been charged.

\n" "You can view your invoice by clicking the button below.

\n" msgstr "" "Du hast eine neue virtuelle Maschine bestellt!
\n" -"Deine Bestellung von [%(vm.name)s] wurde erhoben.

\n" +"Deine Bestellung von [%(vm_name)s] wurde erhoben.

\n" "Um die Rechnung zu sehen, klicke auf den Button unten.

\n" msgid "View Invoice" @@ -209,14 +210,16 @@ msgstr "Zur Rechnung" #, python-format msgid "" "You have ordered a new virtual machine!\n" -"Your order of [%(vm.name)s] has been charged.\n" +"Your order of [%(vm_name)s] has been charged.\n" "\n" "You can view your invoice by clicking the link below.\n" "\n" msgstr "" "Du hast eine neue virtuelle Maschine bestellt!\n" -"Deine Bestellung von [%(vm.name)s] wurde erhoben.\n\n" -"Um die Rechnung zu sehen, klicke auf den Button unten.\n\n" +"Deine Bestellung von [%(vm_name)s] wurde erhoben.\n" +"\n" +"Um die Rechnung zu sehen, klicke auf den Button unten.\n" +"\n" msgid "Password Reset" msgstr "Passwort zurücksetzen" @@ -560,9 +563,9 @@ msgstr "" msgid "Invalid credit card" msgstr "Ungültige Kreditkarte" -#, python-brace-format -msgid "Your New VM {vm_name} at Data Center Light" -msgstr "Deine neue VM {vm_name} bei Data Center Light" +#, python-format +msgid "Your New VM %(vm_name)s at Data Center Light" +msgstr "Deine neue VM %(vm_name)s bei Data Center Light" msgid "Confirm Order" msgstr "Bestellung Bestätigen" diff --git a/hosting/views.py b/hosting/views.py index 128bd4db..92a40fac 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -659,8 +659,8 @@ class PaymentVMView(LoginRequiredMixin, FormView): 'base_url': "{0}://{1}".format(request.scheme, request.get_host()), 'page_header': _( - 'Your New VM {vm_name} at Data Center Light'.format( - vm_name=vm.get('name'))) + 'Your New VM %(vm_name)s at Data Center Light') % { + 'vm_name': vm.get('name')} } email_data = { 'subject': context.get('page_header'), From f041a4047d579167efec3176960e9572ad10d9a1 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sun, 3 Sep 2017 02:33:05 +0530 Subject: [PATCH 40/77] Started with VM cancellation template --- .../templates/hosting/emails/vm_canceled.html | 14 ++ ...vm_status_changed.html => vm_canceled.txt} | 0 .../hosting/emails/vm_status_changed.txt | 136 ------------------ hosting/views.py | 10 +- 4 files changed, 20 insertions(+), 140 deletions(-) create mode 100644 hosting/templates/hosting/emails/vm_canceled.html rename hosting/templates/hosting/emails/{vm_status_changed.html => vm_canceled.txt} (100%) delete mode 100644 hosting/templates/hosting/emails/vm_status_changed.txt diff --git a/hosting/templates/hosting/emails/vm_canceled.html b/hosting/templates/hosting/emails/vm_canceled.html new file mode 100644 index 00000000..8f10ccda --- /dev/null +++ b/hosting/templates/hosting/emails/vm_canceled.html @@ -0,0 +1,14 @@ +{% extends "datacenterlight/emails/base_email_datacenterlight.html" %} +{% load i18n %} +{% block email_head %}{{page_header}}{% endblock %} +{% block email_body %} +{% url 'hosting:virtual_machines' as my_virtual_machines_url %} +{% blocktrans with vm.name as vm_name %}You're receiving this mail because your virtual machine [{{vm_name}}] has been cancelled.
+You can see your order status by clicking [my VM page] below. +If you want to order a new virtual machine, you can do it by clicking this link []. + +Visit [my VM page] Now + +{% endblocktrans %} +{% endblock %} + diff --git a/hosting/templates/hosting/emails/vm_status_changed.html b/hosting/templates/hosting/emails/vm_canceled.txt similarity index 100% rename from hosting/templates/hosting/emails/vm_status_changed.html rename to hosting/templates/hosting/emails/vm_canceled.txt diff --git a/hosting/templates/hosting/emails/vm_status_changed.txt b/hosting/templates/hosting/emails/vm_status_changed.txt deleted file mode 100644 index c60ba661..00000000 --- a/hosting/templates/hosting/emails/vm_status_changed.txt +++ /dev/null @@ -1,136 +0,0 @@ -{% load static from staticfiles %} - - - - - - -Oxygen Invoice - - - - - - - - - - - - - -
-
- - -
- -
- - - -
- logo - -
-
- -
-
-
-
- - - - - - - - - - -
- Your virtual machine {{vm.name}} status has been updated to {{vm.get_status_display}} -
- You can manage your vm clicking on the button below -
- -
-
-
-
- - -
- ungleich
-
-
-
- - - diff --git a/hosting/views.py b/hosting/views.py index 92a40fac..ed72d8f6 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -895,14 +895,16 @@ class VirtualMachineView(LoginRequiredMixin, View): context = { 'vm': vm, 'base_url': "{0}://{1}".format(self.request.scheme, - self.request.get_host()) + self.request.get_host()), + 'page_header': _('Virtual Machine Cancellation') } email_data = { - 'subject': 'Virtual machine plan canceled', + 'subject': context['page_header'], 'to': self.request.user.email, 'context': context, - 'template_name': 'vm_status_changed', - 'template_path': 'hosting/emails/' + 'template_name': 'vm_canceled', + 'template_path': 'hosting/emails/', + 'from_address': settings.DCL_SUPPORT_FROM_ADDRESS, } email = BaseEmail(**email_data) email.send() From 0d4c40cfa23c0259400289cc9f9a2380b9d13fae Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 3 Sep 2017 12:44:42 +0200 Subject: [PATCH 41/77] Fixed missing trans tag in _footer.html --- hosting/templates/hosting/includes/_footer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosting/templates/hosting/includes/_footer.html b/hosting/templates/hosting/includes/_footer.html index 65177315..24f4cea6 100644 --- a/hosting/templates/hosting/includes/_footer.html +++ b/hosting/templates/hosting/includes/_footer.html @@ -1,5 +1,5 @@ {% load staticfiles %} - +{% load i18n %}
From a32c8ea46747b2932a7cedc518d03b4c464b4f18 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 3 Sep 2017 13:20:25 +0200 Subject: [PATCH 42/77] Corrected VM cancellation email templates --- .../templates/hosting/emails/vm_canceled.html | 8 +- .../templates/hosting/emails/vm_canceled.txt | 149 ++---------------- hosting/views.py | 3 +- 3 files changed, 18 insertions(+), 142 deletions(-) diff --git a/hosting/templates/hosting/emails/vm_canceled.html b/hosting/templates/hosting/emails/vm_canceled.html index 8f10ccda..e0f382cc 100644 --- a/hosting/templates/hosting/emails/vm_canceled.html +++ b/hosting/templates/hosting/emails/vm_canceled.html @@ -3,12 +3,10 @@ {% block email_head %}{{page_header}}{% endblock %} {% block email_body %} {% url 'hosting:virtual_machines' as my_virtual_machines_url %} +{% url 'hosting:orders' order.id as vm_order_url %} {% blocktrans with vm.name as vm_name %}You're receiving this mail because your virtual machine [{{vm_name}}] has been cancelled.
-You can see your order status by clicking [my VM page] below. -If you want to order a new virtual machine, you can do it by clicking this link []. - -Visit [my VM page] Now - +You can see your order status by clicking here.
+If you want to order a new virtual machine, you can do it by clicking this link.
{% endblocktrans %} {% endblock %} diff --git a/hosting/templates/hosting/emails/vm_canceled.txt b/hosting/templates/hosting/emails/vm_canceled.txt index c60ba661..81df786f 100644 --- a/hosting/templates/hosting/emails/vm_canceled.txt +++ b/hosting/templates/hosting/emails/vm_canceled.txt @@ -1,136 +1,13 @@ -{% load static from staticfiles %} - - - - - - -Oxygen Invoice - - - - - - - - - - - - - -
-
- - -
- -
- - - -
- logo - -
-
- -
-
-
-
- - - - - - - - - - -
- Your virtual machine {{vm.name}} status has been updated to {{vm.get_status_display}} -
- You can manage your vm clicking on the button below -
- -
-
-
-
- - -
- ungleich
-
-
-
- - - +{% extends "datacenterlight/emails/base_email_datacenterlight.txt" %} +{% load i18n %} +{% block email_head %}{{page_header}}{% endblock %} +{% block email_body %} +{% url 'hosting:virtual_machines' as my_virtual_machines_url %} +{% url 'hosting:orders' order.id as vm_order_url %} +{% blocktrans with vm.name as vm_name %}{% blocktrans with vm.name as vm_name %}You're receiving this mail because your virtual machine [{{vm_name}}] has been cancelled. +You can see your order status by clicking +{{base_url}}{{vm_order_url}} +If you want to order a new virtual machine, you can do it by clicking this link. +{{base_url}}{{my_virtual_machines_url}} +{% endblocktrans %} +{% endblock %} \ No newline at end of file diff --git a/hosting/views.py b/hosting/views.py index ed72d8f6..4856a0f1 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -891,9 +891,10 @@ class VirtualMachineView(LoginRequiredMixin, View): 'Error terminating VM %s' % (opennebula_vm_id) ) return HttpResponseRedirect(self.get_success_url()) - + order = HostingOrder.objects.filter(vm_id=vm.id).first() context = { 'vm': vm, + 'order': order, 'base_url': "{0}://{1}".format(self.request.scheme, self.request.get_host()), 'page_header': _('Virtual Machine Cancellation') From 43e4c021a7e37daad2c8bce9b5251d1603fa188a Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 3 Sep 2017 17:13:49 +0200 Subject: [PATCH 43/77] Removed order id from cancel vm email templates --- hosting/locale/de/LC_MESSAGES/django.po | 41 ++++++++++++++++++- .../templates/hosting/emails/vm_canceled.html | 7 +++- .../templates/hosting/emails/vm_canceled.txt | 4 +- hosting/views.py | 2 - 4 files changed, 47 insertions(+), 7 deletions(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index 4a837fcc..06e9a0df 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 19:31+0000\n" +"POT-Creation-Date: 2017-09-03 14:48+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -258,6 +258,42 @@ msgstr "" "dann ignoriere diese E-Mail.\n" "Dankeschön!\n" +#, python-format +msgid "" +"You're receiving this mail because your virtual machine [%(vm_name)s] has " +"been cancelled.
\n" +"You can see your order status by clicking [my VM page] below.
\n" +"If you want to order a new virtual machine, you can do it by clicking this link.
\n" +msgstr "" +"Du erhälst diese E-Mail, da deine virtuelle Maschine [%(vm_name)s] gekündigt " +"wurde.
\n" +"Um deinen Auftragsstatus zu sehen, klicke auf die [my VM page] unten.
\n" +"Falls du eine neue virtuelle Maschine bestellen möchtest, kannst du dies " +"tun, indem du diesen " +"Link klickst.
\n" + +msgid "My VM page" +msgstr "" + +#, python-format +msgid "" +"You're receiving this mail because your virtual machine [%(vm_name)s] has " +"been cancelled.\n" +"You can see your order status by clicking here\n" +"%(base_url)s%(vm_order_url)s\n" +"If you want to order a new virtual machine, you can do it by clicking this " +"link.\n" +"%(base_url)s%(my_virtual_machines_url)s\n" +msgstr "" +"Du erhälst diese E-Mail, da deine virtuelle Maschine [%(vm_name)s] gekündigt " +"wurde.\n" +"Um deinen Auftragsstatus zu sehen, klicke hier.\n" +"%(base_url)s%(vm_order_url)s\n" +"Falls du eine neue virtuelle Maschine bestellen möchtest, kannst du dies " +"tun, indem du diesen Link klickst.\n" +"%(base_url)s%(my_virtual_machines_url)s" + msgid "Don't have an account yet ? " msgstr "Besitzt du kein Benutzerkonto?" @@ -575,6 +611,9 @@ msgid "" "contact Data Center Light Support." msgstr "Kontaktiere den Data Center Light Support." +msgid "Virtual Machine Cancellation" +msgstr "VM Kündigung" + #~ msgid "Your SSH Keys" #~ msgstr "Deine SSH Keys" diff --git a/hosting/templates/hosting/emails/vm_canceled.html b/hosting/templates/hosting/emails/vm_canceled.html index e0f382cc..68c7b9fd 100644 --- a/hosting/templates/hosting/emails/vm_canceled.html +++ b/hosting/templates/hosting/emails/vm_canceled.html @@ -3,10 +3,13 @@ {% block email_head %}{{page_header}}{% endblock %} {% block email_body %} {% url 'hosting:virtual_machines' as my_virtual_machines_url %} -{% url 'hosting:orders' order.id as vm_order_url %} +{% url 'hosting:orders' as vm_orders_url %} {% blocktrans with vm.name as vm_name %}You're receiving this mail because your virtual machine [{{vm_name}}] has been cancelled.
-You can see your order status by clicking here.
+You can see your order status by clicking [my VM page] below.
If you want to order a new virtual machine, you can do it by clicking this link.
{% endblocktrans %} + {% endblock %} diff --git a/hosting/templates/hosting/emails/vm_canceled.txt b/hosting/templates/hosting/emails/vm_canceled.txt index 81df786f..e20e639c 100644 --- a/hosting/templates/hosting/emails/vm_canceled.txt +++ b/hosting/templates/hosting/emails/vm_canceled.txt @@ -4,8 +4,8 @@ {% block email_body %} {% url 'hosting:virtual_machines' as my_virtual_machines_url %} {% url 'hosting:orders' order.id as vm_order_url %} -{% blocktrans with vm.name as vm_name %}{% blocktrans with vm.name as vm_name %}You're receiving this mail because your virtual machine [{{vm_name}}] has been cancelled. -You can see your order status by clicking +{% blocktrans with vm.name as vm_name %}You're receiving this mail because your virtual machine [{{vm_name}}] has been cancelled. +You can see your order status by clicking here {{base_url}}{{vm_order_url}} If you want to order a new virtual machine, you can do it by clicking this link. {{base_url}}{{my_virtual_machines_url}} diff --git a/hosting/views.py b/hosting/views.py index 4856a0f1..68b21c6d 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -891,10 +891,8 @@ class VirtualMachineView(LoginRequiredMixin, View): 'Error terminating VM %s' % (opennebula_vm_id) ) return HttpResponseRedirect(self.get_success_url()) - order = HostingOrder.objects.filter(vm_id=vm.id).first() context = { 'vm': vm, - 'order': order, 'base_url': "{0}://{1}".format(self.request.scheme, self.request.get_host()), 'page_header': _('Virtual Machine Cancellation') From da4ca01524ed5c5e6d2478114cb452380e1af99c Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 3 Sep 2017 17:16:25 +0200 Subject: [PATCH 44/77] Fixed hosting django.po error --- hosting/locale/de/LC_MESSAGES/django.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index 06e9a0df..466faa92 100644 --- a/hosting/locale/de/LC_MESSAGES/django.po +++ b/hosting/locale/de/LC_MESSAGES/django.po @@ -292,7 +292,7 @@ msgstr "" "%(base_url)s%(vm_order_url)s\n" "Falls du eine neue virtuelle Maschine bestellen möchtest, kannst du dies " "tun, indem du diesen Link klickst.\n" -"%(base_url)s%(my_virtual_machines_url)s" +"%(base_url)s%(my_virtual_machines_url)s\n" msgid "Don't have an account yet ? " msgstr "Besitzt du kein Benutzerkonto?" From 52edb5466d0c194b694e6fe2cf4a2eb30e8669aa Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 3 Sep 2017 17:22:16 +0200 Subject: [PATCH 45/77] Added some translations in utils django.po --- utils/locale/de/LC_MESSAGES/django.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/locale/de/LC_MESSAGES/django.po b/utils/locale/de/LC_MESSAGES/django.po index cd1d7d1b..241cb875 100644 --- a/utils/locale/de/LC_MESSAGES/django.po +++ b/utils/locale/de/LC_MESSAGES/django.po @@ -736,10 +736,10 @@ msgid "Unknown or unspecified country" msgstr "" msgid "Enter your name or company name" -msgstr "" +msgstr "Geben Sie Ihren Namen oder der Ihrer Firma ein" msgid "Cardholder Name" -msgstr "" +msgstr "Name des Kartenbesitzer" msgid "Street Address" msgstr "" @@ -763,10 +763,10 @@ msgid "Email" msgstr "" msgid "Phone number" -msgstr "" +msgstr "Telefon" msgid "Message" -msgstr "" +msgstr "Nachricht" msgid "The link to reset your email has been sent to your email" msgstr "Der Link zum Zurücksetzen Ihrer E-Mail wurde an Ihre E-Mail gesendet" From f7129e0b235210ec7d9bd6af04bdc79b06eb83bc Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 3 Sep 2017 17:49:31 +0200 Subject: [PATCH 46/77] Removed an invalid quote from cancel email template --- hosting/locale/de/LC_MESSAGES/django.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index 466faa92..96ddda67 100644 --- a/hosting/locale/de/LC_MESSAGES/django.po +++ b/hosting/locale/de/LC_MESSAGES/django.po @@ -270,7 +270,7 @@ msgstr "" "wurde.
\n" "Um deinen Auftragsstatus zu sehen, klicke auf die [my VM page] unten.
\n" "Falls du eine neue virtuelle Maschine bestellen möchtest, kannst du dies " -"tun, indem du diesen " +"tun, indem du diesen " "Link klickst.
\n" msgid "My VM page" From d481737518424cadf6270b6c9ebc43014ed795ea Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 3 Sep 2017 18:17:25 +0200 Subject: [PATCH 47/77] Fixed subject of account activation email templates --- membership/models.py | 62 ++++++++++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 25 deletions(-) diff --git a/membership/models.py b/membership/models.py index 72b8073e..5d7c7b11 100644 --- a/membership/models.py +++ b/membership/models.py @@ -1,17 +1,19 @@ from datetime import datetime -from django.db import models -from django.utils.translation import ugettext_lazy as _ -from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, PermissionsMixin -from django.contrib.auth.hashers import make_password -from django.core.validators import RegexValidator -from django.contrib.sites.models import Site -from django.conf import settings -from django.utils.crypto import get_random_string -from utils.stripe_utils import StripeUtils -from utils.mailer import DigitalGlarusRegistrationMailer +from django.conf import settings +from django.contrib.auth.hashers import make_password +from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, \ + PermissionsMixin +from django.contrib.sites.models import Site from django.core.urlresolvers import reverse +from django.core.validators import RegexValidator +from django.db import models +from django.utils.crypto import get_random_string +from django.utils.translation import ugettext_lazy as _ + from utils.mailer import BaseEmail +from utils.mailer import DigitalGlarusRegistrationMailer +from utils.stripe_utils import StripeUtils REGISTRATION_MESSAGE = {'subject': "Validation mail", 'message': 'Please validate Your account under this link ' @@ -64,11 +66,13 @@ class CustomUser(AbstractBaseUser, PermissionsMixin): email = models.EmailField(unique=True) validated = models.IntegerField(choices=VALIDATED_CHOICES, default=0) - validation_slug = models.CharField(db_index=True, unique=True, max_length=50) + validation_slug = models.CharField(db_index=True, unique=True, + max_length=50) is_admin = models.BooleanField( _('staff status'), default=False, - help_text=_('Designates whether the user can log into this admin site.'), + help_text=_( + 'Designates whether the user can log into this admin site.'), ) objects = MyUserManager() @@ -77,28 +81,32 @@ class CustomUser(AbstractBaseUser, PermissionsMixin): REQUIRED_FIELDS = ['name', 'password'] @classmethod - def register(cls, name, password, email, app='digital_glarus', base_url=None, send_email=True): + def register(cls, name, password, email, app='digital_glarus', + base_url=None, send_email=True): user = cls.objects.filter(email=email).first() if not user: - user = cls.objects.create_user(name=name, email=email, password=password) + user = cls.objects.create_user(name=name, email=email, + password=password) if user: if app == 'digital_glarus': dg = DigitalGlarusRegistrationMailer(user.validation_slug) dg.send_mail(to=user.email) elif app == 'dcl': dcl_text = settings.DCL_TEXT - # not used - # dcl_from_address = settings.DCL_SUPPORT_FROM_ADDRESS user.is_active = False - if send_email is True: email_data = { - 'subject': str(_('Activate your ')) + dcl_text + str(_(' account')), + 'subject': '{dcl_text} {account_activation}'.format( + dcl_text=dcl_text, + account_activation=_('Account Activation') + ), 'from_address': settings.DCL_SUPPORT_FROM_ADDRESS, 'to': user.email, 'context': {'base_url': base_url, - 'activation_link': reverse('hosting:validate', - kwargs={'validate_slug': user.validation_slug}), + 'activation_link': reverse( + 'hosting:validate', + kwargs={ + 'validate_slug': user.validation_slug}), 'dcl_text': dcl_text }, 'template_name': 'user_activation', @@ -114,7 +122,8 @@ class CustomUser(AbstractBaseUser, PermissionsMixin): @classmethod def get_all_members(cls): - return cls.objects.filter(stripecustomer__membershiporder__isnull=False) + return cls.objects.filter( + stripecustomer__membershiporder__isnull=False) @classmethod def validate_url(cls, validation_slug): @@ -204,9 +213,11 @@ class CreditCards(models.Model): name = models.CharField(max_length=50) user_id = models.ForeignKey(CustomUser, on_delete=models.CASCADE) card_number = models.CharField(max_length=50) - expiry_date = models.CharField(max_length=50, validators=[RegexValidator(r'\d{2}\/\d{4}', _( - 'Use this pattern(MM/YYYY).'))]) - ccv = models.CharField(max_length=4, validators=[RegexValidator(r'\d{3,4}', _('Wrong CCV number.'))]) + expiry_date = models.CharField(max_length=50, validators=[ + RegexValidator(r'\d{2}\/\d{4}', _( + 'Use this pattern(MM/YYYY).'))]) + ccv = models.CharField(max_length=4, validators=[ + RegexValidator(r'\d{3,4}', _('Wrong CCV number.'))]) payment_type = models.CharField(max_length=5, default='N') def save(self, *args, **kwargs): @@ -221,7 +232,8 @@ class Calendar(models.Model): def __init__(self, *args, **kwargs): if kwargs.get('datebooked'): user = kwargs.get('user') - kwargs['datebooked'] = datetime.strptime(kwargs.get('datebooked', ''), '%d,%m,%Y') + kwargs['datebooked'] = datetime.strptime( + kwargs.get('datebooked', ''), '%d,%m,%Y') self.user_id = user.id super(Calendar, self).__init__(*args, **kwargs) From 7a4e0760ae3db33dbfd5f7c10a134e7e5ced3186 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 3 Sep 2017 18:47:42 +0200 Subject: [PATCH 48/77] Updated account activation txt email template --- .../locale/de/LC_MESSAGES/django.po | 30 +++++++++++++------ .../emails/user_activation.txt | 14 ++++----- 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/datacenterlight/locale/de/LC_MESSAGES/django.po b/datacenterlight/locale/de/LC_MESSAGES/django.po index 00391df9..24c6be5d 100644 --- a/datacenterlight/locale/de/LC_MESSAGES/django.po +++ b/datacenterlight/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-09-02 11:22+0000\n" +"POT-Creation-Date: 2017-09-03 16:44+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -149,16 +149,15 @@ msgstr "" #, python-format msgid "" -"\n" -"Hi,\n" -"\n" -"You can activate your %(dcl_text)s account by clicking here %(base_url)s" -"%(activation_link)s\n" +"You can activate your Data Center Light account by clicking here.\n" +"You can also copy and paste the following link into the address bar of your " +"browser\n" +"to activate your Data Center Light account.\n" +"%(base_url)s%(activation_link)s\n" msgstr "" "\n" -"Hallo,\n" -"\n" -"Du kannst deinen %(dcl_text)s Account aktivieren, indem du hier klickst " +"Klicke hier, um deinen Data Center Light Account zu aktivieren oder kopiere " +"den folgenden Link in die Adressleiste deines Browsers.\n" "%(base_url)s%(activation_link)s\n" msgid "Home" @@ -474,6 +473,19 @@ msgstr "ist kein gültiger Name" msgid "is not a proper email" msgstr "ist keine gültige E-Mailadresse" +#~ msgid "" +#~ "\n" +#~ "Hi,\n" +#~ "\n" +#~ "You can activate your %(dcl_text)s account by clicking here %(base_url)s" +#~ "%(activation_link)s\n" +#~ msgstr "" +#~ "\n" +#~ "Hallo,\n" +#~ "\n" +#~ "Du kannst deinen %(dcl_text)s Account aktivieren, indem du hier klickst " +#~ "%(base_url)s%(activation_link)s\n" + #~ msgid "Your" #~ msgstr "Dein" diff --git a/datacenterlight/templates/datacenterlight/emails/user_activation.txt b/datacenterlight/templates/datacenterlight/emails/user_activation.txt index bae6789a..84ec50a9 100644 --- a/datacenterlight/templates/datacenterlight/emails/user_activation.txt +++ b/datacenterlight/templates/datacenterlight/emails/user_activation.txt @@ -1,14 +1,10 @@ {% extends "datacenterlight/emails/base_email_datacenterlight.txt" %} -{% load static from staticfiles %} {% load i18n %} -{% block email_head %} -{{dcl_text}} {% trans 'Account Activation' %} -{% endblock %} - +{% block email_head %}{{dcl_text}} {% trans 'Account Activation' %}{% endblock %} {% block email_body %} -{% blocktrans %} -Hi, - -You can activate your {{dcl_text}} account by clicking here {{base_url}}{{activation_link}} +{% blocktrans %}You can activate your Data Center Light account by clicking here. +You can also copy and paste the following link into the address bar of your browser +to activate your Data Center Light account. +{{base_url}}{{activation_link}} {% endblocktrans %} {% endblock %} From a98832c6d324c5c5e74356c38be553ec1476f43e Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 3 Sep 2017 18:49:28 +0200 Subject: [PATCH 49/77] Fixed datacenterlight django.po --- datacenterlight/locale/de/LC_MESSAGES/django.po | 1 - 1 file changed, 1 deletion(-) diff --git a/datacenterlight/locale/de/LC_MESSAGES/django.po b/datacenterlight/locale/de/LC_MESSAGES/django.po index 24c6be5d..8c5b795f 100644 --- a/datacenterlight/locale/de/LC_MESSAGES/django.po +++ b/datacenterlight/locale/de/LC_MESSAGES/django.po @@ -155,7 +155,6 @@ msgid "" "to activate your Data Center Light account.\n" "%(base_url)s%(activation_link)s\n" msgstr "" -"\n" "Klicke hier, um deinen Data Center Light Account zu aktivieren oder kopiere " "den folgenden Link in die Adressleiste deines Browsers.\n" "%(base_url)s%(activation_link)s\n" From 8ac8b25d78e34c8a1a34ac5aad27010275f5e205 Mon Sep 17 00:00:00 2001 From: PCoder Date: Mon, 4 Sep 2017 12:32:53 +0530 Subject: [PATCH 50/77] Updated new vm email template --- hosting/locale/de/LC_MESSAGES/django.po | 10 +++------- hosting/templates/hosting/emails/new_booked_vm.txt | 5 ++--- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index 96ddda67..e0b74f50 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-03 14:48+0000\n" +"POT-Creation-Date: 2017-09-04 06:59+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -211,15 +211,11 @@ msgstr "Zur Rechnung" msgid "" "You have ordered a new virtual machine!\n" "Your order of [%(vm_name)s] has been charged.\n" -"\n" -"You can view your invoice by clicking the link below.\n" -"\n" +"You can view your invoice here.\n" msgstr "" "Du hast eine neue virtuelle Maschine bestellt!\n" "Deine Bestellung von [%(vm_name)s] wurde erhoben.\n" -"\n" -"Um die Rechnung zu sehen, klicke auf den Button unten.\n" -"\n" +"Um die Rechnung zu sehen, klicke hier.\n" msgid "Password Reset" msgstr "Passwort zurücksetzen" diff --git a/hosting/templates/hosting/emails/new_booked_vm.txt b/hosting/templates/hosting/emails/new_booked_vm.txt index 3e90569d..b8e3eed1 100644 --- a/hosting/templates/hosting/emails/new_booked_vm.txt +++ b/hosting/templates/hosting/emails/new_booked_vm.txt @@ -2,11 +2,10 @@ {% load i18n %} {% block email_head %}{{page_header}}{% endblock %} {% block email_body %} +{% url 'hosting:orders' order.id as order_url %} {% blocktrans with vm.name as vm_name %}You have ordered a new virtual machine! Your order of [{{vm_name}}] has been charged. - -You can view your invoice by clicking the link below. - +You can view your invoice here. {% endblocktrans %} {{ base_url }}{{order_url}} {% endblock %} From f84b95e38568721e9bac940810d3b0d10ca2de03 Mon Sep 17 00:00:00 2001 From: PCoder Date: Mon, 4 Sep 2017 22:27:59 +0530 Subject: [PATCH 51/77] Added some translations --- hosting/locale/de/LC_MESSAGES/django.po | 10 +++++++++- hosting/views.py | 9 ++++++--- utils/locale/de/LC_MESSAGES/django.po | 8 ++++---- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index e0b74f50..fb46fc75 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-04 06:59+0000\n" +"POT-Creation-Date: 2017-09-04 16:54+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -602,6 +602,10 @@ msgstr "Deine neue VM %(vm_name)s bei Data Center Light" msgid "Confirm Order" msgstr "Bestellung Bestätigen" +msgid "In order to create a VM, you need to create/upload your SSH KEY first." +msgstr "" +"Um eine VM zu erstellen musst du zuerst einen SSH-Key erstellen / hochladen." + msgid "" "We could not find the requested VM. Please " "contact Data Center Light Support." @@ -610,6 +614,10 @@ msgstr "Kontaktiere den Data Center Light Support." msgid "Virtual Machine Cancellation" msgstr "VM Kündigung" +#, python-format +msgid "VM %(VM_ID)s terminated successfully" +msgstr "VM %(VM_ID)s erfolgreich beendet" + #~ msgid "Your SSH Keys" #~ msgstr "Deine SSH Keys" diff --git a/hosting/views.py b/hosting/views.py index 68b21c6d..0538d43e 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -712,7 +712,8 @@ class OrdersHostingDetailView(PermissionRequiredMixin, LoginRequiredMixin, context['error'] = 'WrongIdError' except ConnectionRefusedError: messages.error(self.request, - 'In order to create a VM, you need to create/upload your SSH KEY first.' + _( + 'In order to create a VM, you need to create/upload your SSH KEY first.') ) return context @@ -780,7 +781,8 @@ class CreateVirtualMachinesView(LoginRequiredMixin, View): if not UserHostingKey.objects.filter(user=self.request.user).exists(): messages.success( request, - 'In order to create a VM, you need to create/upload your SSH KEY first.' + _( + 'In order to create a VM, you need to create/upload your SSH KEY first.') ) return HttpResponseRedirect(reverse('hosting:ssh_keys')) @@ -910,7 +912,8 @@ class VirtualMachineView(LoginRequiredMixin, View): messages.error( request, - 'VM %s terminated successfully' % (opennebula_vm_id) + _('VM %(VM_ID)s terminated successfully') % { + 'VM_ID': opennebula_vm_id} ) return HttpResponseRedirect(self.get_success_url()) diff --git a/utils/locale/de/LC_MESSAGES/django.po b/utils/locale/de/LC_MESSAGES/django.po index 241cb875..fdc21502 100644 --- a/utils/locale/de/LC_MESSAGES/django.po +++ b/utils/locale/de/LC_MESSAGES/django.po @@ -769,16 +769,16 @@ msgid "Message" msgstr "Nachricht" msgid "The link to reset your email has been sent to your email" -msgstr "Der Link zum Zurücksetzen Ihrer E-Mail wurde an Ihre E-Mail gesendet" +msgstr "Der Link zum Zur?cksetzen deines Passwortes wurde an deine E-Mail gesendet" msgid "Password Reset" msgstr "" msgid "Password has been reset." -msgstr "" +msgstr "Das Passwort wurde zur?ckgesetzt." msgid "Password reset has not been successful." -msgstr "" +msgstr "Das Zur?cksetzen war nicht erfolgreich." msgid "The reset password link is no longer valid." -msgstr "" +msgstr "Der Link zum Zur?cksetzen deines Passwortes ist nicht l?nger g?ltig." From 5d3f355c361f954cc9cd8f7089d344e12c6a6ee4 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Tue, 5 Sep 2017 01:51:53 +0530 Subject: [PATCH 52/77] 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 53/77] 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 54/77] 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 55/77] 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 56/77] 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 57/77] 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 59/77] 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 60/77] 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 61/77] 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 62/77] 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 63/77] 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 64/77] 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 65/77] 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 66/77] 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 67/77] 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 68/77] 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 69/77] 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 %}