From 2ead42bd1abc4aec69a633092be5141069479c3d Mon Sep 17 00:00:00 2001 From: Henry Bravo Date: Mon, 5 Jun 2017 15:35:48 -0500 Subject: [PATCH 1/2] Add input fields (email, name) in Calculator (Pricing page) and Sucess page --- .../locale/de/LC_MESSAGES/django.mo | Bin 4037 -> 4165 bytes .../locale/de/LC_MESSAGES/django.po | 37 +++-- .../datacenterlight/css/landing-page.css | 32 ++++- .../templates/datacenterlight/pricing.html | 12 +- .../templates/datacenterlight/success.html | 134 ++++++++++++++++++ datacenterlight/urls.py | 3 +- datacenterlight/views.py | 3 + 7 files changed, 206 insertions(+), 15 deletions(-) create mode 100644 datacenterlight/templates/datacenterlight/success.html diff --git a/datacenterlight/locale/de/LC_MESSAGES/django.mo b/datacenterlight/locale/de/LC_MESSAGES/django.mo index 8f4d30cd34bb8896e79ae7ba48b8cf312815cf33..60da107cbaf6e3917d7c2ab95d50e9e88cd3b6aa 100644 GIT binary patch delta 931 zcmX}qO=uHA6u|LG(~qPzwZ@Mc+uDh>mujQ^l130E+CoJM1#3OnLq3Ld>1HFzMp1+y zc<4z5Pxa`>P3R$Fy(vmO^y)O|9v@;me!>p?f?c?U7x5>KVX{@J9$Z2G)LkCC@E&&J19Wf=!x(Dw_oHp9 zrqY{EhO0X{wS0DV)YM_Tef@!sj@S>v#gU@Hj?E@&eDI zeC|g_&F|rHRen5?pKANON~wszwXe!~f*comKKiDKBxI*#)BBo;7@Wk>;1 zTnll8h!Jv)GUR$>9Q5&uXKJYfJh|5YLylF3bUozF{09f&{YYg+t!j{RW zh>)Y!L_aY=aGR>$A6y8Il*)Nij_Y)_tX-2S>RXm=>s-lkGdWk^E>-nSE2B*@W7+j= z`=3DPsnL^DdTi?S_(Z)B>J9`_k9)d?>+9jZ)}_2%4Y05d5kW8cwMk%uV}e?ZrL%8mu+VBGU>GC=&PojwVb@Xt^OtwY54~k Ci*(@t delta 836 zcmZwFOGs346vy#%XPj|n)N!)3d|x%go-$*jASmS&0H! z$tDx(U<;o*JUkI5d_$I2=HKH@T*gQE4=1sMr*LbZP=$X(?Z6^Fz*W41akfkId8Bz8 zLNzqzo!(60J0@OXB_3lrR?yxyHY3HGQx+yl;AOsNQ0v=p4ttTD_7hdm3O3*`)K2}y z9^ApZ=(VKH?s4-Nf8zp@+os7bpW!&ZMK&g=UhjyGrHRnPFAy49e}&++ux6r$P?s7y z9*yb{s|xjkF4WoCQ1u$Bz9qN|FBBYf8bR$$BSEdf(AIKdL5G^)H8Gc{BkBnqk!ADl zaGzUv{o>`5xmmZZP#Cyw_x)6~5cR*t_ncJzcCN$Cc6H}E{f~*XQ+eL{zRyi1t^Rtl Kw#Xk%A2}!T$V_nn diff --git a/datacenterlight/locale/de/LC_MESSAGES/django.po b/datacenterlight/locale/de/LC_MESSAGES/django.po index 45629dab..014a31d9 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-05-23 17:26-0500\n" +"POT-Creation-Date: 2017-06-05 15:23-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -67,6 +67,7 @@ msgstr "Vielen Dank!" #: templates/datacenterlight/index.html:62 #: templates/datacenterlight/pricing.html:62 +#: templates/datacenterlight/success.html:62 msgid "What is it" msgstr "Was ist es?" @@ -74,7 +75,8 @@ msgstr "Was ist es?" #: templates/datacenterlight/index.html:171 #: templates/datacenterlight/index.html:331 #: templates/datacenterlight/pricing.html:65 -#: templates/datacenterlight/pricing.html:188 +#: templates/datacenterlight/pricing.html:198 +#: templates/datacenterlight/success.html:65 msgid "Scale out" msgstr "Skalierung" @@ -82,19 +84,22 @@ msgstr "Skalierung" #: templates/datacenterlight/index.html:197 #: templates/datacenterlight/index.html:334 #: templates/datacenterlight/pricing.html:68 -#: templates/datacenterlight/pricing.html:191 +#: templates/datacenterlight/pricing.html:201 +#: templates/datacenterlight/success.html:68 msgid "Reliable and light" msgstr "Zuverlässig und leicht" #: templates/datacenterlight/index.html:71 #: templates/datacenterlight/pricing.html:71 +#: templates/datacenterlight/success.html:71 msgid "Buy VM" msgstr "VM Kaufen" #: templates/datacenterlight/index.html:74 #: templates/datacenterlight/index.html:341 #: templates/datacenterlight/pricing.html:74 -#: templates/datacenterlight/pricing.html:198 +#: templates/datacenterlight/pricing.html:208 +#: templates/datacenterlight/success.html:74 msgid "Contact" msgstr "Kontakt" @@ -112,7 +117,7 @@ msgstr "Das will ich haben!" #: templates/datacenterlight/index.html:142 #: templates/datacenterlight/index.html:328 -#: templates/datacenterlight/pricing.html:185 +#: templates/datacenterlight/pricing.html:195 msgid "How it works" msgstr "Wie es funktioniert" @@ -177,11 +182,13 @@ msgid "Based in Switzerland" msgstr "Standort des Datacenters ist in der Schweiz" #: templates/datacenterlight/index.html:243 -msgid "15 GB Storage (SSD)" +#, fuzzy +#| msgid "15 GB Storage (SSD)" +msgid "10 GB Storage (SSD)" msgstr "15 GB Storage (SSD)" #: templates/datacenterlight/index.html:246 -#: templates/datacenterlight/pricing.html:156 +#: templates/datacenterlight/pricing.html:166 msgid "Order Now!" msgstr "Bestelle jetzt!" @@ -202,12 +209,12 @@ msgid "Contact us!" msgstr "Kontaktiere uns!" #: templates/datacenterlight/index.html:324 -#: templates/datacenterlight/pricing.html:181 +#: templates/datacenterlight/pricing.html:191 msgid "Home" msgstr "Home" #: templates/datacenterlight/index.html:337 -#: templates/datacenterlight/pricing.html:194 +#: templates/datacenterlight/pricing.html:204 msgid "Pricing" msgstr "Preise" @@ -217,14 +224,22 @@ msgstr "Preise" msgid "Hosted in Switzerland" msgstr "Standort des Datacenters ist in der Schweiz" -#: templates/datacenterlight/pricing.html:136 +#: templates/datacenterlight/pricing.html:139 msgid "GB Storage (SSD)" msgstr "GB Storage (SSD)" -#: templates/datacenterlight/pricing.html:163 +#: templates/datacenterlight/pricing.html:173 msgid "Simple and affordable: Try our virtual machine with featherlight price." msgstr "" +#: templates/datacenterlight/success.html:101 +msgid "Thank you for order! Our team will contact you via email" +msgstr "Vielen Dank für die Bestellung. Unser Team setzt sich sobald wie möglich mit Ihnen via E-Mail in Verbindung." + +#: templates/datacenterlight/success.html:102 +msgid "as soon as possible!" +msgstr "" + #~ msgid "Buy Now!" #~ msgstr "Kaufe jetzt!" diff --git a/datacenterlight/static/datacenterlight/css/landing-page.css b/datacenterlight/static/datacenterlight/css/landing-page.css index 74671e1a..5c878fc7 100755 --- a/datacenterlight/static/datacenterlight/css/landing-page.css +++ b/datacenterlight/static/datacenterlight/css/landing-page.css @@ -243,6 +243,10 @@ h6 { align-items: center; position: relative; } +.intro-pricing.success-pricing{ + height: 100vh; + max-height: 100vh; +} .intro-pricing::before{ content: ""; position: absolute; @@ -631,12 +635,32 @@ h6 { height: 40px; width: 200px; text-align: center; - font-size: 18px; + font-size: 16px; + margin-left: 10px; } .price-calc-section .card .check-ip{ font-size: 18px; } - +.price-calc-section .card .description.input{ + justify-content: center; +} +.price-calc-section .card .description.input label{ + font-size: 15px; + font-weight: 800; + font-family: 'Montserrat-Regular'; + margin-bottom: 0; + width: 40px; +} +.price-calc-section .card .description.input input{ + width: 200px; + font-size: 14px; + text-align: left; + padding: 5px 10px; + border-radius: 4px; + border: 1px solid #d0d0d0; + background: #fff; + margin-left: 10px; +} .price-calc-section .card .check-ip input[type=checkbox]{ font-size: 17px; margin: 0 8px; @@ -735,6 +759,10 @@ h6 { left: 50%; transform: translate(-50%, 0); } + + .intro-pricing .intro-message .section-heading { + font-size: 30px; + } } diff --git a/datacenterlight/templates/datacenterlight/pricing.html b/datacenterlight/templates/datacenterlight/pricing.html index 1674f82e..e7b8811b 100644 --- a/datacenterlight/templates/datacenterlight/pricing.html +++ b/datacenterlight/templates/datacenterlight/pricing.html @@ -141,7 +141,8 @@ -
+
+ +
+
+ + +
diff --git a/datacenterlight/templates/datacenterlight/success.html b/datacenterlight/templates/datacenterlight/success.html new file mode 100644 index 00000000..ce53aa02 --- /dev/null +++ b/datacenterlight/templates/datacenterlight/success.html @@ -0,0 +1,134 @@ +{% load staticfiles i18n%} +{% get_current_language as LANGUAGE_CODE %} + + + + + + + + + + + + datacenterlight.ch - Featherlight Swiss VM + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

{% trans "Thank you for order! Our team will contact you via email" %}

+ {% if LANGUAGE_CODE == 'en-us'%} +

{% trans "as soon as possible!" %}

+ {% endif %} +
+ +
+ + + + + + + + + + + + + diff --git a/datacenterlight/urls.py b/datacenterlight/urls.py index 9c3c84fb..8713165f 100644 --- a/datacenterlight/urls.py +++ b/datacenterlight/urls.py @@ -1,6 +1,6 @@ from django.conf.urls import url -from .views import IndexView, BetaProgramView, LandingProgramView, BetaAccessView, PricingView +from .views import IndexView, BetaProgramView, LandingProgramView, BetaAccessView, PricingView, SuccessView urlpatterns = [ @@ -8,5 +8,6 @@ urlpatterns = [ url(r'^/beta-program/?$', BetaProgramView.as_view(), name='beta'), url(r'^/landing/?$', LandingProgramView.as_view(), name='landing'), url(r'^/pricing/?$', PricingView.as_view(), name='pricing'), + url(r'^/pricing-success/?$', SuccessView.as_view(), name='success'), url(r'^/beta_access?$', BetaAccessView.as_view(), name='beta_access'), ] diff --git a/datacenterlight/views.py b/datacenterlight/views.py index b68f7408..24c2b4d5 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -14,6 +14,9 @@ from opennebula_api.serializers import VirtualMachineTemplateSerializer class LandingProgramView(TemplateView): template_name = "datacenterlight/landing.html" +class SuccessView(TemplateView): + template_name = "datacenterlight/success.html" + class PricingView(TemplateView): template_name = "datacenterlight/pricing.html" From 515cbff001617d2a98e0bab86f41ea9f37e1ee83 Mon Sep 17 00:00:00 2001 From: Henry Bravo Date: Mon, 5 Jun 2017 16:03:32 -0500 Subject: [PATCH 2/2] copy PricingView --- .../templates/datacenterlight/order.html | 253 +++++++++++------- .../templates/datacenterlight/pricing.html | 2 +- .../templates/datacenterlight/success.html | 2 +- datacenterlight/urls.py | 5 +- datacenterlight/views.py | 48 ++++ 5 files changed, 205 insertions(+), 105 deletions(-) diff --git a/datacenterlight/templates/datacenterlight/order.html b/datacenterlight/templates/datacenterlight/order.html index ab224172..61ab149a 100644 --- a/datacenterlight/templates/datacenterlight/order.html +++ b/datacenterlight/templates/datacenterlight/order.html @@ -1,5 +1,7 @@ +{% load staticfiles i18n%} +{% get_current_language as LANGUAGE_CODE %} - + @@ -9,19 +11,24 @@ - Rails Hosting.ch - Ruby on Rails as easy as possible + datacenterlight.ch - Featherlight Swiss VM - + - - + + - - - - + + + + + + + + + @@ -36,7 +43,7 @@ +
- - - -
-
-
 
- -
-

-

Order Now

-

 

- -
-   -
- - - -
- -

 

- -
-
-   -
- - - -
-

VM size sliders to be inserted

- - -
- - -
-
- - -
- - -

-
    - -
 
-
-
-
- +
+

{% trans "We are cutting down the costs significantly!" %}

- - +
- + +
+
+ +
+
+ {% csrf_token %} + +
+

{% trans "VM hosting" %}

+
+
+ 15 + CHF +
+
+
+

{% trans "Hosted in Switzerland" %}

+
+
+ + + Core + +
+
+ + + GB RAM + +
+
+ + + {% trans "GB Storage (SSD)" %} + +
+ + +
+ + +
+ + + +
+ + +
+
+ + +
+
+ + +
+
+
+ +
+

{% trans "Simple and affordable: Try our virtual machine with featherlight price." %}

+ +
+

Our VMs are hosted in Glarus, Switzerland. WARNING: We are currently running in BETA mode, especially our website We hope you will not encounter any hiccups, but if you, please let us know at support@datacenterlight.ch

+
+
+
+ + +
- + + + + + - + + diff --git a/datacenterlight/templates/datacenterlight/pricing.html b/datacenterlight/templates/datacenterlight/pricing.html index e7b8811b..da13d5e1 100644 --- a/datacenterlight/templates/datacenterlight/pricing.html +++ b/datacenterlight/templates/datacenterlight/pricing.html @@ -1,7 +1,7 @@ {% load staticfiles i18n%} {% get_current_language as LANGUAGE_CODE %} - + diff --git a/datacenterlight/templates/datacenterlight/success.html b/datacenterlight/templates/datacenterlight/success.html index ce53aa02..bf7f982a 100644 --- a/datacenterlight/templates/datacenterlight/success.html +++ b/datacenterlight/templates/datacenterlight/success.html @@ -1,7 +1,7 @@ {% load staticfiles i18n%} {% get_current_language as LANGUAGE_CODE %} - + diff --git a/datacenterlight/urls.py b/datacenterlight/urls.py index 8713165f..c3f9f98d 100644 --- a/datacenterlight/urls.py +++ b/datacenterlight/urls.py @@ -1,6 +1,6 @@ from django.conf.urls import url -from .views import IndexView, BetaProgramView, LandingProgramView, BetaAccessView, PricingView, SuccessView +from .views import IndexView, BetaProgramView, LandingProgramView, BetaAccessView, PricingView, SuccessView, OrderView urlpatterns = [ @@ -8,6 +8,7 @@ urlpatterns = [ url(r'^/beta-program/?$', BetaProgramView.as_view(), name='beta'), url(r'^/landing/?$', LandingProgramView.as_view(), name='landing'), url(r'^/pricing/?$', PricingView.as_view(), name='pricing'), - url(r'^/pricing-success/?$', SuccessView.as_view(), name='success'), + url(r'^/order/?$', OrderView.as_view(), name='order'), + url(r'^/order-success/?$', SuccessView.as_view(), name='success'), url(r'^/beta_access?$', BetaAccessView.as_view(), name='beta_access'), ] diff --git a/datacenterlight/views.py b/datacenterlight/views.py index 24c2b4d5..e2673f8c 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -66,6 +66,54 @@ class PricingView(TemplateView): return redirect(reverse('hosting:payment')) +class OrderView(TemplateView): + template_name = "datacenterlight/order.html" + + def get(self, request, *args, **kwargs): + try: + manager = OpenNebulaManager() + templates = manager.get_templates() + + context = { + 'templates': VirtualMachineTemplateSerializer(templates, many=True).data, + } + except: + messages.error( request, + 'We could not load the VM templates due to a backend connection \ + error. Please try again in a few minutes' + ) + context = { + 'error' : 'connection' + } + + return render(request, self.template_name, context) + + + def post(self, request): + + cores = request.POST.get('cpu') + memory = request.POST.get('ram') + storage = request.POST.get('storage') + price = request.POST.get('total') + + template_id = int(request.POST.get('config')) + + manager = OpenNebulaManager() + template = manager.get_template(template_id) + + request.session['template'] = VirtualMachineTemplateSerializer(template).data + + if not request.user.is_authenticated(): + request.session['next'] = reverse('hosting:payment') + + request.session['specs'] = { + 'cpu':cores, + 'memory': memory, + 'disk_size': storage, + 'price': price, + } + + return redirect(reverse('hosting:payment')) class BetaAccessView(FormView): template_name = "datacenterlight/beta_access.html"