Skip to content

Commit

Permalink
ledger: modify the text on the place order button
Browse files Browse the repository at this point in the history
  • Loading branch information
rayrayndwiga committed Dec 6, 2016
1 parent 4c9b5c2 commit 5cc2c3d
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions ledger/templates/checkout/preview.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,31 @@ <h2>{% trans 'Totals' %}</h2>

{% endblock %}

{% block place_order %}
<form method="post" action="{% url 'checkout:preview' %}" id="place_order_form">
{% csrf_token %}
<input type="hidden" name="action" value="place_order" />

{% comment %}
When submitting sensitive data on the payment details page (eg a bankcard)
we don't want to save the data and so we pass the bound form to the preview
template and render it in a hidden div. Then the payment information will
get re-submitted when the user confirms the order.
{% endcomment %}
<div style="display:none">
{% block hiddenforms %}{% endblock %}
</div>

<div class="form-group clearfix">
<div class="row">
<div class="col-sm-3 col-sm-offset-9">
<button id='place-order' type="submit" class="btn btn-primary btn-lg btn-block" data-loading-text="{% trans 'Submitting...' %}">{% trans "Pay" %}</button>
</div>
</div>
</div>
</form>
{% endblock place_order %}

{% block hiddenforms %}
{{ bankcard_form.as_p }}
{% endblock %}

0 comments on commit 5cc2c3d

Please sign in to comment.