dcl form added
This commit is contained in:
parent
230866e563
commit
3c32abbf8e
3 changed files with 17 additions and 8 deletions
|
@ -3,3 +3,10 @@
|
|||
{% block navbar %}
|
||||
{% include "datacenterlight/includes/_navbar.html" %}
|
||||
{% 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)
|
||||
def get(self, request, *args, **kwargs):
|
||||
# if 'specs' not in request.session or 'user' not in request.session:
|
||||
# return HttpResponseRedirect(reverse('datacenterlight:index'))
|
||||
# if 'token' not in request.session:
|
||||
# return HttpResponseRedirect(reverse('datacenterlight:payment'))
|
||||
if 'specs' not in request.session or 'user' not in request.session:
|
||||
return HttpResponseRedirect(reverse('datacenterlight:index'))
|
||||
if 'token' not in request.session:
|
||||
return HttpResponseRedirect(reverse('datacenterlight:payment'))
|
||||
stripe_customer_id = request.session.get('customer')
|
||||
customer = StripeCustomer.objects.filter(id=stripe_customer_id).first()
|
||||
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>
|
||||
<div class="col-sm-4 order-confirm-btn text-right">
|
||||
{% block submit_btn %}
|
||||
<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>
|
||||
{% endblock submit_btn %}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
Loading…
Reference in a new issue