Skip to content

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

Hide `Make Payment` button from the payment form for autosubmit payments

NyanKiyoshi14db1f182473
diff --git a/templates/order/payment/default.html b/templates/order/payment/default.html
index 6de368f948..e7440ca6d8 100644
--- a/templates/order/payment/default.html
+++ b/templates/order/payment/default.html
@@ -12,13 +12,15 @@
{% 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 "Make payment" context "Payment form primary action" %}
- </button>
+ {% if not form.autosubmit %}
+ <div class="form-group">
+ <div class="col-sm-2"></div>
+ <div class="col-sm-10">
+ <button type="submit" class="btn primary">
+ {% trans "Make payment" context "Payment form primary action" %}
+ </button>
+ </div>
</div>
- </div>
+ {% endif %}
</form>
{% endblock forms %}