From aaf3bc18d81015daef5c18816410c979e2c41e1e Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Wed, 6 Sep 2017 00:12:13 +0530 Subject: [PATCH] landing_payment all sections arranged --- .../datacenterlight/landing_payment.html | 35 +++++++++++++++---- datacenterlight/views.py | 4 ++- hosting/static/hosting/css/landing-page.css | 7 ++++ 3 files changed, 39 insertions(+), 7 deletions(-) diff --git a/datacenterlight/templates/datacenterlight/landing_payment.html b/datacenterlight/templates/datacenterlight/landing_payment.html index 2a3f500c..64cc5728 100644 --- a/datacenterlight/templates/datacenterlight/landing_payment.html +++ b/datacenterlight/templates/datacenterlight/landing_payment.html @@ -15,10 +15,23 @@
- +
+

{%trans "Log in" %}

+
+

{% blocktrans %}Already signed up?
By logging in you can retrieve saved billing information.{% endblocktrans %}

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

{%trans "Your Order" %}


@@ -45,18 +58,28 @@
-
-
-

{%trans "Billing Address"%}

+
+
+

{%trans "Sign up"%}


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

{%trans "Credit Card"%}


diff --git a/datacenterlight/views.py b/datacenterlight/views.py index 39ec50b7..24f8cd74 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -12,6 +12,7 @@ from django.views.generic import FormView, CreateView, TemplateView, DetailView from datacenterlight.tasks import create_vm_task from hosting.models import HostingOrder +from hosting.forms import HostingUserLoginForm from membership.models import CustomUser, StripeCustomer from opennebula_api.models import OpenNebulaManager from opennebula_api.serializers import VirtualMachineTemplateSerializer, \ @@ -428,7 +429,8 @@ class PaymentOrderView(FormView): context = super(PaymentOrderView, self).get_context_data(**kwargs) context.update({ 'stripe_key': settings.STRIPE_API_PUBLIC_KEY, - 'site_url': reverse('datacenterlight:index') + 'site_url': reverse('datacenterlight:index'), + 'login_form': HostingUserLoginForm() }) return context diff --git a/hosting/static/hosting/css/landing-page.css b/hosting/static/hosting/css/landing-page.css index b84d6177..586179e5 100644 --- a/hosting/static/hosting/css/landing-page.css +++ b/hosting/static/hosting/css/landing-page.css @@ -859,3 +859,10 @@ a.list-group-item-danger.active:focus { .panel-danger > .panel-heading .badge { background-color: #eb4d5c; } + +/* landing page payment new style */ +.dcl-payment-section { + max-width: 400px; + margin: auto; + padding: 30px; +} \ No newline at end of file