From: Radek Czajka Date: Wed, 3 Dec 2025 14:21:42 +0000 (+0100) Subject: More donation form fixes. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/bdc6fa5714330f27916756fd9a0dfbe9d14954df?ds=sidebyside;hp=12db7e7cbb003b83ba2aeb1c205b66c9557841cd More donation form fixes. --- diff --git a/src/club/templates/club/donation_infobox.html b/src/club/templates/club/donation_infobox.html index 6008f0719..cdbd67e9c 100644 --- a/src/club/templates/club/donation_infobox.html +++ b/src/club/templates/club/donation_infobox.html @@ -1,8 +1,10 @@
- Dziękujemy za wybranie comiesięcznej wpłaty. + Dziękujemy, że decydujesz się wspierać nas co miesiąc.
+ Jeśli to pomyłka, możesz zmienić darowiznę na jednorazową.
- Czy na pewno nie comiesięczna? Zmień na comiesięczną wpłatę. + Wolę wspierać co miesiąc! + Zmień na comiesięczną wpłatę.
diff --git a/src/club/templates/club/donation_step3.html b/src/club/templates/club/donation_step3.html index c9b615b96..999c70872 100644 --- a/src/club/templates/club/donation_step3.html +++ b/src/club/templates/club/donation_step3.html @@ -25,7 +25,7 @@ {% include "club/donation_infobox.html" %} {% if schedule.monthly %} -

Comiesięczna darowizna będzie pobierana automatycznie

+

Darowizna będzie pobierana automatycznie co miesiąc.

Możesz z niej zrezygnować w dowolnej chwili, korzystając z linku który dostaniesz mailem.

{% endif %} diff --git a/src/club/views.py b/src/club/views.py index 679e57548..503a431e4 100644 --- a/src/club/views.py +++ b/src/club/views.py @@ -64,7 +64,7 @@ class DonationStep2(UpdateView): def set_monthly(request, key): schedule = get_object_or_404(models.Schedule, payed_at=None, key=key) if request.POST: - schedule.monthly = True + schedule.monthly = request.POST.get('monthly') == 'true' schedule.save(update_fields=['monthly']) return JsonResponse({ "amount": schedule.amount, diff --git a/src/wolnelektury/static/js/main.js b/src/wolnelektury/static/js/main.js index 076277e98..9821c7705 100644 --- a/src/wolnelektury/static/js/main.js +++ b/src/wolnelektury/static/js/main.js @@ -354,6 +354,7 @@ method: 'POST', data: { csrfmiddlewaretoken: $("[name=csrfmiddlewaretoken]").val(), + monthly: $(this).data('monthly'), }, url: $(this).data('url'), success: function(data) {