Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
99 lines (96 sloc) 4.23 KB
{% extends "saas/base.html" %}
{% block content %}
<div class="container">
<div class="page-header">
<h1>{% block order_title %}{% trans %}Place order{% endtrans %}{% endblock %}</h1>
</div>
<div class="row">
<div class="col-md-12">
<form method="post" id="payment-form" class="form-horizontal"
action=".{% if next %}/?next={{next}}{% endif %}">
<input type="hidden" name="csrfmiddlewaretoken" value="{{csrf_token}}">
{% if invoicables %}
{% include "saas/_invoiceables.html" %}
{% elif is_extra_charge %}
<fieldset id="extra-charge">
<legend>{% trans %}Extra Charge{% endtrans %}</legend>
<div class="form-group{% if form.descr.errors %} has-error{% endif %}">
<label class="col-form-label" for="descr">{% trans %}Description{% endtrans %}</label>
<div class="controls">
<input id="descr" class="form-control" name="descr"
type="text" placeholder="{% trans %}Description for the charge{% endtrans %}" />
</div>
{% for error in form.descr.errors %}
<span class="form-text"><strong>{{error}}</strong></span>
{% endfor %}
</div>
<div class="form-group{% if form.amount.errors %} has-error{% endif %}">
<label class="col-form-label" for="amount">{% trans %}Amount{% endtrans %}</label>
<div class="controls">
<input id="amount" class="form-control"
type="number" min="0" step="any" placeholder="0"
name="amount" autocomplete="off" />
</div>
{% for error in form.amount.errors %}
<span class="form-text"><strong>{{error}}</strong></span>
{% endfor %}
</div>
</fieldset>
{% else %}
{% block no_invoicables %}
<p class="text-center">{% trans %}Your subscription cart is empty.{% endtrans %}</p>
{% endblock %}
{% endif %}
{% block order_footer %}
<div id="redeem-code" class="text-right my-3">
<a href="" class="collapsible">{% trans %}Have a registration code?{% endtrans %}</a>
<div style="display:none;" class="mt-3">
<div class="row justify-content-end">
<div class="col-12 col-md-4">
<div class="input-group input-group mb-1">
<input class="form-control" name="code" type="text" placeholder="{% trans %}Enter Code{% endtrans %}">
<div class="input-group-append">
<button class="btn btn-primary submit-code">{% trans %}Apply{% endtrans %}</button>
</div>
</div>
<small class="form-text text-muted text-left">
{% trans %}If you received a registration code, please enter it here.{% endtrans %}
</small>
</div>
</div>
</div>
</div>
{% endblock %}
{% block order_card %}
{% include "saas/_card_use.html" %}
{% endblock %}
</form>
</div>
</div>
</div>
{% endblock %}
{% block saas_bodyscripts %}
<script type="text/javascript">
jQuery(document).ready(function($) {
$(".collapsible").click(function(event) {
var self = this;
event.preventDefault();
$(self).next().toggle();
});
var cardForm = $("#payment-form");
{% if urls and urls.api_cart %}
if( cardForm.length > 0 ) {
cardForm.find("#invoicables").invoice(
{currency_unit: "{% if lines_price %}{{ lines_price.unit }}{% endif %}",
saas_api_cart: "{{ urls.api_cart }}" });
}
{% endif %}
{% if STRIPE_PUB_KEY %}
cardForm.card({
stripePubKey: "{{ STRIPE_PUB_KEY }}",
saas_api_card: "{{ urls.organization.api_card }}"
});
{% endif %}
});
</script>
{% endblock %}
You can’t perform that action at this time.