Attempt to merge master into task/3747/multiple_cards_support

This commit is contained in:
PCoder 2018-06-12 08:13:48 +02:00
commit cf00ff6bd8
269 changed files with 8500 additions and 29554 deletions

View file

@ -15,18 +15,15 @@
<!-- Bootstrap Core CSS -->
<link href="{% static 'hosting/css/bootstrap.min.css' %}" rel="stylesheet">
<link href="{% static 'hosting/css/pricing.css' %}" rel="stylesheet">
<link href="{% static 'datacenterlight/css/bootstrap-3.3.7.min.css' %}" rel="stylesheet">
<!-- Custom CSS -->
<link href="{% static 'hosting/css/pricing.css' %}" rel="stylesheet">
<link href="{% static 'hosting/css/landing-page.css' %}" rel="stylesheet">
<!-- Custom Fonts -->
<link href="{% static 'datacenterlight/font-awesome/css/font-awesome.min.css' %}" rel="stylesheet" type="text/css">
<link href='//fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
<link href="{% static 'hosting/font-awesome/css/font-awesome.min.css' %}" rel="stylesheet" type="text/css">
<link href="//fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
<link rel="shortcut icon" href="{% static 'hosting/img/favicon.ico' %}" type="image/x-icon" />
@ -43,7 +40,7 @@
background: url("{% static image_static %}") no-repeat center center;
}
</style>
{% endwith %}
{% endwith %}
<!-- Google analytics -->
{% include "google_analytics.html" %}
@ -66,7 +63,7 @@
<div class="col-lg-5 col-lg-offset-1 col-sm-push-6 col-sm-6">
<hr class="section-heading-spacer">
<div class="clearfix"></div>
<h2 class="section-heading">How it works : </h2>
<h2 class="section-heading">How it works : </h2>
<ul class="fa-ul">
{% block specification %}
{% endblock %}
@ -98,7 +95,7 @@
<!-- Pricing data -->
{% if vm_types %}
<script type="text/javascript">
<script type="text/javascript">
(function () {window.VMTypesData = "{{vm_types|safe}}";})();
</script>
{%endif%}
@ -106,17 +103,13 @@
<!-- Lodash -->
<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/4.11.1/lodash.min.js"></script>
<!-- jQuery -->
<script src="{% static 'hosting/js/jquery.js' %}"></script>
<script src="{% static 'datacenterlight/js/jquery-2.2.4.min.js' %}"></script>
<!-- Bootstrap Core JavaScript -->
<script src="{% static 'datacenterlight/js/bootstrap-3.3.7.min.js' %}"></script>
<!-- Pricing -->
<script src="{% static 'hosting/js/pricing.js' %}"></script>
<!-- Bootstrap Core JavaScript -->
<script src="{% static 'hosting/js/bootstrap.min.js' %}"></script>
</body>
</html>

View file

@ -1,5 +1,5 @@
{% load staticfiles bootstrap3%}
{% load i18n %}
{% load staticfiles i18n cms_tags sekizai_tags %}
<!DOCTYPE html>
<html lang="en">
@ -14,7 +14,7 @@
<title>ungleich</title>
<!-- Bootstrap Core CSS -->
<link href="{% static 'hosting/css/bootstrap.min.css' %}" rel="stylesheet">
<link href="{% static 'datacenterlight/css/bootstrap-3.3.7.min.css' %}" rel="stylesheet">
<!-- Custom CSS -->
<link href="{% static 'hosting/css/landing-page.css' %}" rel="stylesheet">
@ -29,9 +29,12 @@
{% block css_extra %}
{% endblock css_extra %}
{% render_block "css" postprocessor "compressor.contrib.sekizai.compress" %}
{% render_block "js" postprocessor "compressor.contrib.sekizai.compress" %}
<!-- Custom Fonts -->
<link href='//fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<link href="{% static 'datacenterlight/font-awesome/css/font-awesome.min.css' %}" rel="stylesheet" type="text/css">
<link href="//fonts.googleapis.com/css?family=Lato:300,400,500,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
<link rel="shortcut icon" href="{% static 'datacenterlight/img/favicon.ico' %}" type="image/x-icon" />
@ -48,7 +51,7 @@
</head>
<body>
{% cms_toolbar %}
{% block navbar %}
{% include "hosting/includes/_navbar_user.html" %}
@ -63,7 +66,7 @@
{% if request.user.is_authenticated %}
<footer class="footer-vm">
<div class="container">
<p class="copyright text-muted small">Copyright &copy; ungleich GmbH {% now "Y" %}. {% trans "All Rights Reserved" %}</p>
<p class="copyright text-muted small">Copyright &copy; ungleich glarus ag {% now "Y" %}. {% trans "All Rights Reserved" %}</p>
</div>
</footer>
{% else %}
@ -72,15 +75,13 @@
</div>
{% endif %}
<!-- jQuery -->
<script src="{% static 'hosting/js/jquery.js' %}"></script>
<script src="{% static 'datacenterlight/js/jquery-2.2.4.min.js' %}"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.16.0/jquery.validate.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/1000hz-bootstrap-validator/0.11.9/validator.min.js"></script>
<!-- Copy Clipboard -->
<script src="//cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.5.10/clipboard.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="{% static 'hosting/js/bootstrap.min.js' %}"></script>
<script src="{% static 'datacenterlight/js/bootstrap-3.3.7.min.js' %}"></script>
<!-- Virtual Machine Detail Javascript -->
<script src="{% static 'hosting/js/virtual_machine_detail.js' %}"></script>

View file

@ -1,147 +0,0 @@
{% load staticfiles %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Rails Hosting.ch - Ruby on Rails as easy as possible</title>
<!-- Bootstrap Core CSS -->
<link href="{% static 'hosting/css/bootstrap.min.css' %}" rel="stylesheet">
<!-- Custom CSS -->
<link href="{% static 'hosting/css/landing-page.css' %}" rel="stylesheet">
<!-- Custom Fonts -->
<link href='http://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
<link href="{% static 'hosting/font-awesome/css/font-awesome.min.css' %}" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
<link rel="shortcut icon" href="{% static 'hosting/img/favicon.ico' %}" type="image/x-icon" />
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- Google analytics -->
{% include 'google_analytics.html' %}
<!-- End Google Analytics -->
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-default navbar-fixed-top topnav" role="navigation">
<div class="container topnav">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand topnav" href="#"><img src="{% static 'hosting/img/logo_black.svg' %}"></a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li>
<a href="{% url 'hosting:index' %}#how">How it works</a>
</li>
<li>
<a href="{% url 'hosting:index' %}#your">Your infrastructure</a>
</li>
<li>
<a href="{% url 'hosting:index' %}#our">Our inftrastructure</a>
</li>
<li>
<a href="{% url 'hosting:index' %}#price">Pricing</a>
</li>
<li>
<a href="{% url 'hosting:index' %}#contact">Contact</a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<!-- Header -->
<a name="about"></a>
<div class="intro-header">
<div class="container">
<div class=".col-md-6">
<div class="intro-message"><img src="{% static 'hosting/img/checkmark.png' %}" class="responsive">
<p>Thank you for your interest in joining Rails-Hosting Beta.<br>
    We will come back to you shortly to give you access to our  infrastructure.
</p>
<hr class="intro-divider">
<ul class="list-inline intro-social-buttons">
</ul>
</div>
</div>
</div>
</div>
<!-- /.container -->
</div>
<!-- /.intro-header -->
<!-- Footer -->
<footer>
<div class="container">
<div class="row">
<div class="col-lg-12">
<ul class="list-inline">
<li>
<a href="{% url 'hosting:index' %}">Home</a>
</li>
<li class="footer-menu-divider">&sdot;</li>
<li>
<a href="{% url 'hosting:index' %}#how">How it works</a></li>
<li class="footer-menu-divider">&sdot;</li>
<li>
<a href="{% url 'hosting:index' %}#your">Your infrastructure</a></li>
<li>&sdot;</li>
<li>
<a href="{% url 'hosting:index' %}#our">Our infrastructure</a></li>
<li class="footer-menu-divider">&sdot;</li>
<li>
<a href="{% url 'hosting:index' %}#price">Pricing</a>
</li>
<li class="footer-menu-divider">&sdot;</li>
<li>
<a href="{% url 'hosting:index' %}#contact">Contact</a>
</li>
</ul>
<p class="copyright text-muted small">Copyright &copy; ungleich GmbH {% now "Y" %}. All Rights Reserved</p>
</div>
</div>
</div>
</footer>
<!-- jQuery -->
<script src="{% static 'hosting/js/jquery.js' %}"></script>
<!-- Bootstrap Core JavaScript -->
<script src="{% static 'hosting/js/bootstrap.min.js' %}"></script>
</body>
</html>

View file

@ -29,8 +29,8 @@
<div class="form-group">
<div class="description input">
<i class="fa fa-minus left" data-minus="ram" aria-hidden="true"></i>
<input id="ramValue" class="input-price select-number" type="number" min="2" max="200" name="ram"
data-error="{% trans 'Please enter a value in range 2 - 200.' %}" required>
<input id="ramValue" class="input-price select-number" type="number" min="1" max="200" name="ram"
data-error="{% trans 'Please enter a value in range 1 - 200.' %}" required>
<span> GB RAM</span>
<i class="fa fa-plus right" data-plus="ram" aria-hidden="true"></i>
</div>

View file

@ -25,7 +25,6 @@
{% trans "Generate" %}
</button>
</form>
</div>
<div>
<h2>{% trans "Using existing key" %}</h2>

View file

@ -1,7 +1,9 @@
{% extends "hosting/base_short.html" %}
{% load staticfiles bootstrap3 i18n %}
{% load staticfiles bootstrap3 i18n cms_tags %}
{% block content %}
<div class="dashboard-container create-vm-container">
<div class="row">
<div class="col-sm-5">
@ -17,14 +19,8 @@
{% endif %}
</div>
</div>
<div class="col-sm-6">
<div class="price-calc-section no-padding">
<div class="landing card">
<div class="caption">
{% include "hosting/calculator_form.html" %}
</div>
</div>
</div>
<div class="col-sm-6 hosting-calculator">
{% render_placeholder cms_integration.calculator_placeholder %}
</div>
</div>
</div>

View file

@ -14,7 +14,7 @@
<table style="width: 100%; border-spacing: 0; border-collapse: collapse; max-width: 560px;">
<tr>
<td>
<img src="{{ base_url }}{% static 'datacenterlight/img/logo_black.png' %}" style="width: 200px; height: 50px;">
<img src="{{ base_url }}{% static 'datacenterlight/img/datacenterlight.png' %}" style="max-width: 200px;">
</td>
</tr>
<tr>

View file

@ -14,7 +14,7 @@
<table style="width: 100%; border-spacing: 0; border-collapse: collapse; max-width: 560px;">
<tr>
<td>
<img src="{{base_url}}{% static 'datacenterlight/img/logo_black.png' %}" style="width: 200px; height: 50px;">
<img src="{{ base_url }}{% static 'datacenterlight/img/datacenterlight.png' %}" style="max-width: 200px;">
</td>
</tr>
<tr>

View file

@ -14,7 +14,7 @@
<table style="width: 100%; border-spacing: 0; border-collapse: collapse; max-width: 560px;">
<tr>
<td>
<img src="{{ base_url }}{% static 'datacenterlight/img/logo_black.png' %}" style="width: 200px; height: 50px;">
<img src="{{ base_url }}{% static 'datacenterlight/img/datacenterlight.png' %}" style="max-width: 200px;">
</td>
</tr>
<tr>

View file

@ -74,7 +74,7 @@
<center style="font-family: 'Oxygen', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<table cellpadding="0" cellspacing="0" width="600" class="w320" style="border-collapse: collapse !important; font-family: 'Oxygen', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"><tr style="font-family: 'Oxygen', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<td class="pull-left mobile-header-padding-left" style="vertical-align: middle; border-collapse: collapse; font-family: 'Oxygen', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: left; line-height: 21px; width: 290px; padding-left: 10px;" align="left" valign="middle">
<a href="{{base_url}}" style="font-family: 'Oxygen', 'Helvetica Neue', 'Arial', 'sans-serif' !important; color: #676767; text-decoration: none !important;"><img width="137" src="{{base_url}}{% static "hosting/img/logo_black.png" %}" alt="logo" style="max-width: 600px; outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; font-family: 'Oxygen', 'Helvetica Neue', 'Arial', 'sans-serif' !important; border: none;"></a>
<a href="{{base_url}}" style="font-family: 'Oxygen', 'Helvetica Neue', 'Arial', 'sans-serif' !important; color: #676767; text-decoration: none !important;"><img width="137" src="{{base_url}}{% static 'hosting/img/datacenterlight.png' %}" alt="logo" style="max-width: 600px; outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; font-family: 'Oxygen', 'Helvetica Neue', 'Arial', 'sans-serif' !important; border: none;"></a>
</td>
<td class="pull-right mobile-header-padding-right" style="color: #4d4d4d; border-collapse: collapse; font-family: 'Oxygen', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; text-align: right; line-height: 21px; width: 290px; padding-left: 10px;" align="right">
</td>
@ -100,7 +100,7 @@
</tr>
<tr style="font-family: 'Oxygen', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<td class="free-text" style="border-collapse: collapse; font-family: 'Oxygen', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; width: 100% !important; padding: 10px 60px 0px;" align="center">
Your virtual machine {{vm.name}} subscription has been charged, <br/> you can view your invoice clicking on the button below.
Your virtual machine {{vm.name}} subscription has been charged, <br/> you can view your invoice clicking on the button below.
</td>
</tr>
<tr style="font-family: 'Oxygen', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">

View file

@ -2,20 +2,17 @@
<!DOCTYPE html>
<html>
<head>
<link href="{% static 'hosting/css/pricing.css' %}" rel="stylesheet" />
<title>Hosting</title>
<!-- Bootstrap Core CSS -->
<link href="{% static 'hosting/css/bootstrap.min.css' %}" rel="stylesheet">
<link href="{% static 'hosting/css/pricing.css' %}" rel="stylesheet">
<link href="{% static 'datacenterlight/css/bootstrap-3.3.7.min.css' %}" rel="stylesheet">
<!-- Custom CSS -->
<link href="{% static 'hosting/css/pricing.css' %}" rel="stylesheet">
<link href="{% static 'hosting/css/landing-page.css' %}" rel="stylesheet">
<!-- Custom Fonts -->
<link href="{% static 'datacenterlight/font-awesome/css/font-awesome.min.css' %}" rel="stylesheet" type="text/css">
<link href='//fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
<link href="{% static 'hosting/font-awesome/css/font-awesome.min.css' %}" rel="stylesheet" type="text/css">
<link href="//fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
<link rel="shortcut icon" href="{% static 'hosting/img/favicon.ico' %}" type="image/x-icon" />
<!-- Google analytics -->
@ -29,17 +26,15 @@
<!-- Pricing data -->
{% if vm_types %}
<script type="text/javascript">
<script type="text/javascript">
(function () {window.VMTypesData = "{{vm_types|safe}}";})();
</script>
{%endif%}
<!-- Lodash -->
<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/4.11.1/lodash.min.js"></script>
<!-- jQuery -->
<script src="{% static 'hosting/js/jquery.js' %}"></script>
<script src="{% static 'datacenterlight/js/jquery-2.2.4.min.js' %}"></script>
<!-- Pricing -->
<script src="{% static 'hosting/js/pricing.js' %}"></script>
</body>

View file

@ -1,5 +1,5 @@
{% load staticfiles %}
{% load i18n %}
<footer>
<div class="container">
<div class="row">
@ -26,7 +26,7 @@
<a href="#contact">Contact</a>
</li>
</ul>
<p class="copyright text-muted small">Copyright &copy; ungleich GmbH {% now "Y" %}. {% trans "All Rights Reserved" %}</p>
<p class="copyright text-muted small">Copyright &copy; ungleich glarus ag {% now "Y" %}. {% trans "All Rights Reserved" %}</p>
</div>
</div>
</div>

View file

@ -7,7 +7,6 @@
<div class="col-lg-12">
<div class="intro-message">
<img class="responsive" src="{% static 'hosting/img/Beta.png' %}">
<h1>{{ domain }}</h1>
<h3>{{ hosting_long }} as easy as possible</h3>
<hr class="intro-divider">

View file

@ -1,9 +1,6 @@
{% load staticfiles %}
{% load i18n %}
{% load custom_tags %}
{% load staticfiles i18n custom_tags %}
<!-- Navigation -->
<nav class="navbar navbar-default navbar-fixed-top topnav" role="navigation">
<div class="topnav">
<!-- Brand and toggle get grouped for better mobile display -->

View file

@ -29,7 +29,7 @@
<div class="auth-footer">
<div>
{% trans "Don't have an account yet ?" %}&nbsp;
<a class="" href="{% url 'hosting:signup' %}">{% trans "Sign up" %}</a>
<a href="{% url 'hosting:signup' %}">{% trans "Sign up" %}</a>
</div>
<div>
or <a href="{% url 'hosting:reset_password' %}">{% trans "Forgot your password ?" %}</a><br>

View file

@ -1,7 +1,6 @@
{% extends "hosting/base_short.html" %}
{% load staticfiles bootstrap3 %}
{% load i18n %}
{% load custom_tags %}
{% load staticfiles bootstrap3 humanize i18n custom_tags %}
{% block content %}
<div id="order-detail{{order.pk}}" class="order-detail-container">
@ -115,29 +114,58 @@
<p>
<span>{% trans "Cores" %}: </span>
{% if vm.cores %}
<span class="pull-right">{{vm.cores|floatformat}}</span>
<strong class="pull-right">{{vm.cores|floatformat}}</strong>
{% else %}
<span class="pull-right">{{vm.cpu|floatformat}}</span>
<strong class="pull-right">{{vm.cpu|floatformat}}</strong>
{% endif %}
</p>
<p>
<span>{% trans "Memory" %}: </span>
<span class="pull-right">{{vm.memory}} GB</span>
<strong class="pull-right">{{vm.memory}} GB</strong>
</p>
<p>
<span>{% trans "Disk space" %}: </span>
<span class="pull-right">{{vm.disk_size}} GB</span>
<strong class="pull-right">{{vm.disk_size}} GB</strong>
</p>
<p>
<span>{% trans "Total" %}</span>
<span class="pull-right">{{vm.price}} CHF</span>
</div>
<div class="col-sm-12">
<hr class="thin-hr">
</div>
{% if vm.vat > 0 or vm.discount.amount > 0 %}
<div class="col-sm-6">
<div class="subtotal-price">
{% if vm.vat > 0 %}
<p>
<strong>{% trans "Subtotal" %} </strong>
<strong class="pull-right">{{vm.price|floatformat:2|intcomma}} CHF</strong>
</p>
<p>
<small>{% trans "VAT" %} ({{ vm.vat_percent|floatformat:2|intcomma }}%) </small>
<strong class="pull-right">{{vm.vat|floatformat:2|intcomma}} CHF</strong>
</p>
{% endif %}
{% if vm.discount.amount > 0 %}
<p class="text-primary">
{%trans "Discount" as discount_name %}
<strong>{{ vm.discount.name|default:discount_name }} </strong>
<strong class="pull-right">- {{ vm.discount.amount }} CHF</strong>
</p>
{% endif %}
</div>
</div>
<div class="col-sm-12">
<hr class="thin-hr">
</div>
{% endif %}
<div class="col-sm-6">
<p class="total-price">
<strong>{% trans "Total" %} </strong>
<strong class="pull-right">{% if vm.total_price %}{{vm.total_price|floatformat:2|intcomma}}{% else %}{{vm.price|floatformat:2|intcomma}}{% endif %} CHF</strong>
</p>
</div>
</div>
</div>
{% if not order %}
<hr>
{% endif %}
<hr class="thin-hr">
</div>
{% if not order %}
{% block submit_btn %}
@ -145,7 +173,7 @@
{% csrf_token %}
<div class="row">
<div class="col-sm-8">
<div class="dcl-place-order-text">{% blocktrans with vm_price=request.session.specs.price %}By clicking "Place order" this plan will charge your credit card account with the fee of {{ vm_price }}CHF/month{% endblocktrans %}.</div>
<div class="dcl-place-order-text">{% blocktrans with vm_price=vm.total_price|floatformat:2|intcomma %}By clicking "Place order" this plan will charge your credit card account with {{ vm_price }} CHF/month{% endblocktrans %}.</div>
</div>
<div class="col-sm-4 order-confirm-btn text-right">
<button class="btn choice-btn" id="btn-create-vm" data-href="{% url 'hosting:order-confirmation' %}" data-toggle="modal" data-target="#createvm-modal">
@ -155,6 +183,11 @@
</div>
</form>
{% endblock submit_btn %}
{% else %}
<div class="order_detail_footer">
<strong>ungleich glarus ag</strong>&nbsp;&nbsp;Bahnhofstrasse 1, 8783 Linthal, Switzerland<br>
www.datacenterlight.ch&nbsp;&nbsp;|&nbsp;&nbsp;info@datacenterlight.ch&nbsp;&nbsp;|&nbsp;&nbsp;<small>CHE-156.970.649 MWST</small>
</div>
{% endif %}
{% endif %}
</div>
@ -213,8 +246,8 @@
{% block js_extra %}
{% if order %}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.5/jspdf.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.min.js"></script>
<script src="{% static 'hosting/js/html2pdf.js' %}"></script>
<script src="{% static 'hosting/js/html2canvas.min.js' %}"></script>
<script src="{% static 'hosting/js/html2pdf.min.js' %}"></script>
<script src="{% static 'hosting/js/order.js' %}"></script>
{% endif %}
{% endblock js_extra %}

View file

@ -1,6 +1,5 @@
{% extends "hosting/base_short.html" %}
{% load staticfiles bootstrap3 %}
{% load i18n l10n %}
{% load staticfiles bootstrap3 humanize i18n %}
{% block content %}
<div class="dashboard-container">
@ -30,7 +29,7 @@
<tr>
<td class="xs-td-inline" data-header="{% trans 'Order Nr.' %}">{{ order.id }}</td>
<td class="xs-td-bighalf" data-header="{% trans 'Date' %}">{{ order.created_at | date:"M d, Y H:i" }}</td>
<td class="xs-td-smallhalf" data-header="{% trans 'Amount' %}">{{ order.price|unlocalize }}</td>
<td class="xs-td-smallhalf" data-header="{% trans 'Amount' %}">{{ order.price|floatformat:2|intcomma }}</td>
<td class="text-right last-td">
<a class="btn btn-order-detail" href="{% url 'hosting:orders' order.pk %}">{% trans 'See Invoice' %}</a>
</td>

View file

@ -1,5 +1,5 @@
{% extends "hosting/base_short.html" %}
{% load staticfiles bootstrap3 i18n %}
{% load staticfiles bootstrap3 i18n humanize %}
{% block css_extra %}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/paymentfont/1.1.2/css/paymentfont.min.css"/>
@ -9,61 +9,108 @@
<!-- Credit card form -->
<div class="dcl-order-container">
<div class="payment-container">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 dcl-order-sec">
<h3><strong>{%trans "Your Order" %}</strong></h3>
<div class="col-xs-6 col-sm-12 col-md-12 col-lg-12 dcl-order-table-header">
<div class="col-xs-12 col-sm-2 col-md-1 col-lg-1 tbl-header">
{%trans "Cores" %}
</div>
<div class="col-xs-12 col-sm-3 col-md-4 col-lg-4 tbl-header">
{%trans "Memory" %}
</div>
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-3 tbl-header">
{%trans "Disk space" %}
</div>
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 tbl-header">
{%trans "Configuration" %}
<div class="dcl-order-sec">
<h3><strong>{%trans "Your Order" %}</strong></h3>
<div class="row">
<div class="col-xs-6 col-sm-12">
<div class="dcl-order-table-header">
<div class="row">
<div class="col-sm-2">
<div class="tbl-header">
{%trans "Cores" %}
</div>
</div>
<div class="col-sm-4">
<div class="tbl-header tbl-header-center">
{%trans "Memory" %}
</div>
</div>
<div class="col-sm-3">
<div class="tbl-header tbl-header-center">
{%trans "Disk space" %}
</div>
</div>
<div class="col-sm-3">
<div class="tbl-header tbl-header-right">
{%trans "Configuration" %}
</div>
</div>
</div>
</div>
</div>
<div class="col-xs-6 col-sm-12 col-md-12 col-lg-12 dcl-order-table-content">
<div class="col-xs-12 col-sm-2 col-md-1 col-lg-1 tbl-content">
{{request.session.specs.cpu|floatformat}}
</div>
<div class="col-xs-12 col-sm-3 col-md-4 col-lg-4 tbl-content">
{{request.session.specs.memory|floatformat}} GB
</div>
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-3 tbl-content">
{{request.session.specs.disk_size|floatformat}} GB
</div>
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 tbl-content">
{{request.session.template.name}}
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 dcl-order-table-total">
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 tbl-tot tbl-no-padding">
{%trans "Total" %} <span>{%trans "including VAT" %}</span>
</div>
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 tbl-no-padding">
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4"></div>
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6 tbl-total">{{request.session.specs.price}}
CHF<span class="dcl-price-month">/{% trans "Month" %}</span>
<div class="col-xs-6 col-sm-12">
<div class="dcl-order-table-content">
<div class="row">
<div class="col-sm-2">
<div class="tbl-content">
{{request.session.specs.cpu|floatformat}}
</div>
</div>
<div class="col-sm-4">
<div class="tbl-content tbl-content-center">
{{request.session.specs.memory|floatformat}} GB
</div>
</div>
<div class="col-sm-3">
<div class="tbl-content tbl-content-center">
{{request.session.specs.disk_size|floatformat|intcomma}} GB
</div>
</div>
<div class="col-sm-3">
<div class="tbl-content tbl-content-right">
{{request.session.template.name}}
</div>
</div>
</div>
</div>
</div>
</div>
<div class="dcl-order-table-total">
<div class="row">
<div class="col-xs-6">
<div class="tbl-tot">
{%trans "Total" %}&nbsp;
<span>{% if vm_pricing.vat_inclusive %}{%trans "including VAT" %}{% else %}{%trans "excluding VAT" %}{% endif %}</span>
</div>
</div>
<div class="col-xs-6">
<div class="tbl-total">
{{request.session.specs.price|intcomma}} CHF/{% trans "Month" %}
</div>
</div>
</div>
{% if vm_pricing.discount_amount %}
<hr class="thin-hr">
<div class="row">
<div class="col-xs-6">
<div class="tbl-tot">
{%trans "Discount" as discount_name %}
{{ vm_pricing.discount_name|default:discount_name }}&nbsp;&nbsp;<br>
<span>({% trans "Will be applied at checkout" %})</span>
</div>
</div>
<div class="col-xs-6 text-right">
<div class="tbl-total">
<div class="text-primary">- {{ vm_pricing.discount_amount }} CHF/{% trans "Month" %}</div>
</div>
</div>
</div>
{% endif %}
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 dcl-billing-sec">
<div class="col-xs-12 col-sm-5 col-md-6 billing dcl-billing">
<h3><b>{%trans "Billing Address"%}</b></h3>
<hr>
<form role="form" id="billing-form" method="post" action="" novalidate>
{% for field in form %}
{% csrf_token %}
{% bootstrap_field field show_label=False type='fields'%}
{% endfor %}
</form>
<div class="dcl-billing-sec">
<div class="row">
<div class="col-sm-5 col-md-6">
<div class="billing dcl-billing">
<h3><b>{%trans "Billing Address"%}</b></h3>
<hr>
<form role="form" id="billing-form" method="post" action="" novalidate>
{% for field in form %}
{% csrf_token %}
{% bootstrap_field field show_label=False type='fields'%}
{% endfor %}
</form>
</div>
</div>
<div class="col-xs-12 col-sm-7 col-md-6 creditcard-box dcl-creditcard">
{% with card_list_len=cards_list|length %}
@ -116,4 +163,13 @@
})();
</script>
{%endif%}
{% comment "Looks as if no more used. To test..." %}
{% if credit_card_data.last4 and credit_card_data.cc_brand %}
<script type="text/javascript">
(function () {
window.hasCreditcard = true;
})();
</script>
{%endif%}
{% endcomment %}
{%endblock%}

View file

@ -27,7 +27,7 @@
<div class="auth-footer">
<div>
{% trans "Don't have an account yet ?" %}&nbsp;
<a class="" href="{% url 'hosting:signup' %}">{% trans "Sign up" %}</a>
<a href="{% url 'hosting:signup' %}">{% trans "Sign up" %}</a>
</div>
<div>
or <a href="{% url 'hosting:reset_password' %}">{% trans "Forgot your password ?" %}</a>

View file

@ -4,7 +4,7 @@
<div>
<div class="virtual-machine-container dashboard-container">
<div class="row">
<div class="col-md-9 col-md-offset-2">
<div class="col-md-8 col-md-offset-2">
<form method="POST" action="" novalidate class="form-ssh">
{% csrf_token %}
<div class="page-header">

View file

@ -1,5 +1,5 @@
{% extends "hosting/base_short.html" %}
{% load staticfiles bootstrap3 %}
{% load staticfiles bootstrap3 humanize %}
{% load i18n %}
{% block content %}
@ -37,7 +37,7 @@
<div class="vm-detail-config">
<p><span>{% trans "Cores" %}:</span><span class="value">{{virtual_machine.cores}}</span></p>
<p><span>{% trans "Memory" %}:</span><span class="value">{{virtual_machine.memory}} GB</span></p>
<p><span>{% trans "Disk" %}:</span><span class="value">{{virtual_machine.disk_size|floatformat:2}} GB</span></p>
<p><span>{% trans "Disk" %}:</span><span class="value">{{virtual_machine.disk_size|floatformat:2|intcomma}} GB</span></p>
<p><span>{% trans "Configuration" %}:</span><span class="value">{{virtual_machine.configuration}}</span></p>
</div>
</div>
@ -45,7 +45,7 @@
<h2 class="vm-detail-title">{% trans "Billing" %} <img src="{% static 'hosting/img/billing.svg' %}" class="un-icon"></h2>
<div class="vm-vmid">
<div class="vm-item-subtitle">{% trans "Current Pricing" %}</div>
<div class="vm-item-lg">{{virtual_machine.price|floatformat}} CHF/{% trans "Month" %}</div>
<div class="vm-item-lg">{{order.price|floatformat:2|intcomma}} CHF/{% trans "Month" %}</div>
<a class="btn btn-vm-invoice" href="{% url 'hosting:orders' order.pk %}">{% trans "See Invoice" %}</a>
</div>
</div>

View file

@ -39,27 +39,25 @@
</thead>
<tbody>
{% for vm in vms %}
<tr>
<td data-header="ID">{{vm.vm_id}}</td>
{% if vm.ipv6 %}
<td data-header="IPv4">{{vm.ipv4}}</td>
<td data-header="IPv6">{{vm.ipv6}}</td>
{% endif %}
<td data-header="{% trans 'Status' %}">
<strong>
{% if vm.state == 'ACTIVE' %}
<span class="vm-status-active">{{vm.state|title}}</span>
{% elif vm.state == 'FAILED' %}
<span class="vm-status-failed">{{vm.state|title}}</span>
{% else %}
<span class="vm-status">{{vm.state|title}}</span>
{% endif %}
</strong>
</td>
<td class="text-right last-td">
<a class="btn btn-vm-detail" href="{% url 'hosting:virtual_machines' vm.vm_id %}">{% trans "View Detail" %}</a>
</td>
</tr>
<tr>
<td data-header="ID">{{vm.vm_id}}</td>
<td data-header="IPv4">{% if vm.ipv4 %}{{vm.ipv4}}{% endif %}</td>
<td data-header="IPv6">{% if vm.ipv6 %}{{vm.ipv6}}{% endif %}</td>
<td data-header="{% trans 'Status' %}">
<strong>
{% if vm.state == 'ACTIVE' %}
<span class="vm-status-active">{{vm.state|title}}</span>
{% elif vm.state == 'FAILED' %}
<span class="vm-status-failed">{{vm.state|title}}</span>
{% else %}
<span class="vm-status">{{vm.state|title}}</span>
{% endif %}
</strong>
</td>
<td class="text-right last-td">
<a class="btn btn-vm-detail" href="{% url 'hosting:virtual_machines' vm.vm_id %}">{% trans "View Detail" %}</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>