From d2beef203257436b67ed6f351735f19d6f0e4a8b Mon Sep 17 00:00:00 2001 From: Andrii Marynets Date: Thu, 3 Aug 2017 00:24:16 +0300 Subject: [PATCH 01/33] Add parameter to function for TravisCI --- membership/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/membership/models.py b/membership/models.py index a84d12ca..6b6f4413 100644 --- a/membership/models.py +++ b/membership/models.py @@ -19,7 +19,7 @@ REGISTRATION_MESSAGE = {'subject': "Validation mail", 'from': 'test@test.com'} -def get_anonymous_user_instance(): +def get_anonymous_user_instance(CustomUser): return CustomUser(name='Anonymous', email='anonymous@ungleich.ch', validation_slug=make_password(None)) From 34acf2310b484920b6dd93fca030d88030128ad8 Mon Sep 17 00:00:00 2001 From: Siarhei Puhach Date: Thu, 3 Aug 2017 12:47:34 +0300 Subject: [PATCH 02/33] Added stripe failed payment error handler --- datacenterlight/views.py | 4 ++++ hosting/templates/hosting/payment.html | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index 10e2d791..7dd2a76f 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -426,6 +426,10 @@ class OrderConfirmationView(DetailView): customer = StripeCustomer.objects.filter(id=stripe_customer_id).first() stripe_utils = StripeUtils() card_details = stripe_utils.get_card_details(customer.stripe_id, request.session.get('token')) + if not card_details.get('response_object') and not card_details.get('paid'): + msg = _('Currently its not possible to make payments. Please try later.') + messages.add_message(self.request, messages.ERROR, msg, extra_tags='failed_payment') + return HttpResponseRedirect(reverse('datacenterlight:payment')) context = { 'site_url': reverse('datacenterlight:index'), 'cc_last4': card_details.get('response_object').get('last4'), diff --git a/hosting/templates/hosting/payment.html b/hosting/templates/hosting/payment.html index d03713c1..5ef7f1ce 100644 --- a/hosting/templates/hosting/payment.html +++ b/hosting/templates/hosting/payment.html @@ -49,6 +49,15 @@ +
+ {% for message in messages %} + {% if 'failed_payment' in message.tags %} +
  • +

    {{ message|safe }}

    +
+ {% endif %} + {% endfor %} +
From 60d107baeeba504a4e7a621847f1d62478c0562b Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Thu, 3 Aug 2017 15:07:36 +0200 Subject: [PATCH 03/33] Improved the condition about when to generate ssh keys --- hosting/forms.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hosting/forms.py b/hosting/forms.py index c2b86e3e..d9812995 100644 --- a/hosting/forms.py +++ b/hosting/forms.py @@ -14,7 +14,6 @@ def generate_ssh_key_name(): class HostingUserLoginForm(forms.Form): - email = forms.CharField(widget=forms.EmailInput()) password = forms.CharField(widget=forms.PasswordInput()) @@ -45,7 +44,6 @@ class HostingUserLoginForm(forms.Form): class HostingUserSignupForm(forms.ModelForm): - confirm_password = forms.CharField(widget=forms.PasswordInput()) password = forms.CharField(widget=forms.PasswordInput()) @@ -88,9 +86,8 @@ class UserHostingKeyForm(forms.ModelForm): def clean(self): cleaned_data = self.cleaned_data - if not self.cleaned_data.get('name', ''): + if 'generate' in self.request.POST: self.cleaned_data['name'] = generate_ssh_key_name() - if not cleaned_data.get('public_key'): private_key, public_key = UserHostingKey.generate_keys() cleaned_data.update({ 'private_key': private_key, From 29fb771afb3aa787d0fec7203f4cde0a1c8f50ff Mon Sep 17 00:00:00 2001 From: Siarhei Puhach Date: Fri, 4 Aug 2017 11:01:32 +0300 Subject: [PATCH 04/33] Changed payment error place, changed message source to Stripe errors handler --- datacenterlight/views.py | 2 +- hosting/templates/hosting/payment.html | 32 ++++++++++++++------------ 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index 7dd2a76f..993cb508 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -427,7 +427,7 @@ class OrderConfirmationView(DetailView): stripe_utils = StripeUtils() card_details = stripe_utils.get_card_details(customer.stripe_id, request.session.get('token')) if not card_details.get('response_object') and not card_details.get('paid'): - msg = _('Currently its not possible to make payments. Please try later.') + msg = card_details.get('error') messages.add_message(self.request, messages.ERROR, msg, extra_tags='failed_payment') return HttpResponseRedirect(reverse('datacenterlight:payment')) context = { diff --git a/hosting/templates/hosting/payment.html b/hosting/templates/hosting/payment.html index 5ef7f1ce..acb5d389 100644 --- a/hosting/templates/hosting/payment.html +++ b/hosting/templates/hosting/payment.html @@ -49,15 +49,6 @@
-
- {% for message in messages %} - {% if 'failed_payment' in message.tags %} -
  • -

    {{ message|safe }}

    -
- {% endif %} - {% endfor %} -
@@ -139,12 +130,23 @@
-

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

+ {% if not messages %} +

+ {% 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' in message.tags %} +
  • +

    {{ message|safe }}

    +
+ {% endif %} + {% endfor %} +
From 8769c4cd1f6106ab7526be17e3c256bd28529374 Mon Sep 17 00:00:00 2001 From: Siarhei Puhach Date: Fri, 4 Aug 2017 12:38:24 +0300 Subject: [PATCH 05/33] Changed payment error message style --- hosting/static/hosting/css/landing-page.css | 6 +++++- hosting/templates/hosting/payment.html | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/hosting/static/hosting/css/landing-page.css b/hosting/static/hosting/css/landing-page.css index a7d69094..49471bc8 100644 --- a/hosting/static/hosting/css/landing-page.css +++ b/hosting/static/hosting/css/landing-page.css @@ -537,6 +537,10 @@ a.unlink:hover { border-radius: 3px; padding: 5px; } +.card-warning-error { + border: 1px solid #EB4D5C; + color: #EB4D5C; +} .stripe-payment-btn { outline: none; @@ -718,4 +722,4 @@ a.unlink:hover { .footer-light a:hover, .footer-light a:focus, .footer-light a:active { color: #ddd; -} \ No newline at end of file +} diff --git a/hosting/templates/hosting/payment.html b/hosting/templates/hosting/payment.html index acb5d389..ac9ab41b 100644 --- a/hosting/templates/hosting/payment.html +++ b/hosting/templates/hosting/payment.html @@ -138,11 +138,11 @@ {% endblocktrans %}

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

    {{ message|safe }}

    +

    {{ message|safe }}

{% endif %} {% endfor %} From c6b23f6aa0dcacb6e0f3b75ada4bcc12f7c25924 Mon Sep 17 00:00:00 2001 From: PCoder Date: Fri, 4 Aug 2017 20:54:28 +0530 Subject: [PATCH 06/33] Added get_object method to verify if the user is the owner of the ssh key --- hosting/views.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hosting/views.py b/hosting/views.py index 19ec5b2a..33477b50 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -342,6 +342,13 @@ class SSHKeyDeleteView(LoginRequiredMixin, DeleteView): success_url = reverse_lazy('hosting:ssh_keys') model = UserHostingKey + def get_object(self, queryset=None): + """ Hook to ensure object is owned by request.user. """ + obj = super(SSHKeyDeleteView, self).get_object() + if not obj.owner == self.request.user: + raise Http404 + return obj + def delete(self, request, *args, **kwargs): owner = self.request.user manager = OpenNebulaManager() From d85afd56e083c1da1a30001338fccb3343af5fd2 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Fri, 4 Aug 2017 17:49:35 +0200 Subject: [PATCH 07/33] Fixed an issue - Changed owner -> user - Reformatted code --- hosting/views.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/hosting/views.py b/hosting/views.py index 33477b50..f5fbd0a7 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -210,9 +210,9 @@ class SignupValidateView(TemplateView): def get_context_data(self, **kwargs): context = super(SignupValidateView, self).get_context_data(**kwargs) login_url = '' + str(_('login')) + '' + reverse('hosting:login') + '">' + str(_('login')) + '' home_url = 'Data Center Light' + reverse('datacenterlight:index') + '">Data Center Light' message = '{signup_success_message} {lurl} \
{go_back} {hurl}.'.format( signup_success_message=_( @@ -234,7 +234,7 @@ class SignupValidatedView(SignupValidateView): context = super(SignupValidateView, self).get_context_data(**kwargs) validated = CustomUser.validate_url(self.kwargs['validate_slug']) login_url = '' + str(_('login')) + '' + reverse('hosting:login') + '">' + str(_('login')) + '' section_title = _('Account activation') if validated: message = '{account_activation_string}
{login_string} {lurl}.'.format( @@ -244,7 +244,7 @@ class SignupValidatedView(SignupValidateView): lurl=login_url) else: home_url = 'Data Center Light' + reverse('datacenterlight:index') + '">Data Center Light' message = '{sorry_message}
{go_back_to} {hurl}'.format( sorry_message=_("Sorry. Your request is invalid."), go_back_to=_('Go back to'), @@ -343,9 +343,11 @@ class SSHKeyDeleteView(LoginRequiredMixin, DeleteView): model = UserHostingKey def get_object(self, queryset=None): - """ Hook to ensure object is owned by request.user. """ + """ Hook to ensure UserHostingKey object is owned by request.user. + We reply with a Http404 if the user is not the owner of the key. + """ obj = super(SSHKeyDeleteView, self).get_object() - if not obj.owner == self.request.user: + if not obj.user == self.request.user: raise Http404 return obj From 4de04b2663c47d5e367e84570faf39288e49ae5e Mon Sep 17 00:00:00 2001 From: Siarhei Puhach Date: Mon, 7 Aug 2017 09:56:57 +0300 Subject: [PATCH 08/33] Changed visa card error placement --- hosting/templates/hosting/payment.html | 6 ++++-- utils/stripe_utils.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hosting/templates/hosting/payment.html b/hosting/templates/hosting/payment.html index 41c6d3eb..449962a5 100644 --- a/hosting/templates/hosting/payment.html +++ b/hosting/templates/hosting/payment.html @@ -59,7 +59,6 @@ {% csrf_token %} {% bootstrap_field field show_label=False type='fields'%} {% endfor %} - {% bootstrap_form_errors form type='non_fields'%}
@@ -130,7 +129,7 @@
- {% if not messages %} + {% if not messages and not form.errors %}

{% blocktrans %} You are not making any payment yet. After submitting your card @@ -146,6 +145,9 @@ {% endif %} {% endfor %} + {% if form.errors %} + {% bootstrap_form_errors form type='non_fields'%} + {% endif %}

diff --git a/utils/stripe_utils.py b/utils/stripe_utils.py index d46cf54d..f7d52157 100644 --- a/utils/stripe_utils.py +++ b/utils/stripe_utils.py @@ -11,7 +11,7 @@ def handleStripeError(f): 'error': None } - common_message = "Currently its not possible to make payments." + common_message = "Currently it's not possible to make payments." try: response_object = f(*args, **kwargs) response = { From 4fea099b5d8cba24e6a39a35a3a38961e4db9a5b Mon Sep 17 00:00:00 2001 From: Siarhei Puhach Date: Mon, 7 Aug 2017 10:05:12 +0300 Subject: [PATCH 09/33] Changed invalid credit card error style --- hosting/templates/hosting/payment.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hosting/templates/hosting/payment.html b/hosting/templates/hosting/payment.html index 449962a5..cb7a4d8c 100644 --- a/hosting/templates/hosting/payment.html +++ b/hosting/templates/hosting/payment.html @@ -145,8 +145,13 @@ {% endif %} {% endfor %} + {% if form.errors %} - {% bootstrap_form_errors form type='non_fields'%} + {% for error in form.non_field_errors %} +

+ {{ error|escape }} +

+ {% endfor %} {% endif %}
From 4cd3d6a4aada182b3d88ec7a6f6e2743278a7754 Mon Sep 17 00:00:00 2001 From: Siarhei Puhach Date: Mon, 7 Aug 2017 13:36:21 +0300 Subject: [PATCH 10/33] Added stripe make_charge error handler --- datacenterlight/views.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index dcf64814..d82522e9 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -467,15 +467,12 @@ class OrderConfirmationView(DetailView): stripe_utils = StripeUtils() charge_response = stripe_utils.make_charge(amount=final_price, customer=customer.stripe_id) - charge = charge_response.get('response_object') # Check if the payment was approved - if not charge: - context = {} - context.update({ - 'paymentError': charge_response.get('error') - }) - return render(request, self.payment_template_name, context) + if not charge_response.get('response_object') and not charge_response.get('paid'): + msg = charge_response.get('error') + messages.add_message(self.request, messages.ERROR, msg, extra_tags='make_charge_error') + return HttpResponseRedirect(reverse('datacenterlight:payment')) charge = charge_response.get('response_object') From a71ccbc56615d2f8370d912ae8e4702b261144ed Mon Sep 17 00:00:00 2001 From: Siarhei Puhach Date: Mon, 7 Aug 2017 17:02:47 +0300 Subject: [PATCH 11/33] Added error hash in url, added payment error handler to hosting/views --- datacenterlight/views.py | 4 +- hosting/templates/hosting/payment.html | 57 ++++++++++++++------------ hosting/views.py | 11 ++--- 3 files changed, 37 insertions(+), 35 deletions(-) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index d82522e9..b20b212f 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -441,7 +441,7 @@ class OrderConfirmationView(DetailView): if not card_details.get('response_object') and not card_details.get('paid'): msg = card_details.get('error') messages.add_message(self.request, messages.ERROR, msg, extra_tags='failed_payment') - return HttpResponseRedirect(reverse('datacenterlight:payment')) + return HttpResponseRedirect(reverse('datacenterlight:payment') + '#dcl_payment_error') context = { 'site_url': reverse('datacenterlight:index'), @@ -472,7 +472,7 @@ class OrderConfirmationView(DetailView): if not charge_response.get('response_object') and not charge_response.get('paid'): msg = charge_response.get('error') messages.add_message(self.request, messages.ERROR, msg, extra_tags='make_charge_error') - return HttpResponseRedirect(reverse('datacenterlight:payment')) + return HttpResponseRedirect(reverse('datacenterlight:payment') + '#dcl_payment_error') charge = charge_response.get('response_object') diff --git a/hosting/templates/hosting/payment.html b/hosting/templates/hosting/payment.html index cb7a4d8c..4c4ffa62 100644 --- a/hosting/templates/hosting/payment.html +++ b/hosting/templates/hosting/payment.html @@ -85,13 +85,29 @@
-

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

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

{% blocktrans %} You are not making any payment yet. After submitting your card @@ -137,22 +153,20 @@ {% endblocktrans %}

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

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

- {{ error|escape }} -

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

+ {{ error|escape }} +

+ {% endfor %}
@@ -168,15 +182,6 @@

- {% if paymentError %} -
-
-

- {% bootstrap_alert paymentError alert_type='danger' %} -

-
-
- {% endif %} {% endif %} diff --git a/hosting/views.py b/hosting/views.py index 19ec5b2a..d1666b04 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -557,15 +557,12 @@ class PaymentVMView(LoginRequiredMixin, FormView): stripe_utils = StripeUtils() charge_response = stripe_utils.make_charge(amount=final_price, customer=customer.stripe_id) - charge = charge_response.get('response_object') # Check if the payment was approved - if not charge: - context.update({ - 'paymentError': charge_response.get('error'), - 'form': form - }) - return render(request, self.template_name, context) + if not charge_response.get('response_object') and not charge_response.get('paid'): + msg = charge_response.get('error') + messages.add_message(self.request, messages.ERROR, msg, extra_tags='make_charge_error') + return HttpResponseRedirect(reverse('hosting:payment') + '#hosting_payment_error') charge = charge_response.get('response_object') From 72ddfd96ab0fad277a1471ba3c723c6c5ff4fc45 Mon Sep 17 00:00:00 2001 From: Siarhei Puhach Date: Mon, 7 Aug 2017 17:23:58 +0300 Subject: [PATCH 12/33] Payment error was unified --- datacenterlight/views.py | 4 ++-- hosting/templates/hosting/payment.html | 4 ++-- hosting/views.py | 7 ++++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index b20b212f..929b0833 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -441,7 +441,7 @@ class OrderConfirmationView(DetailView): if not card_details.get('response_object') and not card_details.get('paid'): msg = card_details.get('error') messages.add_message(self.request, messages.ERROR, msg, extra_tags='failed_payment') - return HttpResponseRedirect(reverse('datacenterlight:payment') + '#dcl_payment_error') + return HttpResponseRedirect(reverse('datacenterlight:payment') + '#payment_error') context = { 'site_url': reverse('datacenterlight:index'), @@ -472,7 +472,7 @@ class OrderConfirmationView(DetailView): if not charge_response.get('response_object') and not charge_response.get('paid'): msg = charge_response.get('error') messages.add_message(self.request, messages.ERROR, msg, extra_tags='make_charge_error') - return HttpResponseRedirect(reverse('datacenterlight:payment') + '#dcl_payment_error') + return HttpResponseRedirect(reverse('datacenterlight:payment') + '#payment_error') charge = charge_response.get('response_object') diff --git a/hosting/templates/hosting/payment.html b/hosting/templates/hosting/payment.html index 4c4ffa62..7bf84645 100644 --- a/hosting/templates/hosting/payment.html +++ b/hosting/templates/hosting/payment.html @@ -93,7 +93,7 @@ {% endblocktrans %}

{% endif %} -
+
{% for message in messages %} {% if 'failed_payment' or 'make_charge_error' in message.tags %}
  • @@ -153,7 +153,7 @@ {% endblocktrans %}

    {% endif %} -
    +
    {% for message in messages %} {% if 'failed_payment' or 'make_charge_error' in message.tags %}
    • diff --git a/hosting/views.py b/hosting/views.py index d1666b04..c5877ca2 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -547,8 +547,9 @@ class PaymentVMView(LoginRequiredMixin, FormView): customer = StripeCustomer.get_or_create(email=owner.email, token=token) if not customer: - form.add_error("__all__", "Invalid credit card") - return self.render_to_response(self.get_context_data(form=form)) + msg = _("Invalid credit card") + messages.add_message(self.request, messages.ERROR, msg, extra_tags='make_charge_error') + return HttpResponseRedirect(reverse('hosting:payment') + '#payment_error') # Create Billing Address billing_address = form.save() @@ -562,7 +563,7 @@ class PaymentVMView(LoginRequiredMixin, FormView): if not charge_response.get('response_object') and not charge_response.get('paid'): msg = charge_response.get('error') messages.add_message(self.request, messages.ERROR, msg, extra_tags='make_charge_error') - return HttpResponseRedirect(reverse('hosting:payment') + '#hosting_payment_error') + return HttpResponseRedirect(reverse('hosting:payment') + '#payment_error') charge = charge_response.get('response_object') From 6c4e0067ba8269f7606fdfa35cb46e36b4e9e5df Mon Sep 17 00:00:00 2001 From: ARvind Tiwari Date: Tue, 8 Aug 2017 00:35:58 +0530 Subject: [PATCH 13/33] font-family changed to 'Lato' in all css files --- .../datacenterlight/css/landing-page.css | 52 +++++++++++------- hosting/static/hosting/css/commons.css | 3 +- hosting/static/hosting/css/landing-page.css | 19 ++++--- hosting/static/hosting/css/pricing.css | 2 +- hosting/static/hosting/css/user_keys.css | 53 ++++++++++--------- 5 files changed, 77 insertions(+), 52 deletions(-) diff --git a/datacenterlight/static/datacenterlight/css/landing-page.css b/datacenterlight/static/datacenterlight/css/landing-page.css index 6c813661..c693247c 100755 --- a/datacenterlight/static/datacenterlight/css/landing-page.css +++ b/datacenterlight/static/datacenterlight/css/landing-page.css @@ -4,10 +4,10 @@ * For details, see http://www.apache.org/licenses/LICENSE-2.0. */ -@font-face { +/*@font-face { font-family: 'Lato-Light'; src: url('../fonts/Lato/Lato-Light.ttf'); -} +}*/ body, html { @@ -22,7 +22,12 @@ h3, h4, h5, h6 { - font-family: 'Lato-Light', sans-serif; + /*font-family: 'Lato-Light', sans-serif;*/ + font-family: 'Lato', sans-serif; + font-weight: 300; +} + +button, input, optgroup, select, textarea { font-weight: 300; } @@ -143,13 +148,15 @@ h6 { .navbar-default .navbar-nav>li>a { cursor: pointer; - font-family: 'Lato-Light', sans-serif; + /*font-family: 'Lato-Light', sans-serif;*/ + font-weight: 300; } .navbar-transparent .navbar-nav>li>a { color: #fff; cursor: pointer; - font-family: 'Lato-Light', sans-serif; + /*font-family: 'Lato-Light', sans-serif;*/ + font-weight: 300; } .navbar-transparent .navbar-nav>li>a:hover { @@ -202,13 +209,15 @@ h6 { .navbar-transparent .nav-language .select-language { color: #fff; - font-family: 'Lato-Light', sans-serif; + /*font-family: 'Lato-Light', sans-serif;*/ + font-weight: 300; } .nav-language .select-language span { margin-left: 5px; margin-right: 5px; - font-family: 'Lato', sans-serif; + /*font-family: 'Lato', sans-serif;*/ + font-weight: normal; } .nav-language .drop-language{ /*position: absolute;*/ @@ -237,7 +246,8 @@ h6 { .nav-language .drop-language a{ cursor: pointer; padding: 5px 10px !important; - font-family: 'Lato-Light', sans-serif; + /*font-family: 'Lato-Light', sans-serif;*/ + font-weight: 300; } /* Show the dropdown menu on hover */ @@ -260,7 +270,8 @@ h6 { .navbar-transparent .nav-language .drop-language a { color: #fff; padding: 5px 10px !important; - font-family: 'Lato-Light', sans-serif; + /*font-family: 'Lato-Light', sans-serif;*/ + font-weight: 300; } /* .nav-language:hover .drop-language{ display: block; @@ -343,7 +354,7 @@ h6 { .intro-message>h1 { margin: 0; - font-weight: 400; + font-weight: 300; font-size: 6em; } @@ -792,7 +803,8 @@ tech-sub-sec h2 { } .percent-text { - font-family: 'Lato', sans-serif; + /*font-family: 'Lato', sans-serif;*/ +/* font-weight: normal; */ font-size: 50px; color: #999; } @@ -879,7 +891,7 @@ tech-sub-sec h2 { .dropdown-menu>li>a { font-size: 13px; font-weight: 300; - font-family: 'Lato-Light', sans-serif; + /*font-family: 'Lato-Light', sans-serif;*/ } .navbar-default .navbar-nav>.active>a, @@ -898,7 +910,8 @@ tech-sub-sec h2 { background: -webkit-linear-gradient(top, #f0f4f7, #fff) no-repeat; background: linear-gradient(to bottom, #f0f4f7, #fff) no-repeat; display: flex; - font-family: 'Lato', sans-serif; + /*font-family: 'Lato', sans-serif;*/ +/* font-weight: normal; */ } .price-calc-section .text { @@ -963,7 +976,8 @@ tech-sub-sec h2 { } .price-calc-section .card .title h3 { - font-family: 'Lato', sans-serif; + /*font-family: 'Lato', sans-serif;*/ + font-weight: normal; } .price-calc-section .card .price { @@ -1050,8 +1064,9 @@ tech-sub-sec h2 { .price-calc-section .card .description.input label { font-size: 15px; - font-weight: 800; - font-family: 'Lato'; + font-weight: 700; + /*font-weight: 800;*/ + /*font-family: 'Lato';*/ margin-bottom: 0; width: 40px; } @@ -1364,7 +1379,8 @@ tech-sub-sec h2 { padding: 30px; } .percent-text { - font-family: 'Lato'; + /*font-family: 'Lato';*/ + font-weight: normal; font-size: 37px; /* text-align: center; */ } @@ -1402,7 +1418,7 @@ tech-sub-sec h2 { .network-name { text-transform: uppercase; font-size: 14px; - font-weight: 400; + font-weight: 300; letter-spacing: 2px; } diff --git a/hosting/static/hosting/css/commons.css b/hosting/static/hosting/css/commons.css index 79053e4e..2dd5637a 100644 --- a/hosting/static/hosting/css/commons.css +++ b/hosting/static/hosting/css/commons.css @@ -115,7 +115,8 @@ line-height: 1.42857143; font-size: 25px; padding: 0; - font-family: 'Lato', sans-serif; + /*font-family: 'Lato', sans-serif;*/ + font-weight: normal; } .modal-text { padding-top: 15px; diff --git a/hosting/static/hosting/css/landing-page.css b/hosting/static/hosting/css/landing-page.css index d17ef8f2..ee9fea36 100644 --- a/hosting/static/hosting/css/landing-page.css +++ b/hosting/static/hosting/css/landing-page.css @@ -4,7 +4,7 @@ * For details, see http://www.apache.org/licenses/LICENSE-2.0. */ -@font-face { +/*@font-face { font-family: 'Lato-Regular'; src: url('../fonts/Lato/Lato-Regular.ttf'); } @@ -16,7 +16,7 @@ @font-face { font-family: 'Lato-Light'; src: url('../fonts/Lato/Lato-Light.ttf'); -} +}*/ body, html { @@ -31,7 +31,8 @@ h3, h4, h5, h6 { - font-family: 'Lato-Regular', sans-serif; + /*font-family: 'Lato-Regular', sans-serif;*/ + font-family: 'Lato', sans-serif; font-weight: 300; } @@ -53,7 +54,8 @@ h6 { .navbar-transparent .navbar-nav>li>a { color: #fff; cursor: pointer; - font-family: 'Lato-Regular', sans-serif; + /*font-family: 'Lato-Regular', sans-serif;*/ + font-weight: normal; } .navbar-transparent .navbar-nav>li>a:hover { color: #fff; @@ -376,7 +378,8 @@ h6 { text-align: center; font-size: 18px; line-height: 30px; - font-family: 'Lato' !important; + /*font-family: 'Lato' !important;*/ + font-weight: normal !important; } .sign-up-message a { @@ -488,7 +491,8 @@ a.unlink:hover { /***** DCL payment page **********/ .dcl-order-container { - font-family: Lato; + /*font-family: Lato;*/ + font-weight: normal; } .dcl-order-table-header { @@ -547,7 +551,8 @@ a.unlink:hover { } .card-warning-content { - font-family: Lato; + /*font-family: Lato;*/ + font-weight: normal; border: 1px solid #a1a1a1; border-radius: 3px; padding: 5px; diff --git a/hosting/static/hosting/css/pricing.css b/hosting/static/hosting/css/pricing.css index 8eba7ffa..3c952209 100644 --- a/hosting/static/hosting/css/pricing.css +++ b/hosting/static/hosting/css/pricing.css @@ -9,7 +9,7 @@ font-size: 14px; padding-left: 0; margin-bottom: 30px; - font-family: 'Lato'; + font-family: Lato, sans-serif; } diff --git a/hosting/static/hosting/css/user_keys.css b/hosting/static/hosting/css/user_keys.css index 77a12155..a3d4526a 100644 --- a/hosting/static/hosting/css/user_keys.css +++ b/hosting/static/hosting/css/user_keys.css @@ -1,6 +1,6 @@ /* ssh_keys_choice */ .h1-thin { - font-family: Lato, sans-serif; + /*font-family: Lato, sans-serif;*/ font-weight: 300; font-size: 32px; } @@ -10,12 +10,12 @@ } .dashboard-choice-container .page-header p { font-size: 16px; - font-family: Lato, sans-serif; + /*font-family: Lato, sans-serif;*/ font-weight: 300; } .dashboard-choice-container h2 { - font-family: Lato, sans-serif; - font-weight: 400; + /*font-family: Lato, sans-serif; + font-weight: 400;*/ font-size: 22px; margin-top: 0; } @@ -26,7 +26,7 @@ } .choice-container p{ font-size: 18px; - font-family: Lato, sans-serif; + /*font-family: Lato, sans-serif;*/ font-weight: 300; } .choice-container-top { @@ -119,7 +119,7 @@ color: #717274; font-size: 16px; font-weight: 300; - font-family: 'Lato'; + /*font-family: 'Lato';*/ } .borderless tbody:before { @@ -195,7 +195,8 @@ border-bottom: 1px solid grey; box-shadow: none; border-radius: 0; - font-family: 'Lato-Light', sans-serif; + /*font-family: 'Lato-Light', sans-serif;*/ + font-weight: 300; font-size: 20px; padding-left: 0; } @@ -203,57 +204,58 @@ .form_key_name::-webkit-input-placeholder{ font-size: 20px; font-weight:100; - font-family: 'Lato-Light', sans-serif; + /*font-family: 'Lato-Light', sans-serif;*/ + font-weight: 300; } .form_key_name::-moz-input-placeholder{ font-size: 20px; - font-weight:200; - font-family: 'Lato-Light', sans-serif; + /*font-family: 'Lato-Light', sans-serif;*/ + font-weight: 300; } .form_key_name:-moz-input-placeholder{ - font-family: 'Lato-Light', sans-serif; + /*font-family: 'Lato-Light', sans-serif;*/ + font-weight: 300; font-size: 20px; - font-weight:200; } .form_key_name:-ms-input-placeholder { font-size: 20px; - font-family: 'Lato-Light', sans-serif; - font-weight:200; + /*font-family: 'Lato-Light', sans-serif;*/ + font-weight: 300; } .form_public_key::-webkit-input-placeholder{ position: relative; top: 110px; font-size: 20px; - font-weight: 200; - font-family: 'Lato-Light', sans-serif; + /*font-family: 'Lato-Light', sans-serif;*/ + font-weight: 300; } .form_public_key::-moz-input-placeholder{ position: relative; top: 110px; font-size: 20px; - font-family: 'Lato-Light', sans-serif; - font-weight:200; + /*font-family: 'Lato-Light', sans-serif;*/ + font-weight: 300; } .form_public_key:-moz-input-placeholder{ position: relative; top: 110px; font-size: 20px; - font-weight:200; - font-family: 'Lato-Light', sans-serif; + /*font-family: 'Lato-Light', sans-serif;*/ + font-weight: 300; } .form_public_key:-ms-input-placeholder { position: relative; top: 110px; font-size: 20px; - font-weight:200; - font-family: 'Lato-Light', sans-serif; + /*font-family: 'Lato-Light', sans-serif;*/ + font-weight: 300; } .underform-contaner{ margin-bottom: 20px; @@ -273,7 +275,8 @@ } } .underform-contaner h4{ - font-family: 'Lato-Light', sans-serif; + /*font-family: 'Lato-Light', sans-serif;*/ + font-weight: 300; } .underform-contaner button{ /* font-family: Lato; */ @@ -287,9 +290,9 @@ color: #fff; } .control-label{ - font-family: 'Lato-Light', sans-serif; + /*font-family: 'Lato-Light', sans-serif;*/ + font-weight: 300; font-size: 20px; - font-weight:200; } .form-ssh h3{ margin-bottom: 40px; From cc58c494573b4f49abe866257b6125cbff3cfdbb Mon Sep 17 00:00:00 2001 From: ARvind Tiwari Date: Tue, 8 Aug 2017 00:51:54 +0530 Subject: [PATCH 14/33] font-weight fix in hosting app --- hosting/static/hosting/css/landing-page.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hosting/static/hosting/css/landing-page.css b/hosting/static/hosting/css/landing-page.css index ee9fea36..600ee20c 100644 --- a/hosting/static/hosting/css/landing-page.css +++ b/hosting/static/hosting/css/landing-page.css @@ -33,7 +33,7 @@ h5, h6 { /*font-family: 'Lato-Regular', sans-serif;*/ font-family: 'Lato', sans-serif; - font-weight: 300; + /*font-weight: 300;*/ } .topnav { @@ -379,7 +379,7 @@ h6 { font-size: 18px; line-height: 30px; /*font-family: 'Lato' !important;*/ - font-weight: normal !important; + font-weight: 300 !important; } .sign-up-message a { @@ -492,7 +492,7 @@ a.unlink:hover { /***** DCL payment page **********/ .dcl-order-container { /*font-family: Lato;*/ - font-weight: normal; + font-weight: 300; } .dcl-order-table-header { @@ -552,7 +552,7 @@ a.unlink:hover { .card-warning-content { /*font-family: Lato;*/ - font-weight: normal; + font-weight: 300; border: 1px solid #a1a1a1; border-radius: 3px; padding: 5px; From ac0787bdd597979830bd9fbdbe27d04f3237e34f Mon Sep 17 00:00:00 2001 From: ARvind Tiwari Date: Tue, 8 Aug 2017 23:01:19 +0530 Subject: [PATCH 15/33] modal title font-weight and capitalization fix --- hosting/locale/de/LC_MESSAGES/django.po | 2 +- hosting/static/hosting/css/commons.css | 5 ++++- hosting/templates/hosting/user_keys.html | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hosting/locale/de/LC_MESSAGES/django.po b/hosting/locale/de/LC_MESSAGES/django.po index 0e777a19..4b886cae 100644 --- a/hosting/locale/de/LC_MESSAGES/django.po +++ b/hosting/locale/de/LC_MESSAGES/django.po @@ -393,7 +393,7 @@ msgstr "" msgid "Delete SSH Key" msgstr "SSH Key löschen" -msgid "Do You want to delete this key?" +msgid "Do you want to delete this key?" msgstr "Möchtest Du den Schlüssel löschen?" msgid "Show" diff --git a/hosting/static/hosting/css/commons.css b/hosting/static/hosting/css/commons.css index 2dd5637a..2b147f8b 100644 --- a/hosting/static/hosting/css/commons.css +++ b/hosting/static/hosting/css/commons.css @@ -110,13 +110,16 @@ font-weight: 100; color: #999; } +.modal-body .modal-icon { + margin-bottom: 10px; +} .modal-title { margin: 0; line-height: 1.42857143; font-size: 25px; padding: 0; /*font-family: 'Lato', sans-serif;*/ - font-weight: normal; + font-weight: 300; } .modal-text { padding-top: 15px; diff --git a/hosting/templates/hosting/user_keys.html b/hosting/templates/hosting/user_keys.html index 2125bd9f..dcb04c83 100644 --- a/hosting/templates/hosting/user_keys.html +++ b/hosting/templates/hosting/user_keys.html @@ -50,7 +50,7 @@