From bd2c728da2e1aec769d3e7ab19fa15dbc95ecad0 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Thu, 19 Mar 2015 10:37:30 +0100 Subject: [PATCH] Stripe: Only use special JavaScript is Stripe is the selected payment method --- .../stripe/static/pretixplugins/stripe/pretix-stripe.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pretix/plugins/stripe/static/pretixplugins/stripe/pretix-stripe.js b/src/pretix/plugins/stripe/static/pretixplugins/stripe/pretix-stripe.js index e33c86335e..093684a0a7 100644 --- a/src/pretix/plugins/stripe/static/pretixplugins/stripe/pretix-stripe.js +++ b/src/pretix/plugins/stripe/static/pretixplugins/stripe/pretix-stripe.js @@ -59,7 +59,7 @@ var pretixstripe = { var $form = $("#stripe_number").parents("form"); waitingDialog.hide(); if (response.error) { - $(".stripe-errors").stop().hide(); + $(".stripe-errors").stop().hide().removeClass("sr-only"); $(".stripe-errors").html("
" + response.error.message + "
"); $(".stripe-errors").slideDown(); } else { @@ -85,7 +85,7 @@ $(function() { .keyup(pretixstripe.validate_cvc) $("#stripe_number").parents("form").submit( function () { - if ($("#stripe_token").val() == "") { + if ($("input[name=payment][value=stripe]").prop('checked') && $("#stripe_token").val() == "") { pretixstripe.request(); return false; }