From 371a70d7ff9912a6bfcd54bcbdac96ae8eae8d26 Mon Sep 17 00:00:00 2001 From: Changaco Date: Sun, 5 Nov 2017 23:45:15 +0100 Subject: [PATCH 1/8] add currency to payin page URLs --- www/%username/tip.spt | 5 ++++- www/%username/wallet/payin/%back_to.spt | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/www/%username/tip.spt b/www/%username/tip.spt index afc1214074..1da435b61e 100644 --- a/www/%username/tip.spt +++ b/www/%username/tip.spt @@ -71,7 +71,10 @@ if request.method == 'POST': back_to += '&' if '?' in back_to else '?' back_to += 'success=' + b64encode_s(out["msg"]) if out['amount'] and not out['is_funded'] and not out['is_pledge']: - response.redirect('/' + tipper.username + '/wallet/payin/' + b64encode_s(back_to)) + response.redirect( + '/' + tipper.username + '/wallet/payin/' + b64encode_s(back_to) + + '?currency=' + currency + ) response.redirect(back_to, trusted_url=False) else: out = tipper.get_tip_to(tippee) diff --git a/www/%username/wallet/payin/%back_to.spt b/www/%username/wallet/payin/%back_to.spt index 0eee156126..7f396eab99 100644 --- a/www/%username/wallet/payin/%back_to.spt +++ b/www/%username/wallet/payin/%back_to.spt @@ -79,7 +79,7 @@ title = _("Adding Money") {{ _("Easy and instantaneous") }} {{ _("Fees: {0}% + {1}", *constants.FEE_PAYIN_CARD[currency].with_vat) }}
{{ _("Please select a precomputed amount or input a custom one.") }}
{{ _("You have {0} in your Liberapay wallet.", balance) }} % if not success @@ -132,8 +146,15 @@ title = _("Withdrawing Money")
{{ _("Go back") }}
{{ _("You have {0} in your Liberapay wallet.", balances) }}
{{ _("Which currency do you want to withdraw?") }}
+ % for currency in currencies + {{ locale.currencies.get(currency, currency) }} ({{ locale.currency_symbols.get(currency, currency) }}) + % endfor +
{{ _( "Withdrawing euros to a SEPA bank account is free, transfers to other " "countries cost {0} each. Withdrawing US dollars costs {1} per transfer " @@ -141,6 +162,21 @@ title = _("Withdrawing Money") constants.FEE_PAYOUT['EUR']['foreign'].with_vat, constants.FEE_PAYOUT['USD']['*'].with_vat, ) }}
{{ _( + "Withdrawing euros to a SEPA bank account is free, transfers to other " + "countries cost {0} each.", + constants.FEE_PAYOUT['EUR']['foreign'].with_vat, + ) }}
{{ _( + "Withdrawing US dollars costs {0} per transfer, whatever the destination country is.", + constants.FEE_PAYOUT['USD']['*'].with_vat, + ) }}
{{ _("You have {0} in your wallet. What should we do with it?", - participant.balance) }}
{{ _( "If neither option works for you, please contact support@liberapay.com." ) }}