-{% extends "base/base.html" %}
+{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.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>Plan płatności</h1>
+ <h1>
+ Cieszymy się, że jesteś z nami! Dziękujemy za wsparcie!
+ </h1>
+ <div class="white-box normal-text">
+ <p>
-<div>E-mail: {{ schedule.email }}</div>
-<div>Składka: {{ schedule.amount }} zł {{ schedule.plan.get_interval_display }}</div>
-<div>Wybrana metoda płatności: {{ schedule.get_payment_method.name }}</div>
-{% if schedule.is_active %}
- {% if schedule.plan.is_perpetual %}
- Opłacona na zawsze.
+ {% if schedule.payed_at %}
+ Kwota:
+ {{ schedule.amount }} zł
+
+ <br>
+
+ Pierwsza wpłata:
+ {{ schedule.payed_at.date }}
+
+ <br>
+
+ {% if schedule.is_expired %}
+ <strong style="color: red">
+ Status darczyńcy nieaktywny od
+ {{ schedule.expires_at.date }}
+ </strong>
+ {% else %}
+ <strong style="color: green">
+ Status darczyńcy aktywny
+ {% if schedule.get_payment_method.expiration_reliable %}
+ do
+ {{ schedule.expires_at.date }}
+ {% endif %}
+ </strong>
+ {% endif %}
+
+ <br>
+
{% endif %}
- Aktualnie opłacona do: {{ schedule.expires_at }}
- {% if schedule.get_payment_method.is_recurring %}
- <form method='post' action="{% url 'club_cancel' schedule.key %}">
- {% csrf_token %}
- <button type="submit">Anuluj kolejną płatność</button>
- </form>
+
+
+{% if schedule.is_active %}
+ {% if schedule.is_recurring %}
+ {% if schedule.is_cancelled %}
+ <p><strong>Płatność anulowana.</strong></p>
+ <p>
+ <a style="background:#018189;color:white;border-radius: 10px;padding:1em 2em" href="/pomagam/">Wpłać ponownie</a>
+ </p>
+ {% else %}
+ {% if schedule.get_payment_method.updateable %}
+ <form method='post' action='' class="wlform">
+ {% csrf_token %}
+ <button type="submit" class="submit">
+ Zaktualizuj dane płatności
+ </button>
+ </form>
+ <br>
+ {% endif %}
+
+ {% if schedule.get_payment_method.cancellable %}
+ <form class="wlform" method='post' action="{% url 'club_cancel' schedule.key %}">
+ {% csrf_token %}
+ <button type="submit" class="submit" style="font-size: .9em">Zrezygnuj z kolejnych płatności</button>
+ </form>
+ {% endif %}
+ {% endif %}
{% else %}
- <form method='post' action=''>
+ <form class="wlform" method='post' action=''>
{% csrf_token %}
- <button type="submit">Opłać kolejny okres</button>
- </form>
+ <button type="submit" class="submit">Dorzuć się ponownie</button>
+ </form>
{% endif %}
{% else %}
- {% if schedule.is_expired %}
- Członkostwo wygasło.
- <form method='post' action=''>
+ {% if schedule.is_expired %}
+
+ <form method='post' action='' class="wlform">
+ {% csrf_token %}
+ <button type="submit" class="submit">
+ {% if schedule.is_recurring %}
+ Zaktualizuj dane płatności
+ {% else %}
+ Dorzuć się ponownie
+ {% endif %}
+ </button>
+ </form>
+
+ {% if schedule.get_payment_method.cancellable %}
+ <br>
+ <form class="wlform" method='post' action="{% url 'club_cancel' schedule.key %}">
{% csrf_token %}
- <button type="submit">Opłać kolejny okres</button>
- </form>
+ <button type="submit" class="submit" style="font-size: .9em">Zrezygnuj z kolejnych płatności</button>
+ </form>
+ {% endif %}
{% else %}
- Składka nie została jeszcze opłacona.
+ {% if not schedule.payed_at %}
+ <p>Płatność nie została jeszcze wykonana.</p>
{% if schedule.payuorder_set.exists %}
Czekamy na potwierdzenie płatności.
{% else %}
- <form method='post' action=''>
+ <form method='post' action='' class="wlform">
{% csrf_token %}
- <button type="submit">Zapłać składkę</button>
+ <button type="submit" class="submit">Dokończ płatność</button>
</form>
{% endif %}
+ {% endif %}
{% endif %}
{% endif %}
-<hr>
+{% if not schedule.membership %}
+ <hr style="margin: 2em 0;">
-{% if schedule.membership %}
- <p>
- Członek/członkini Towarzystwa nr {{ schedule.membership.id }} ({{ schedule.membership.user }}).
- </p>
+ <h2>Powiązanie z kontem użytkownika</h2>
- <form method='post' action='{% url "club_membership" %}'>
- {% csrf_token %}
- Imię i nazwisko na legitymację: <br>
- <input name="name" value="{{ schedule.membership.name|default:schedule.membership.user.username }}"><br>
- <button type="submit">Zapisz</button>
- </form>
-{% else %}
<p>
-Płatność nie przypisana do członkostwa.<br>
-<a href="{% url 'club_claim' schedule.key %}">Przypisz</a>
+Twoje wsparcie upoważnia Cię do przedpremierowego dostępu do publikacji.
+Aby z niego korzystać, powiąż darowiznę ze swoim kontem użytkownika na Wolnych Lekturach.
+</p>
+
+
+<p style="margin-top:2em;">
+ <a style="background:#018189;color:white;border-radius: 10px;padding:1em 2em;" href="{% url 'club_claim' schedule.key %}">
+ {% if request.user.is_authenticated %}
+ Powiąż darowiznę z kontem <strong>{{ request.user.username }}</strong>
+ {% else %}
+ Zaloguj się i powiąż darowiznę z kontem
+ {% endif %}
+ </a>
</p>
{% endif %}
-
+
<a href="">
</div>