Apply suggestions from code review

This commit is contained in:
Mira
2024-12-12 15:17:35 +01:00
committed by GitHub
parent df1ba5e194
commit bde42d5178
4 changed files with 5 additions and 5 deletions
@@ -92,7 +92,7 @@ var pretixpaypal = {
}
// We are setting the cogwheel already here, as the renderAPM() method might take some time to get loaded.
const apmtextselector = $("input[name=payment][value=paypal_apm]").closest("fieldset").find(".provider-name");
const apmtextselector = $("input[name=payment][value=paypal_apm]").closest("label").find(".accordion-label-text");
apmtextselector.append(' <span aria-hidden="true" class="fa fa-cog fa-spin"></span>');
let sdk_url = 'https://www.paypal.com/sdk/js' +
@@ -269,7 +269,7 @@ var pretixpaypal = {
renderAPMs: function () {
pretixpaypal.restore();
let inputselector = $("input[name=payment][value=paypal_apm]");
let textselector = inputselector.closest("fieldset").find('.provider-name');
let textselector = inputselector.closest("label").find('.accordion-label-text');
let eligibles = [];
pretixpaypal.paypal.getFundingSources().forEach(function (fundingSource) {
@@ -74,7 +74,7 @@
{% if selected == p.provider.identifier %}checked="checked"{% endif %}
aria-controls="payment_{{ p.provider.identifier }}"
data-wallets="{{ p.provider.walletqueries|join:"|" }}" />
<strong class="provider-name">{{ p.provider.public_name }}</strong>
<strong class="accordion-label-text">{{ p.provider.public_name }}</strong>
</span>
</label>
</legend>
@@ -39,7 +39,7 @@
<input type="radio" name="payment" value="{{ p.provider.identifier }}"
{% if selected == p.provider.identifier %}checked="checked"{% endif %}
data-wallets="{{ p.provider.walletqueries|join:"|" }}"/>
<strong class="provider-name">{{ p.provider.public_name }}</strong>
<strong class="accordion-label-text">{{ p.provider.public_name }}</strong>
</span>
</label>
</legend>
@@ -53,7 +53,7 @@ $(function () {
});
wallets.forEach(function(wallet) {
const labels = $('[data-wallets*='+wallet+'] + .provider-name')
const labels = $('[data-wallets*='+wallet+'] + .accordion-label-text')
.append('<span class="wallet wallet-loading" data-wallet="'+wallet+'"> <span aria-hidden="true" class="fa fa-cog fa-spin"></span></span>')
walletdetection[wallet]()
.then(function(result) {