dcl form added
This commit is contained in:
parent
230866e563
commit
3c32abbf8e
3 changed files with 17 additions and 8 deletions
|
@ -2,4 +2,11 @@
|
||||||
|
|
||||||
{% block navbar %}
|
{% block navbar %}
|
||||||
{% include "datacenterlight/includes/_navbar.html" %}
|
{% include "datacenterlight/includes/_navbar.html" %}
|
||||||
{% endblock navbar %}
|
{% endblock navbar %}
|
||||||
|
|
||||||
|
{% block submit_btn %}
|
||||||
|
<form action="" method="POST">
|
||||||
|
{% csrf_token %}
|
||||||
|
<button type="submit" class="btn choice-btn">{% trans "Place order" %}</button>
|
||||||
|
</form>
|
||||||
|
{% endblock submit_btn %}
|
|
@ -484,10 +484,10 @@ class OrderConfirmationView(DetailView):
|
||||||
|
|
||||||
@cache_control(no_cache=True, must_revalidate=True, no_store=True)
|
@cache_control(no_cache=True, must_revalidate=True, no_store=True)
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
# if 'specs' not in request.session or 'user' not in request.session:
|
if 'specs' not in request.session or 'user' not in request.session:
|
||||||
# return HttpResponseRedirect(reverse('datacenterlight:index'))
|
return HttpResponseRedirect(reverse('datacenterlight:index'))
|
||||||
# if 'token' not in request.session:
|
if 'token' not in request.session:
|
||||||
# return HttpResponseRedirect(reverse('datacenterlight:payment'))
|
return HttpResponseRedirect(reverse('datacenterlight:payment'))
|
||||||
stripe_customer_id = request.session.get('customer')
|
stripe_customer_id = request.session.get('customer')
|
||||||
customer = StripeCustomer.objects.filter(id=stripe_customer_id).first()
|
customer = StripeCustomer.objects.filter(id=stripe_customer_id).first()
|
||||||
stripe_utils = StripeUtils()
|
stripe_utils = StripeUtils()
|
||||||
|
|
|
@ -139,9 +139,11 @@
|
||||||
<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 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>
|
||||||
<div class="col-sm-4 order-confirm-btn text-right">
|
<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">
|
{% block submit_btn %}
|
||||||
{% trans "Place order" %}
|
<button class="btn choice-btn" id="btn-create-vm" data-href="{% url 'hosting:order-confirmation' %}" data-toggle="modal" data-target="#createvm-modal">
|
||||||
</button>
|
{% trans "Place order" %}
|
||||||
|
</button>
|
||||||
|
{% endblock submit_btn %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Reference in a new issue