Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
notify users of credit card failure
Browse files Browse the repository at this point in the history
closes #1746
  • Loading branch information
Changaco committed Aug 15, 2014
1 parent 0a560f6 commit 228129c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,17 @@ <h1>{{ title }}</h1>

{% endblock %}

{% if not user.ANON and user.participant.credit_card_expiring(request, response) %}
{% if not user.ANON %}
<script>
{% if user.participant.last_bill_result %}
$(document).ready(function () {
Gittip.notification(["span", "Your credit card has failed! ", ['a', {'href': '/credit-card.html'}, 'Fix your card']], "error")
});
{% elif user.participant.credit_card_expiring(request, response) %}
$(document).ready(function () {
Gittip.notification(["span", "Your credit card is about to expire! ", ['a', {'href': '/credit-card.html'}, 'Update card']], "error")
});
{% endif %}
</script>
{% endif %}
</body>
Expand Down

0 comments on commit 228129c

Please sign in to comment.