Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Update the default credit card form template

Marcin Gębala013a3914c396
diff --git a/templates/order/payment/default.html b/templates/order/payment/default.html
index 54a55c5de3..b3bb610320 100644
--- a/templates/order/payment/default.html
+++ b/templates/order/payment/default.html
@@ -3,17 +3,22 @@
{% load i18n %}
{% block forms %}
- <form id="payment-form" method="{{ form.method }}"{% if form.action %} action="{{ form.action }}"{% endif %} novalidate>
- {% csrf_token %}
- {{ form.media }}
- {% bootstrap_form form %}
- <div class="form-group">
- <div class="col-sm-2"></div>
- <div class="col-sm-10">
- <button type="submit" class="btn primary">
- {% trans "Save changes" context "Payment form primary action" %}
- </button>
- </div>
+<form method="{{ form.method }}" id="payment-form" class="form-horizontal"{% if form.action %} action="{{ form.action }}"{% endif %} novalidate>
+ {% csrf_token %}
+ {{ form.media }}
+ {% bootstrap_form form layout="horizontal" %}
+ {% if form.errors %}
+ <a class="btn" href="{% url "order:details" token=payment.order.token %}">
+ {% trans "Change payment method" context "Payment form (Stripe) secondary action" %}
+ </a>
+ {% endif %}
+ <div class="form-group">
+ <div class="col-sm-2"></div>
+ <div class="col-sm-10">
+ <button type="submit" class="btn primary">
+ {% trans "Save changes" context "Payment form primary action" %}
+ </button>
</div>
- </form>
+ </div>
+</form>
{% endblock forms %}