merged master
This commit is contained in:
commit
734a41a371
25 changed files with 330 additions and 370 deletions
8
hosting/templates/hosting/includes/_messages.html
Normal file
8
hosting/templates/hosting/includes/_messages.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{% if messages %}
|
||||
<ul class="list-unstyled msg-list">
|
||||
{% for message in messages %}
|
||||
<div
|
||||
class="alert {% if message.tags and message.tags == 'error' %} alert-danger {% else %} alert-{{message.tags}} {% endif %}">{{ message|safe }}</div>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
|
@ -16,13 +16,7 @@
|
|||
<div class="auth-content">
|
||||
<div class="intro-message auth-box">
|
||||
<h2 class="section-heading">{% trans "Login"%}</h2>
|
||||
{% if messages %}
|
||||
<ul class="list-unstyled msg-list">
|
||||
{% for message in messages %}
|
||||
<li>{{ message }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% include 'hosting/includes/_messages.html' %}
|
||||
<form action="{% url 'hosting:login' %}" method="post" class="form" novalidated>
|
||||
{% csrf_token %}
|
||||
{% for field in form %}
|
||||
|
|
|
|||
|
|
@ -17,10 +17,12 @@
|
|||
<h1 class="dashboard-title-thin">
|
||||
<img src="{% static 'hosting/img/billing.svg' %}" class="un-icon">{% blocktrans with page_header_text=page_header_text|default:"Invoice" %}{{page_header_text}}{% endblocktrans %}
|
||||
</h1>
|
||||
<div class="dashboard-container-options">
|
||||
<button type="button" class="btn-plain btn-pdf" data-target="#order-detail{{order.pk}}"><img src="{% static 'hosting/img/icon-pdf.svg' %}" class="svg-img"></button>
|
||||
<button type="button" class="btn-plain btn-print"><img src="{% static 'hosting/img/icon-print.svg' %}" class="svg-img"></button>
|
||||
</div>
|
||||
{% if order %}
|
||||
<div class="dashboard-container-options">
|
||||
<button type="button" class="btn-plain btn-pdf" data-target="#order-detail{{order.pk}}"><img src="{% static 'hosting/img/icon-pdf.svg' %}" class="svg-img"></button>
|
||||
<button type="button" class="btn-plain btn-print"><img src="{% static 'hosting/img/icon-print.svg' %}" class="svg-img"></button>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="order-details">
|
||||
{% if order %}
|
||||
|
|
@ -29,7 +31,7 @@
|
|||
</p>
|
||||
{% endif %}
|
||||
<p>
|
||||
<strong>{% trans "Invoice Date" %}:</strong>
|
||||
<strong>{% trans "Date" %}:</strong>
|
||||
<span id="order-created_at">
|
||||
{% if order %}
|
||||
{{order.created_at|date:'Y-m-d H:i'}}
|
||||
|
|
@ -80,8 +82,7 @@
|
|||
{{order.last4}}<br>
|
||||
{{user.email}}
|
||||
{% else %}
|
||||
{{cc_brand|default:'Card'}} {% trans "ending in" %} ****
|
||||
{{cc_last4}}<br>
|
||||
{{cc_brand|default:_('Credit Card')}} {% trans "ending in" %} ****{{cc_last4}}<br>
|
||||
{% if request.user.is_authenticated %}
|
||||
{{request.user.email}}
|
||||
{% else %}
|
||||
|
|
@ -94,7 +95,12 @@
|
|||
<div>
|
||||
<h4>{% trans "Order summary" %}</h4>
|
||||
<p>
|
||||
<strong>{% trans "Product" %}:</strong> {{vm.name}}
|
||||
<strong>{% trans "Product" %}:</strong>
|
||||
{% if vm.name %}
|
||||
{{ vm.name }}
|
||||
{% else %}
|
||||
{{ request.session.template.name }}
|
||||
{% endif %}
|
||||
</p>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
|
|
@ -132,19 +138,21 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
{% if not order %}
|
||||
<form method="post" id="virtual_machine_create_form">
|
||||
{% 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>
|
||||
{% block submit_btn %}
|
||||
<form method="post" id="virtual_machine_create_form">
|
||||
{% 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>
|
||||
<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">
|
||||
{% trans "Place order" %}
|
||||
</button>
|
||||
</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">
|
||||
{% trans "Place order" %}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
{% endblock submit_btn %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
|
@ -197,8 +205,10 @@
|
|||
{%endblock%}
|
||||
|
||||
{% block js_extra %}
|
||||
<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/order.js' %}"></script>
|
||||
{% 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/order.js' %}"></script>
|
||||
{% endif %}
|
||||
{% endblock js_extra %}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
<div class="auth-content">
|
||||
<div class="intro-message auth-box sign-up">
|
||||
<h2 class="section-heading">{% trans "Resend activation link"%}</h2>
|
||||
{% include 'hosting/includes/_messages.html' %}
|
||||
<form action="{% url 'hosting:resend_activation_link' %}" method="post" class="form" novalidate>
|
||||
{% csrf_token %}
|
||||
{% for field in form %}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
<div class="auth-content">
|
||||
<div class="intro-message auth-box sign-up">
|
||||
<h2 class="section-heading">{% trans "Reset your password"%}</h2>
|
||||
{% include 'hosting/includes/_messages.html' %}
|
||||
<form action="{% url 'hosting:reset_password' %}" method="post" class="form" novalidate>
|
||||
{% csrf_token %}
|
||||
{% for field in form %}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
<div class="auth-content">
|
||||
<div class="intro-message auth-box sign-up">
|
||||
<h2 class="section-heading">{% trans "Sign up"%}</h2>
|
||||
{% include 'hosting/includes/_messages.html' %}
|
||||
<form action="{% url 'hosting:signup' %}" method="post" class="form" novalidate>
|
||||
{% csrf_token %}
|
||||
{% for field in form %}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
<div class="auth-center">
|
||||
<div class="auth-title">
|
||||
<h2>{% trans "Your VM hosted in Switzerland"%}</h2>
|
||||
{% include 'hosting/includes/_messages.html' %}
|
||||
</div>
|
||||
<div class="auth-content">
|
||||
<div class="intro-message auth-box sign-up">
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
<p>{% trans 'To create a new virtual machine, click "Create VM"' %}
|
||||
{% if show_create_ssh_key_msg %}
|
||||
{% url 'hosting:create_ssh_key' as create_ssh_url %}
|
||||
<br/>{% blocktrans %}To access your VM, add your SSH key <a href="{{create_ssh_url}}">here</a>{% endblocktrans %}
|
||||
<br/>{% blocktrans %}To access your VM, <a href="{{create_ssh_url}}">add your SSH key here</a>{% endblocktrans %}
|
||||
{% endif %}
|
||||
</p>
|
||||
<div class="text-right">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue