Fix paypal disabling continue button (Z#23110784) (#2875)

This commit is contained in:
Richard Schreiber
2022-11-03 13:27:30 +01:00
committed by GitHub
parent bccd7cd1a4
commit 0b95f89882

View File

@@ -72,8 +72,10 @@ var pretixpaypal = {
pretixpaypal.currency = $("body").attr("data-currency");
pretixpaypal.locale = this.guessLocale();
}
pretixpaypal.continue_button.prop("disabled", true);
// if no payment option is selected, disable the continue button
if (!pretixpaypal.continue_button[0].form.elements['payment'].value) {
pretixpaypal.continue_button.prop("disabled", true);
}
// 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]");
@@ -310,7 +312,6 @@ var pretixpaypal = {
'tr_TR',
]
let lang = $("body").attr("data-locale").split('-')[0];
console.log(allowed_locales.find(element => element.startsWith(lang)));
return allowed_locales.find(element => element.startsWith(lang));
}
};