2016-04-22 13:36:38 +00:00
|
|
|
{% extends "hosting/base_short.html" %}
|
Created signup view. Added login after signup.Added signup url to nosystem app urls.py. Added logout view, Added logout button on nabber, Added password reset form, Added password view , Added password reset html, Added password reset email for nosystemd app. Added confirm_reset_password.html, Added confirm_ reset password view, Added confirm reset password form, Fixed reset password token generation, Started donation view, Added donation view, Added donation.html, Added donation form, Adding donation.js lib in order to capture stripe payments for nosystem app.
2016-07-22 06:24:32 +00:00
|
|
|
{% load staticfiles bootstrap3 i18n %}
|
2017-06-29 14:34:40 +00:00
|
|
|
{% block content %}
|
2016-04-22 13:36:38 +00:00
|
|
|
<!-- Credit card form -->
|
2017-07-16 11:07:49 +00:00
|
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/paymentfont/1.1.2/css/paymentfont.min.css"/>
|
2017-07-16 21:22:41 +00:00
|
|
|
<div class="dcl-order-container">
|
2017-07-15 14:09:51 +00:00
|
|
|
<div class="payment-container">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 dcl-order-sec">
|
2017-07-15 22:08:48 +00:00
|
|
|
<h3><strong>{%trans "Your Order" %}</strong></h3>
|
2017-07-15 14:09:51 +00:00
|
|
|
<div class="col-xs-6 col-sm-12 col-md-12 col-lg-12 dcl-order-table-header">
|
2017-07-16 21:22:41 +00:00
|
|
|
<div class="col-xs-12 col-sm-2 col-md-1 col-lg-1 tbl-header">
|
2017-07-15 22:08:48 +00:00
|
|
|
{%trans "Cores" %}
|
2017-07-15 14:09:51 +00:00
|
|
|
</div>
|
2017-07-16 21:22:41 +00:00
|
|
|
<div class="col-xs-12 col-sm-3 col-md-4 col-lg-4 tbl-header">
|
2017-07-15 22:08:48 +00:00
|
|
|
{%trans "Memory" %}
|
2017-07-15 14:09:51 +00:00
|
|
|
</div>
|
2017-07-15 22:08:48 +00:00
|
|
|
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-3 tbl-header">
|
|
|
|
{%trans "Disk space" %}
|
2017-07-15 14:09:51 +00:00
|
|
|
</div>
|
|
|
|
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 tbl-header">
|
2017-07-15 22:08:48 +00:00
|
|
|
{%trans "Configuration" %}
|
2017-07-15 14:09:51 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-xs-6 col-sm-12 col-md-12 col-lg-12 dcl-order-table-content">
|
2017-07-16 21:22:41 +00:00
|
|
|
<div class="col-xs-12 col-sm-2 col-md-1 col-lg-1 tbl-content">
|
2017-07-15 22:08:48 +00:00
|
|
|
{{request.session.specs.cpu|floatformat}}
|
2017-07-15 14:09:51 +00:00
|
|
|
</div>
|
2017-07-16 21:22:41 +00:00
|
|
|
<div class="col-xs-12 col-sm-3 col-md-4 col-lg-4 tbl-content">
|
2017-07-15 22:08:48 +00:00
|
|
|
{{request.session.specs.memory|floatformat}} GB
|
2017-07-15 14:09:51 +00:00
|
|
|
</div>
|
2017-07-15 22:08:48 +00:00
|
|
|
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-3 tbl-content">
|
|
|
|
{{request.session.specs.disk_size|floatformat}} GB
|
2017-07-15 14:09:51 +00:00
|
|
|
</div>
|
|
|
|
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 tbl-content">
|
2017-07-15 22:08:48 +00:00
|
|
|
{{request.session.template.name}}
|
2017-07-15 14:09:51 +00:00
|
|
|
</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">
|
2017-07-16 18:16:42 +00:00
|
|
|
{%trans "Total" %} <span>{%trans "including VAT" %}</span>
|
2017-07-15 14:09:51 +00:00
|
|
|
</div>
|
|
|
|
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 tbl-no-padding">
|
2017-08-24 07:25:22 +00:00
|
|
|
<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">/Month</span>
|
2017-07-15 22:08:48 +00:00
|
|
|
</div>
|
2017-07-15 14:09:51 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</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 %}
|
2016-04-23 07:22:44 +00:00
|
|
|
{% csrf_token %}
|
2017-07-15 14:09:51 +00:00
|
|
|
{% bootstrap_field field show_label=False type='fields'%}
|
|
|
|
{% endfor %}
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="col-xs-12 col-sm-7 col-md-6 creditcard-box dcl-creditcard">
|
|
|
|
<h3><b>{%trans "Credit Card"%}</b></h3>
|
|
|
|
<hr>
|
|
|
|
<div>
|
|
|
|
<div>
|
2017-07-15 22:08:48 +00:00
|
|
|
<p>
|
|
|
|
{% blocktrans %}
|
|
|
|
Please fill in your credit card information below. We are using <a
|
|
|
|
href="https://stripe.com" target="_blank">Stripe</a> for payment and do not store
|
|
|
|
your information in our database.
|
|
|
|
{% endblocktrans %}
|
|
|
|
</p>
|
2017-07-15 14:09:51 +00:00
|
|
|
</div>
|
|
|
|
<br>
|
|
|
|
<div>
|
|
|
|
{% if credit_card_data.last4 %}
|
|
|
|
<form role="form" id="payment-form-with-creditcard" novalidate>
|
|
|
|
<h5 class="billing-head">Credit Card</h5>
|
|
|
|
<h5 class="membership-lead">Last 4: *****{{credit_card_data.last4}}</h5>
|
|
|
|
<h5 class="membership-lead">Type: {{credit_card_data.cc_brand}}</h5>
|
|
|
|
<input type="hidden" name="credit_card_needed" value="false"/>
|
|
|
|
</form>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-12">
|
2017-08-07 14:02:47 +00:00
|
|
|
{% if not messages and not form.non_field_errors %}
|
|
|
|
<p class="card-warning-content card-warning-addtional-margin">
|
|
|
|
{% blocktrans %}
|
|
|
|
You are not making any payment yet. After submitting your card
|
|
|
|
information, you will be taken to the Confirm Order Page.
|
|
|
|
{% endblocktrans %}
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
2017-08-07 14:23:58 +00:00
|
|
|
<div id='payment_error'>
|
2017-08-07 14:02:47 +00:00
|
|
|
{% for message in messages %}
|
|
|
|
{% if 'failed_payment' or 'make_charge_error' in message.tags %}
|
|
|
|
<ul class="list-unstyled"><li>
|
|
|
|
<p class="card-warning-content card-warning-error">{{ message|safe }}</p>
|
|
|
|
</li></ul>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{% for error in form.non_field_errors %}
|
|
|
|
<p class="card-warning-content card-warning-error">
|
|
|
|
{{ error|escape }}
|
|
|
|
</p>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-07-15 14:09:51 +00:00
|
|
|
<div class="col-xs-12">
|
|
|
|
<div class="col-xs-6 pull-right">
|
2017-07-16 20:44:08 +00:00
|
|
|
<button id="payment_button_with_creditcard" class="btn btn-success stripe-payment-btn"
|
2017-07-15 22:08:48 +00:00
|
|
|
type="submit">
|
2017-07-16 11:22:53 +00:00
|
|
|
{%trans "Submit" %}
|
2017-07-15 14:09:51 +00:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-07-15 22:08:48 +00:00
|
|
|
|
2017-07-16 11:07:49 +00:00
|
|
|
{% else %}
|
|
|
|
<form action="" id="payment-form-new" method="POST">
|
|
|
|
<input type="hidden" name="token"/>
|
|
|
|
<div class="group">
|
2017-07-16 16:37:18 +00:00
|
|
|
<div class="col-xs-12 col-sm-12 col-md-10 col-lg-9 credit-card-goup">
|
2017-07-16 15:59:42 +00:00
|
|
|
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 card-element card-number-element">
|
2017-07-16 17:06:00 +00:00
|
|
|
<label>{%trans "Card Number" %}</label>
|
2017-07-16 15:59:42 +00:00
|
|
|
<div id="card-number-element" class="field my-input"></div>
|
|
|
|
</div>
|
2017-07-16 16:37:18 +00:00
|
|
|
<div class="col-xs-5 col-sm-3 col-md-3 col-lg-3 card-element card-expiry-element">
|
2017-07-16 17:06:00 +00:00
|
|
|
<label>{%trans "Expiry Date" %}</label>
|
2017-07-16 15:59:42 +00:00
|
|
|
<div id="card-expiry-element" class="field my-input"></div>
|
|
|
|
</div>
|
2017-07-16 16:37:18 +00:00
|
|
|
<div class="col-xs-12 col-sm-2 col-md-6 col-lg-7 hide-mobile"></div>
|
|
|
|
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-2 card-element card-cvc-element">
|
2017-07-16 17:06:00 +00:00
|
|
|
<label>{%trans "CVC" %}</label>
|
2017-07-16 15:59:42 +00:00
|
|
|
<div id="card-cvc-element" class="field my-input"></div>
|
|
|
|
</div>
|
|
|
|
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 card-element brand">
|
2017-07-16 17:06:00 +00:00
|
|
|
<label>{%trans "Card Type" %}</label>
|
2017-07-16 15:59:42 +00:00
|
|
|
<i class="pf pf-credit-card" id="brand-icon"></i>
|
|
|
|
</div>
|
2017-07-16 09:53:18 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-07-15 22:08:48 +00:00
|
|
|
<div id="card-errors" role="alert"></div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-12">
|
2017-08-07 14:02:47 +00:00
|
|
|
{% if not messages and not form.non_field_errors %}
|
2017-08-04 08:01:32 +00:00
|
|
|
<p class="card-warning-content">
|
|
|
|
{% blocktrans %}
|
|
|
|
You are not making any payment yet. After submitting your card
|
|
|
|
information, you will be taken to the Confirm Order Page.
|
|
|
|
{% endblocktrans %}
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
2017-08-07 14:23:58 +00:00
|
|
|
<div id='payment_error'>
|
2017-08-04 08:01:32 +00:00
|
|
|
{% for message in messages %}
|
2017-08-07 14:02:47 +00:00
|
|
|
{% if 'failed_payment' or 'make_charge_error' in message.tags %}
|
2017-08-04 08:01:32 +00:00
|
|
|
<ul class="list-unstyled"><li>
|
2017-08-04 09:38:24 +00:00
|
|
|
<p class="card-warning-content card-warning-error">{{ message|safe }}</p>
|
2017-08-04 08:01:32 +00:00
|
|
|
</li></ul>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
2017-08-07 07:05:12 +00:00
|
|
|
|
2017-08-07 14:02:47 +00:00
|
|
|
{% for error in form.non_field_errors %}
|
|
|
|
<p class="card-warning-content card-warning-error">
|
|
|
|
{{ error|escape }}
|
|
|
|
</p>
|
|
|
|
{% endfor %}
|
2017-08-04 08:01:32 +00:00
|
|
|
</div>
|
2017-07-15 22:08:48 +00:00
|
|
|
</div>
|
|
|
|
<div class="col-xs-12">
|
|
|
|
<div class="col-xs-6 pull-right">
|
2017-07-16 11:22:53 +00:00
|
|
|
<button class="btn btn-success stripe-payment-btn" type="submit">{%trans "Submit" %}
|
2017-07-15 22:08:48 +00:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-07-16 09:53:18 +00:00
|
|
|
|
2017-07-15 22:08:48 +00:00
|
|
|
<div class="row" style="display:none;">
|
|
|
|
<div class="col-xs-12">
|
|
|
|
<p class="payment-errors"></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-07-16 11:07:49 +00:00
|
|
|
</form>
|
|
|
|
|
2017-07-15 22:08:48 +00:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
2017-07-15 14:09:51 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-04-22 13:36:38 +00:00
|
|
|
</div>
|
2017-05-11 05:11:33 +00:00
|
|
|
|
2016-04-26 06:16:03 +00:00
|
|
|
<!-- stripe key data -->
|
|
|
|
{% if stripe_key %}
|
2017-06-04 22:04:38 +00:00
|
|
|
{% get_current_language as LANGUAGE_CODE %}
|
2017-06-29 14:34:40 +00:00
|
|
|
<script type="text/javascript">
|
2017-07-16 11:22:53 +00:00
|
|
|
window.processing_text = '{%trans "Processing" %}';
|
2017-07-16 18:25:29 +00:00
|
|
|
window.enter_your_card_text = '{%trans "Enter your credit card number" %}';
|
2017-06-04 22:04:38 +00:00
|
|
|
|
2017-07-15 14:09:51 +00:00
|
|
|
(function () {
|
2017-06-04 22:04:38 +00:00
|
|
|
window.stripeKey = "{{stripe_key}}";
|
|
|
|
window.current_lan = "{{LANGUAGE_CODE}}";
|
|
|
|
})();
|
2016-04-26 06:16:03 +00:00
|
|
|
</script>
|
|
|
|
{%endif%}
|
2016-04-22 13:36:38 +00:00
|
|
|
|
2017-05-11 05:11:33 +00:00
|
|
|
{% if credit_card_data.last4 and credit_card_data.cc_brand %}
|
2017-06-29 14:34:40 +00:00
|
|
|
<script type="text/javascript">
|
2017-07-15 14:09:51 +00:00
|
|
|
(function () {
|
|
|
|
window.hasCreditcard = true;
|
|
|
|
})();
|
2017-05-11 05:11:33 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
{%endif%}
|
|
|
|
|
2016-04-22 13:36:38 +00:00
|
|
|
{%endblock%}
|