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 %}
|
2016-04-27 06:54:15 +00:00
|
|
|
{% block content %}
|
2016-04-22 13:36:38 +00:00
|
|
|
<!-- Credit card form -->
|
|
|
|
<div>
|
2016-04-23 07:22:44 +00:00
|
|
|
<div class="container payment-container">
|
|
|
|
<div class="row">
|
2017-05-25 18:27:47 +00:00
|
|
|
<div class="col-xs-12 col-md-offset-2 col-md-4 summary-box">
|
|
|
|
<form role="form" novalidate>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-12">
|
|
|
|
<h3><b>Billing Amount</b></h3>
|
|
|
|
<hr>
|
|
|
|
<div class="content">
|
|
|
|
<!-- <p><b>Type</b> <span class="pull-right">{{request.session.vm_specs.location_code}}</span></p> -->
|
|
|
|
<!-- <hr> -->
|
|
|
|
<p><b>Cores</b> <span
|
|
|
|
class="pull-right">{{request.session.specs.cpu|floatformat}}</span></p>
|
|
|
|
<hr>
|
|
|
|
<p><b>Memory</b> <span
|
|
|
|
class="pull-right">{{request.session.specs.memory|floatformat}} GiB</span></p>
|
|
|
|
<hr>
|
|
|
|
<p><b>Disk space</b> <span
|
|
|
|
class="pull-right">{{request.session.specs.disk_size|floatformat}} GiB</span></p>
|
|
|
|
<hr>
|
|
|
|
<h4>Total<p
|
|
|
|
class="pull-right"><b>{{request.session.specs.price }} CHF</b></p></h4>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="col-xs-12 col-md-4 billing">
|
2016-04-23 07:22:44 +00:00
|
|
|
<h3><b>Billing Address</b></h3>
|
|
|
|
<hr>
|
2017-05-11 05:11:33 +00:00
|
|
|
<form role="form" id="billing-form" method="post" action="" novalidate>
|
2016-04-23 07:22:44 +00:00
|
|
|
{% for field in form %}
|
|
|
|
{% csrf_token %}
|
|
|
|
{% bootstrap_field field show_label=False type='fields'%}
|
|
|
|
{% endfor %}
|
|
|
|
{% bootstrap_form_errors form type='non_fields'%}
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-04-22 13:36:38 +00:00
|
|
|
<div class="row">
|
2017-05-25 18:27:47 +00:00
|
|
|
<div class="col-xs-12 col-md-offset-2 col-md-4 "></div>
|
|
|
|
<div class="col-xs-12 col-md-4 creditcard-box">
|
2016-04-22 13:36:38 +00:00
|
|
|
<h3><b>Payment Details</b></h3>
|
|
|
|
<hr>
|
|
|
|
<div>
|
2016-04-23 07:22:44 +00:00
|
|
|
<div>
|
2017-05-11 05:11:33 +00:00
|
|
|
{% 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>
|
|
|
|
<button id="payment_button_with_creditcard" class="btn btn-success btn-lg btn-block" type="submit">Submit Payment</button>
|
|
|
|
{% else %}
|
|
|
|
|
|
|
|
|
2016-04-22 13:36:38 +00:00
|
|
|
<form role="form" id="payment-form" novalidate>
|
|
|
|
<div class="row">
|
2016-06-04 07:59:37 +00:00
|
|
|
<div class="col-xs-9 col-md-12">
|
2016-04-22 13:36:38 +00:00
|
|
|
<div class="form-group">
|
|
|
|
<label class="control-label" for="cardNumber">CARD NUMBER</label>
|
|
|
|
<div class="input-group">
|
|
|
|
<input type="text" class="form-control" name="cardNumber" placeholder="Valid Card Number" required autofocus data-stripe="number" />
|
|
|
|
<span class="input-group-addon"><i class="fa fa-credit-card"></i></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
2016-06-04 07:59:37 +00:00
|
|
|
<div class="col-xs-6 col-md-7">
|
2016-04-22 13:36:38 +00:00
|
|
|
<div class="form-group">
|
2016-06-04 07:59:37 +00:00
|
|
|
<label for="expMonth">EXPIRATION DATE</label><br/>
|
|
|
|
<div class="col-xs-6 col-lg-6 col-md-6 pl-ziro">
|
2016-04-22 13:36:38 +00:00
|
|
|
<input type="text" class="form-control" name="expMonth" placeholder="MM" required data-stripe="exp_month" />
|
|
|
|
</div>
|
2016-06-04 07:59:37 +00:00
|
|
|
<div class="col-xs-6 col-lg-6 col-md-6 pl-ziro">
|
2016-04-22 13:36:38 +00:00
|
|
|
<input type="text" class="form-control" name="expYear" placeholder="YY" required data-stripe="exp_year" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-06-04 07:59:37 +00:00
|
|
|
<div class="col-xs-4 col-md-5 pull-right">
|
2016-04-22 13:36:38 +00:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="cvCode">CV CODE</label>
|
|
|
|
<input type="password" class="form-control" name="cvCode" placeholder="CV" required data-stripe="cvc" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-12">
|
|
|
|
<button class="btn btn-success btn-lg btn-block" type="submit">Submit Payment</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row" style="display:none;">
|
|
|
|
<div class="col-xs-12">
|
|
|
|
<p class="payment-errors"></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-04-27 06:54:15 +00:00
|
|
|
{% if paymentError %}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-12">
|
|
|
|
<p>
|
|
|
|
{% bootstrap_alert paymentError alert_type='danger' %}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
2016-04-22 13:36:38 +00:00
|
|
|
</form>
|
2017-05-11 05:11:33 +00:00
|
|
|
{% endif %}
|
2016-04-22 13:36:38 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
2017-05-11 05:11:33 +00:00
|
|
|
|
2016-04-26 06:16:03 +00:00
|
|
|
<!-- stripe key data -->
|
|
|
|
{% if stripe_key %}
|
|
|
|
<script type="text/javascript">
|
|
|
|
(function () {window.stripeKey = "{{stripe_key}}";})();
|
|
|
|
</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 %}
|
|
|
|
<script type="text/javascript">
|
|
|
|
(function () {window.hasCreditcard = true;})();
|
|
|
|
</script>
|
|
|
|
|
|
|
|
{%endif%}
|
|
|
|
|
2016-04-22 13:36:38 +00:00
|
|
|
{%endblock%}
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-26 06:16:03 +00:00
|
|
|
|