diff --git a/src/pretix/plugins/paypal2/static/pretixplugins/paypal2/pretix-paypal.js b/src/pretix/plugins/paypal2/static/pretixplugins/paypal2/pretix-paypal.js index 98c969280..5768fc33f 100644 --- a/src/pretix/plugins/paypal2/static/pretixplugins/paypal2/pretix-paypal.js +++ b/src/pretix/plugins/paypal2/static/pretixplugins/paypal2/pretix-paypal.js @@ -92,7 +92,7 @@ var pretixpaypal = { } // We are setting the cogwheel already here, as the renderAPM() method might take some time to get loaded. - let apmtextselector = $("label[for=input_payment_paypal_apm]"); + let apmtextselector = $("input[name=payment][value=paypal_apm]").closest("label").find(".panel-title"); apmtextselector.prepend(' '); let sdk_url = 'https://www.paypal.com/sdk/js' + @@ -272,7 +272,7 @@ var pretixpaypal = { // The first selector is used on the regular payment-step of the checkout flow // The second selector is used for the payment method change view. // In the long run, the layout of both pages should be adjusted to be one. - let textselector = inputselector.closest("label"); + let textselector = inputselector.closest("label").find('.panel-title'); let textselector2 = inputselector.next("strong"); let eligibles = [];