{% extends request.session.from_app|yesno:"base/app.html,base/base.html" %}
+{% load i18n %}
-{% block titleextra %}Towarzystwo Wolnych Lektur{% endblock %}
+{% block titleextra %}{% trans "Wolne Lektury need your help!" %}{% endblock %}
{% block body %}
-<div class="white-box normal-text">
-
- <h1>Płatność cykliczna przez PayU</h1>
-
- <p> {{ schedule.email }}</p>
- <p> {{ schedule.amount }}</p>
- <p> {{ schedule.plan.get_interval_display }}</p>
-
- <form id="theform" method='POST'>
- {% csrf_token %}
- {{ form }}
- </form>
-
-
-
-<script>
- function yeahwellwhatever(data) {
- $("#theform #id_token").val(data.value);
- $("#theform").submit()
- }
-</script>
-
-<div id="payu-widget"></div>
-<script
- src="{{ pos.get_api_host }}/front/widget/js/payu-bootstrap.js"
-
- {% for k, v in widget_args.items %}
- {{ k }}="{{ v }}"
- {% endfor %}
-
- success-callback="yeahwellwhatever"
- sig="{{ widget_sig }}">
-</script>
+ <div class="white-box normal-text">
+
+ {# On the card payment page. #}
+ <h1>{% trans "Supporting Wolne Lektury" %}</h1>
+
+ <p>
+ {% if schedule.payed_at %}
+ Aktualizujesz dane swojej comiesięcznej darowizny w kwocie {{ amount }} PLN. Dziękujemy!</p><p>
+ Jeśli chcesz zrezygnować z dalszego wsparcia Wolnych Lektur, możesz to zrobić na <a href="{{ schedule.get_absolute_url }}">stronie swojej darowizny</a>.
+ {% else %}
+ {% blocktrans with amount=schedule.amount %}
+ You are setting up a monthly payment in the amount of {{ amount }} PLN. Thank you!
+ {% endblocktrans %}
+ {% endif %}
+ </p>
+
+ <form id="theform" method='POST'>
+ {% csrf_token %}
+ {{ form }}
+ </form>
+
+
+
+ <script>
+ function paymentcallback(data) {
+ $("#theform #id_token").val(data.value);
+ $("#theform").submit()
+ }
+ </script>
+
+ <div id="payu-widget"></div>
+ <script
+ src="{{ pos.get_api_host }}/front/widget/js/payu-bootstrap.js"
+
+ {% for k, v in widget_args.items %}
+ {{ k }}="{{ v }}"
+ {% endfor %}
+
+ success-callback="paymentcallback"
+ sig="{{ widget_sig }}">
+ </script>
</div>