Merge pull request #377 from karthikvrao/refactor/dcl_better_indent_html

Task #3547: Correct the indentation in the html template files of dcl.
This commit is contained in:
Pcoder 2017-07-07 22:33:33 +02:00 committed by GitHub
commit 545834d3d0
6 changed files with 241 additions and 241 deletions

View file

@ -3,65 +3,65 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{LANGUAGE_CODE}}"> <html lang="{{LANGUAGE_CODE}}">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Data Center Light by ungleich"> <meta name="description" content="Data Center Light by ungleich">
<meta name="author" content="ungleich GmbH"> <meta name="author" content="ungleich GmbH">
<title>Data Center Light - <title>Data Center Light -
{% block title %}VM hosting made in Switzerland{% endblock %}</title> {% block title %}VM hosting made in Switzerland{% endblock %}</title>
<!-- Bootstrap Core CSS --> <!-- Bootstrap Core CSS -->
<link href="{% static 'datacenterlight/css/bootstrap.min.css' %}" rel="stylesheet"> <link href="{% static 'datacenterlight/css/bootstrap.min.css' %}" rel="stylesheet">
<!-- Custom Fonts --> <!-- Custom Fonts -->
<!--Import Google Icon Font--> <!--Import Google Icon Font-->
<link href="//fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="//fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="{% static 'datacenterlight/font-awesome/css/font-awesome.min.css' %}" rel="stylesheet" type="text/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,700,300italic,400italic,700italic" 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 'datacenterlight/img/favicon.ico' %}" type="image/x-icon" /> <link rel="shortcut icon" href="{% static 'datacenterlight/img/favicon.ico' %}" type="image/x-icon" />
<link href="//cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.5.4/bootstrap-select.min.css" rel="stylesheet"> <link href="//cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.5.4/bootstrap-select.min.css" rel="stylesheet">
<!-- Custom CSS --> <!-- Custom CSS -->
<link href="{% static 'datacenterlight/css/landing-page.css' %}" rel="stylesheet"> <link href="{% static 'datacenterlight/css/landing-page.css' %}" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- 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:// --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]> <!--[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/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]--> <![endif]-->
<!-- Google analytics --> <!-- Google analytics -->
{% include "google_analytics.html" %} {% include "google_analytics.html" %}
<!-- End Google Analytics --> <!-- End Google Analytics -->
</head> </head>
<body> <body>
<!-- Navigation --> <!-- Navigation -->
{% include "datacenterlight/includes/_navbar.html" %} {% include "datacenterlight/includes/_navbar.html" %}
{% block content %}
{% endblock %}
{% include "datacenterlight/includes/_footer.html" %}
<!-- Footer -->
<!-- jQuery -->
<script src="{% static 'datacenterlight/js/jquery.js' %}"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.5.4/bootstrap-select.js"></script> {% block content %}
{% endblock %}
<!-- Bootstrap Core JavaScript --> {% include "datacenterlight/includes/_footer.html" %}
<script src="{% static 'datacenterlight/js/bootstrap.min.js' %}"></script> <!-- Footer -->
<script src="{% static 'datacenterlight/js/main.js' %}"></script>
<!-- Load form js --> <!-- jQuery -->
<script src="{% static 'datacenterlight/js/form.js' %}"></script> <script src="{% static 'datacenterlight/js/jquery.js' %}"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.5.4/bootstrap-select.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> <script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.5.4/bootstrap-select.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="{% static 'datacenterlight/js/bootstrap.min.js' %}"></script>
<script src="{% static 'datacenterlight/js/main.js' %}"></script>
<!-- Load form js -->
<script src="{% static 'datacenterlight/js/form.js' %}"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.5.4/bootstrap-select.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>
</html> </html>

View file

@ -112,7 +112,7 @@
<h2>{% trans "Reliable and light" %}</h2> <h2>{% trans "Reliable and light" %}</h2>
</div> </div>
<div class="split-description"> <div class="split-description">
<p class="lead">{% trans "Our VMs are located in Switzerland, with reliable power supply and fast internet connection. Our VM costs less thanks to our featherlight infrastructure." %}</p> <p class="lead">{% trans "Our VMs are located in Switzerland, with reliable power supply and fast internet connection. Our VM costs less thanks to our featherlight infrastructure." %}</p>
</div> </div>
</div> </div>
@ -194,36 +194,36 @@
<!--<div class="description check-ip"> <!--<div class="description check-ip">
<input type="checkbox" name="ipv6"> Ipv6 Only<br> <input type="checkbox" name="ipv6"> Ipv6 Only<br>
</div>--> </div>-->
<div class="form-group"> <div class="form-group">
<div class="description input justify-center"> <div class="description input justify-center">
<label for="name" class="control-label">{% trans "Name"%}</label> <label for="name" class="control-label">{% trans "Name"%}</label>
<input type="text" name="name" class="form-control" placeholder="{% trans 'Your Name'%}" data-minlength="3" data-error="{% trans 'Please enter your name' %}" required> <input type="text" name="name" class="form-control" placeholder="{% trans 'Your Name'%}" data-minlength="3" data-error="{% trans 'Please enter your name' %}" required>
</div>
<div class="help-block with-errors">
{% for message in messages %}
{% if 'name' in message.tags %}
<ul class="list-unstyled"><li>
{{ message|safe }}
</li></ul>
{% endif %}
{% endfor %}
</div>
</div> </div>
<div class="form-group"> <div class="help-block with-errors">
<div class="description input justify-center"> {% for message in messages %}
<label for="email" class="control-label">{% trans "Email"%}</label> {% if 'name' in message.tags %}
<input name="email" type="email" pattern="^[^@\s]+@([^@\s]+\.)+[^@\s]+$" class="form-control" placeholder="{% trans 'Your Email' %}" data-error="{% trans 'Please enter a valid email address' %}" required> <ul class="list-unstyled"><li>
</div> {{ message|safe }}
<div class="help-block with-errors"> </li></ul>
{% for message in messages %} {% endif %}
{% if 'email' in message.tags %} {% endfor %}
<ul class="list-unstyled"><li>
{{ message|safe }}
</li></ul>
{% endif %}
{% endfor %}
</div>
</div> </div>
</div>
<div class="form-group">
<div class="description input justify-center">
<label for="email" class="control-label">{% trans "Email"%}</label>
<input name="email" type="email" pattern="^[^@\s]+@([^@\s]+\.)+[^@\s]+$" class="form-control" placeholder="{% trans 'Your Email' %}" data-error="{% trans 'Please enter a valid email address' %}" required>
</div>
<div class="help-block with-errors">
{% for message in messages %}
{% if 'email' in message.tags %}
<ul class="list-unstyled"><li>
{{ message|safe }}
</li></ul>
{% endif %}
{% endfor %}
</div>
</div>
</div> </div>
<input type="submit" class="btn btn-primary" value="{% trans 'Order Now!' %}"></input> <input type="submit" class="btn btn-primary" value="{% trans 'Order Now!' %}"></input>
</form> </form>
@ -278,4 +278,4 @@
</div> </div>
<!-- /.banner --> <!-- /.banner -->
{% endblock %} {% endblock %}

View file

@ -4,94 +4,94 @@
{% load custom_tags %} {% load custom_tags %}
{% block content %} {% block content %}
<div class="order-detail-container"> <div class="order-detail-container">
{% if messages %} {% if messages %}
<div class="row">
<div class="col-xs-12 col-md-8 col-md-offset-2">
<br/>
<div class="alert alert-warning">
{% for message in messages %}
<span>{{ message }}</span>
{% endfor %}
</div>
</div>
</div>
{% endif %}
{% if not error %}
<div class="row">
<div class="col-xs-12 col-md-8 col-md-offset-2">
<div class="invoice-title">
<h2>{% trans "Confirm Order"%}</h2>
</div>
<hr>
<div class="row"> <div class="row">
<div class="col-xs-6"> <div class="col-xs-12 col-md-8 col-md-offset-2">
<address> <br/>
<h3><b>{% trans "Billed To:"%}</b></h3> <div class="alert alert-warning">
{% with request.session.billing_address_data as billing_address %} {% for message in messages %}
{{request.session.user.name}}<br> {{billing_address|get_value_from_dict:'street_address'}}, {{billing_address|get_value_from_dict:'postal_code'}}<br> <span>{{ message }}</span>
{{billing_address|get_value_from_dict:'city'}}, {{billing_address|get_value_from_dict:'country'}}. {% endfor %}
{% endwith %} </div>
</address>
</div>
<div class="col-xs-6 text-right">
<address>
<strong>{% trans "Date"%}:</strong><br>
<span id="order-created_at">{% now "Y-m-d H:i" %}</span><br><br>
</address>
</div> </div>
</div> </div>
{% endif %}
{% if not error %}
<div class="row"> <div class="row">
<div class="col-xs-6"> <div class="col-xs-12 col-md-8 col-md-offset-2">
<address> <div class="invoice-title">
<strong>{% trans "Payment Method:"%}</strong><br> <h2>{% trans "Confirm Order"%}</h2>
{{cc_brand}} {% trans "ending" %} **** {{cc_last4}}<br> </div>
{{request.session.user.email}} <hr>
</address> <div class="row">
<div class="col-xs-6">
<address>
<h3><b>{% trans "Billed To:"%}</b></h3>
{% with request.session.billing_address_data as billing_address %}
{{request.session.user.name}}<br> {{billing_address|get_value_from_dict:'street_address'}}, {{billing_address|get_value_from_dict:'postal_code'}}<br>
{{billing_address|get_value_from_dict:'city'}}, {{billing_address|get_value_from_dict:'country'}}.
{% endwith %}
</address>
</div>
<div class="col-xs-6 text-right">
<address>
<strong>{% trans "Date"%}:</strong><br>
<span id="order-created_at">{% now "Y-m-d H:i" %}</span><br><br>
</address>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<address>
<strong>{% trans "Payment Method:"%}</strong><br>
{{cc_brand}} {% trans "ending" %} **** {{cc_last4}}<br>
{{request.session.user.email}}
</address>
</div>
</div>
</div> </div>
</div> </div>
</div>
</div> <div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="row"> <h3><b>{% trans "Order summary"%}</b></h3>
<div class="col-md-8 col-md-offset-2">
<h3><b>{% trans "Order summary"%}</b></h3>
<hr>
<div class="content">
{% with request.session.specs as vm %}
<p><b>{% trans "Cores"%}</b> <span class="pull-right">{{vm.cpu}}</span></p>
<hr> <hr>
<p><b>{% trans "Memory"%}</b> <span class="pull-right">{{vm.memory}} GB</span></p> <div class="content">
<hr> {% with request.session.specs as vm %}
<p><b>{% trans "Disk space"%}</b> <span class="pull-right">{{vm.disk_size}} GB</span></p> <p><b>{% trans "Cores"%}</b> <span class="pull-right">{{vm.cpu}}</span></p>
<hr> <hr>
<p><b>{% trans "Configuration"%}</b> <span class="pull-right">{{request.session.template.name}}</span></p> <p><b>{% trans "Memory"%}</b> <span class="pull-right">{{vm.memory}} GB</span></p>
<hr> <hr>
<h4>{% trans "Total"%}<p class="pull-right"><b>{{vm.price}} CHF</b></p></h4> <p><b>{% trans "Disk space"%}</b> <span class="pull-right">{{vm.disk_size}} GB</span></p>
{% endwith %} <hr>
<p><b>{% trans "Configuration"%}</b> <span class="pull-right">{{request.session.template.name}}</span></p>
<hr>
<h4>{% trans "Total"%}<p class="pull-right"><b>{{vm.price}} CHF</b></p></h4>
{% endwith %}
</div>
<br/>
<form method="post">
{% csrf_token %}
<div class=" content pull-right">
<a href="{{next_url}}" ><button class="btn btn-info">{% trans "Place order"%}</button></a>
</div>
</form>
</div>
</div> </div>
<br/> {% endif %}
<form method="post">
{% csrf_token %}
<div class=" content pull-right">
<a href="{{next_url}}" ><button class="btn btn-info">{% trans "Place order"%}</button></a>
</div>
</form>
</div>
</div> </div>
{% endif %}
</div>
<script type="text/javascript"> <script type="text/javascript">
window.onload = function () { window.onload = function () {
var locale_date = moment.utc(document.getElementById("order-created_at").textContent,'YYYY-MM-DD HH:mm').toDate(); var locale_date = moment.utc(document.getElementById("order-created_at").textContent,'YYYY-MM-DD HH:mm').toDate();
locale_date = moment(locale_date).format("YYYY-MM-DD h:mm:ss a"); locale_date = moment(locale_date).format("YYYY-MM-DD h:mm:ss a");
document.getElementById('order-created_at').innerHTML = locale_date; document.getElementById('order-created_at').innerHTML = locale_date;
}; };
</script> </script>
{%endblock%} {%endblock%}

View file

@ -13,73 +13,73 @@
<div class="price-calc-section"> <div class="price-calc-section">
<div class="card"> <div class="card">
<img class="img-beta" src="{% static 'datacenterlight/img/beta-img.png' %}" alt=""> <img class="img-beta" src="{% static 'datacenterlight/img/beta-img.png' %}" alt="">
<div class="caption"> <div class="caption">
<form method="POST" action=""> <form method="POST" action="">
{% csrf_token %} {% csrf_token %}
<div class="title">
<h3>{% trans "VM hosting" %} </h3>
</div>
<div class="price">
<span id="total">15</span>
<span>CHF</span>
<div class="price-text">
<p>{% trans "VAT included" %}</p>
</div>
</div>
<div class="descriptions">
<div class="description">
<p>{% trans "Hosted in Switzerland" %}</p>
</div>
<div class="description">
<i class="fa fa-minus-circle left" data-minus="cpu" aria-hidden="true"></i>
<input class="input-price" type="number" min="1" max="42" id="coreValue" name="cpu">
<span> Core</span>
<i class="fa fa-plus-circle right" data-plus="cpu" aria-hidden="true"></i>
</div>
<div class="description">
<i class="fa fa-minus-circle left" data-minus="ram" aria-hidden="true"></i>
<input id="ramValue" class="input-price" type="number" min="2" max="200" name="ram">
<span> GB RAM</span>
<i class="fa fa-plus-circle right" data-plus="ram" aria-hidden="true"></i>
</div>
<div class="description">
<i class="fa fa-minus-circle left" data-minus="storage" aria-hidden="true"></i>
<input id="storageValue" class="input-price" type="number" min="10" max="500" step="10" name="storage">
<span>{% trans "GB Storage (SSD)" %}</span>
<i class="fa fa-plus-circle right" data-plus="storage" aria-hidden="true"></i>
</div>
<div class="title">
<h3>{% trans "VM hosting" %} </h3>
<div class="description select-configuration input"> </div>
<label for="name">OS</label> <div class="price">
<select name="config" id=""> <span id="total">15</span>
{% for template in templates %} <span>CHF</span>
<option value="{{template.id}}">{{template.name}} </option> <div class="price-text">
{% endfor %} <p>{% trans "VAT included" %}</p>
</select> </div>
</div> </div>
<input type="hidden" name="total"> <div class="descriptions">
<div class="description">
<!-- <div class="description input"> <p>{% trans "Hosted in Switzerland" %}</p>
<label for="name">Name</label> </div>
<input type="text" name="name" placeholder="Your Name"> <div class="description">
</div> <i class="fa fa-minus-circle left" data-minus="cpu" aria-hidden="true"></i>
<div class="description input"> <input class="input-price" type="number" min="1" max="42" id="coreValue" name="cpu">
<label for="email">Email</label> <span> Core</span>
<input type="email" name="email" placeholder="Your Email"> <i class="fa fa-plus-circle right" data-plus="cpu" aria-hidden="true"></i>
</div> --> </div>
<div class="description">
<!--<div class="description check-ip"> <i class="fa fa-minus-circle left" data-minus="ram" aria-hidden="true"></i>
<input type="checkbox" name="ipv6"> Ipv6 Only<br> <input id="ramValue" class="input-price" type="number" min="2" max="200" name="ram">
</div>--> <span> GB RAM</span>
</div> <i class="fa fa-plus-circle right" data-plus="ram" aria-hidden="true"></i>
<input type="submit" class="btn btn-primary" value="{% trans 'Order Now!' %}"></input> </div>
<div class="description">
<i class="fa fa-minus-circle left" data-minus="storage" aria-hidden="true"></i>
<input id="storageValue" class="input-price" type="number" min="10" max="500" step="10" name="storage">
<span>{% trans "GB Storage (SSD)" %}</span>
<i class="fa fa-plus-circle right" data-plus="storage" aria-hidden="true"></i>
</div>
</form>
</div>
<div class="description select-configuration input">
<label for="name">OS</label>
<select name="config" id="">
{% for template in templates %}
<option value="{{template.id}}">{{template.name}} </option>
{% endfor %}
</select>
</div>
<input type="hidden" name="total">
<!-- <div class="description input">
<label for="name">Name</label>
<input type="text" name="name" placeholder="Your Name">
</div>
<div class="description input">
<label for="email">Email</label>
<input type="email" name="email" placeholder="Your Email">
</div> -->
<!--<div class="description check-ip">
<input type="checkbox" name="ipv6"> Ipv6 Only<br>
</div>-->
</div>
<input type="submit" class="btn btn-primary" value="{% trans 'Order Now!' %}"></input>
</form>
</div>
</div> </div>
<div class="text"> <div class="text">

View file

@ -14,21 +14,21 @@
</div> </div>
<script src="{% static 'datacenterlight/js/jquery.js' %}"></script> <script src="{% static 'datacenterlight/js/jquery.js' %}"></script>
<script type="text/javascript"> <script type="text/javascript">
window.onload=function(){ window.onload=function(){
$('.selectpicker').selectpicker({ $('.selectpicker').selectpicker({
style: 'btn-link', style: 'btn-link',
windowPadding: 10, windowPadding: 10,
}); });
var hash = window.location.hash.substr(1); var hash = window.location.hash.substr(1);
console.log(hash); console.log(hash);
if (hash == 'requestform'){ if (hash == 'requestform'){
$('#reques-success-message').modal('show'); $('#reques-success-message').modal('show');
} }
}; };
</script> </script>
<script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.5.4/bootstrap-select.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.5.4/bootstrap-select.js"></script>

View file

@ -213,9 +213,9 @@
<div class="help-block with-errors"> <div class="help-block with-errors">
{% for message in messages %} {% for message in messages %}
{% if 'name' in message.tags %} {% if 'name' in message.tags %}
<ul class="list-unstyled"><li> <ul class="list-unstyled"><li>
{{ message|safe }} {{ message|safe }}
</li></ul> </li></ul>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</div> </div>
@ -228,9 +228,9 @@
<div class="help-block with-errors"> <div class="help-block with-errors">
{% for message in messages %} {% for message in messages %}
{% if 'email' in message.tags %} {% if 'email' in message.tags %}
<ul class="list-unstyled"><li> <ul class="list-unstyled"><li>
{{ message|safe }} {{ message|safe }}
</li></ul> </li></ul>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</div> </div>
@ -251,4 +251,4 @@
<!-- End Why Data Center Light? --> <!-- End Why Data Center Light? -->
{% endblock %} {% endblock %}