Skip to content

Commit

Permalink
Merge pull request #12 from liberapay/mangopay
Browse files Browse the repository at this point in the history
MangoPay
  • Loading branch information
Changaco committed Aug 29, 2015
2 parents c6fd9ae + 5035b15 commit f24c857
Show file tree
Hide file tree
Showing 118 changed files with 4,188 additions and 7,673 deletions.
2 changes: 1 addition & 1 deletion 410.spt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ title = _('Closed') if 'username' in request.path else '410'
<p>{{ _("The account owner has closed this account.") }}</p>
{% if user.ANON %}
<h2>{{ _("Are you the account owner?") }}</h2>
<p>{% include "templates/sign-in.html" %} {{ _("to reopen your account.") }}</p>
<p>{% include "templates/sign-in-link.html" %} {{ _("to reopen your account.") }}</p>
{% endif %}
{% else %}
<p>{{ status_strings[410] }}</p>
Expand Down
4 changes: 3 additions & 1 deletion defaults.env
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ CACHE_STATIC=no
COMPRESS_ASSETS=no
PASSWORD_ROUNDS=1

BALANCED_API_SECRET=
MANGOPAY_BASE_URL=https://api.sandbox.mangopay.com
MANGOPAY_CLIENT_ID=liberapay-dev
MANGOPAY_CLIENT_PASSWORD=Toi8KBqA3UDSWKgEcC7CLqup3kcaDUSTmy4hN3UiKz6ZUJCZz1

OAUTHLIB_INSECURE_TRANSPORT=1
OAUTHLIB_RELAX_TOKEN_SCOPE=1
Expand Down
4 changes: 2 additions & 2 deletions emails/charge_failed.spt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[---] text/html
{{ _("We tried to charge your credit card {0} today, to fund your ongoing support for {1}, but the charge failed with this message:",
Money(exchange.amount + exchange.fee, 'USD'),
Money(exchange.amount + exchange.fee, 'EUR'),
('<b><a href="{0}">{1}</a></b>'|safe).format(
participant.profile_url+'giving/',
top_tippee if ntippees == 1 else ngettext('{0} and {n} other',
Expand All @@ -17,7 +17,7 @@

[---] text/plain
{{ _("We tried to charge your credit card {0} today, to fund your ongoing support for {1}, but the charge failed with this message:",
Money(exchange.amount + exchange.fee, 'USD'),
Money(exchange.amount + exchange.fee, 'EUR'),
top_tippee if ntippees == 1 else ngettext('{0} and {n} other',
'{0} and {n} others',
ntippees - 1,
Expand Down
4 changes: 2 additions & 2 deletions emails/charge_succeeded.spt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[---] text/html
{{ _("We charged your credit card {0} today, to fund your ongoing support for {1}. Thanks for using Liberapay!",
Money(exchange.amount + exchange.fee, 'USD'),
Money(exchange.amount + exchange.fee, 'EUR'),
('<b><a href="{0}">{1}</a></b>'|safe).format(
participant.profile_url+'giving/',
top_tippee if ntippees == 1 else ngettext('{0} and {n} other',
Expand All @@ -16,7 +16,7 @@

[---] text/plain
{{ _("We charged your credit card {0} today, to fund your ongoing support for {1}. Thanks for using Liberapay!",
Money(exchange.amount + exchange.fee, 'USD'),
Money(exchange.amount + exchange.fee, 'EUR'),
top_tippee if ntippees == 1 else ngettext('{0} and {n} other',
'{0} and {n} others',
ntippees - 1,
Expand Down
4 changes: 2 additions & 2 deletions emails/pledgee_joined.spt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

[---] text/html
{{ _("Your pledge to give {0} every week to {1} will be turned into action now that they have joined Liberapay. Huzzah!",
Money(amount, 'USD'),
Money(amount, 'EUR'),
('<b><a href="{0}">{1}</a></b>'|safe).format(profile_url, user_name)) }}
[---] text/plain
{{ _("Your pledge to give {0} every week to {1} will be turned into action now that they have joined Liberapay. Huzzah!",
Money(amount, 'USD'),
Money(amount, 'EUR'),
user_name) }}

{{ _("Follow this link to view {0}'s profile:", user_name) }}
Expand Down
4 changes: 2 additions & 2 deletions emails/withdrawal_failed.spt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[---] text/html
{{ _("We tried to transfer {0} from your Liberapay wallet to your bank account, but the transfer failed with this message:",
Money(exchange.amount - exchange.fee, 'USD')) }}
Money(exchange.amount - exchange.fee, 'EUR')) }}

<pre>{{ exchange.note }}</pre>

Expand All @@ -11,7 +11,7 @@

[---] text/plain
{{ _("We tried to transfer {0} from your Liberapay wallet to your bank account, but the transfer failed with this message:",
Money(exchange.amount - exchange.fee, 'USD')) }}
Money(exchange.amount - exchange.fee, 'EUR')) }}

{{ exchange.note }}

Expand Down
4 changes: 2 additions & 2 deletions emails/withdrawal_pending.spt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
[---] text/html
{{ _("We have initiated a transfer of {0} from your Liberapay wallet to your bank account. "
"Please note that it can take several business days for the transaction to complete.",
Money(exchange.amount - exchange.fee, 'USD')) }}
Money(exchange.amount - exchange.fee, 'EUR')) }}

[---] text/plain
{{ _("We have initiated a transfer of {0} from your Liberapay wallet to your bank account. "
"Please note that it can take several business days for the transaction to complete.",
Money(exchange.amount - exchange.fee, 'USD')) }}
Money(exchange.amount - exchange.fee, 'EUR')) }}
17 changes: 17 additions & 0 deletions js/10-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,20 @@ Liberapay.jsonml = function(jsonml) {

return node;
};

(function($) {
return $.fn.center = function(position) {
return this.each(function() {
var e = $(this);
var pos = e.css('position');
if (pos != 'absolute' && pos != 'fixed' || position && pos != position) {
e.css('position', position || 'absolute');
}
e.css({
left: '50%',
top: '50%',
margin: '-' + (e.innerHeight() / 2) + 'px 0 0 -' + (e.innerWidth() / 2) + 'px'
});
});
};
})(jQuery);
5 changes: 3 additions & 2 deletions js/forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Liberapay.forms.jsSubmit = function() {
url: $form.attr('action'),
type: 'POST',
data: data,
dataType: 'json',
success: Liberapay.forms.success($form, $inputs, button),
error: [
function () { $inputs.prop('disabled', false); },
Expand All @@ -41,7 +42,7 @@ Liberapay.forms.jsSubmit = function() {
Liberapay.forms.success = function($form, $inputs, button) { return function(data) {
$inputs.prop('disabled', false).filter('[type=password]').val('');
var on_success = $form.data('on-success');
if (on_success.substr(0, 8) == 'fadeOut:') {
if (on_success && on_success.substr(0, 8) == 'fadeOut:') {
var $e = $(button).parents(on_success.substr(8)).eq(0);
return $e.fadeOut(null, $e.remove);
}
Expand Down Expand Up @@ -83,4 +84,4 @@ Liberapay.forms.communityChooser = function() {
window.location = '/for/'+$select.val();
}
});
};
};
Loading

0 comments on commit f24c857

Please sign in to comment.