diff --git a/js/forms.js b/js/forms.js index 13234b3ca..464960958 100644 --- a/js/forms.js +++ b/js/forms.js @@ -65,7 +65,7 @@ Liberapay.forms.jsSubmit = function() { // Determine the submission mode var form_on_success = form.getAttribute('data-on-success'); var button, button_on_success; - if (e.submitter.tagName == 'BUTTON') { + if (e.submitter && e.submitter.tagName == 'BUTTON') { button = e.submitter; button_on_success = button.getAttribute('data-on-success'); } diff --git a/liberapay/elsewhere/twitter.py b/liberapay/elsewhere/twitter.py index f5c93cc41..bd51bc050 100644 --- a/liberapay/elsewhere/twitter.py +++ b/liberapay/elsewhere/twitter.py @@ -8,7 +8,7 @@ class Twitter(PlatformOAuth1): # Platform attributes name = 'twitter' display_name = 'Twitter' - account_url = 'https://twitter.com/{user_name}' + account_url = 'https://x.com/{user_name}' # Auth attributes auth_url = 'https://api.twitter.com' diff --git a/www/%username/giving/pay/paypal/%payin_id.spt b/www/%username/giving/pay/paypal/%payin_id.spt index c2d96b40b..5ecd6384c 100644 --- a/www/%username/giving/pay/paypal/%payin_id.spt +++ b/www/%username/giving/pay/paypal/%payin_id.spt @@ -40,6 +40,7 @@ if request.method == 'POST': JOIN participants p ON p.id = t.tippee WHERE t.tipper = %s AND t.id IN %s + AND t.renewal_mode > 0 AND p.payment_providers & %s > 0 ORDER BY t.id """, (payer.id, set(body.parse_list('tips', int)), PAYPAL_BIT)) @@ -106,7 +107,7 @@ tippees = request.qs.parse_list('beneficiary', int, default=None) if tippees: tips = [ tip for tip in payer.get_tips_to(tippees) - if tip.tippee_p.payment_providers & PAYPAL_BIT > 0 + if tip.renewal_mode > 0 and tip.tippee_p.payment_providers & PAYPAL_BIT > 0 ] if len(set(tip.amount.currency for tip in tips)) != 1: raise response.invalid_input(tippees, 'beneficiary', 'querystring') diff --git a/www/%username/giving/pay/stripe/%payin_id.spt b/www/%username/giving/pay/stripe/%payin_id.spt index 9ed8d036c..a24f700c7 100644 --- a/www/%username/giving/pay/stripe/%payin_id.spt +++ b/www/%username/giving/pay/stripe/%payin_id.spt @@ -50,6 +50,7 @@ if request.method == 'POST': JOIN participants p ON p.id = t.tippee WHERE t.tipper = %s AND t.id IN %s + AND t.renewal_mode > 0 AND p.payment_providers & %s > 0 ORDER BY t.id """, (payer.id, set(body.parse_list('tips', int)), STRIPE_BIT)) @@ -198,7 +199,7 @@ tippees = request.qs.parse_list('beneficiary', int, default=None) if tippees: tips = [ tip for tip in payer.get_tips_to(tippees) - if tip.tippee_p.payment_providers & STRIPE_BIT > 0 + if tip.renewal_mode > 0 and tip.tippee_p.payment_providers & STRIPE_BIT > 0 ] if len(set(tip.amount.currency for tip in tips)) != 1: raise response.invalid_input(tippees, 'beneficiary', 'querystring') diff --git a/www/%username/routes/index.spt b/www/%username/routes/index.spt index 606f9cb7c..57588494b 100644 --- a/www/%username/routes/index.spt +++ b/www/%username/routes/index.spt @@ -191,9 +191,9 @@ title = _("Payment Instruments") name="set_as_default_for" value="{{ route.id }}:" title="{{ _( 'Stop using this instrument by default for payments in {currency}.', - currency=Currency(last_payin.amount.currency) + currency=Currency(route.is_default_for) ) }}">{{ _( - "Unset as default for {currency}", currency=last_payin.amount.currency + "Unset as default for {currency}", currency=route.is_default_for ) }} % elif route.network != 'stripe-card' and last_payin and participant.donates_in_multiple_currencies