{% block body %}
<div class="white-box normal-text">
-<h1>Plan płatności</h1>
-
-<div>{{ schedule.email }}</div>
-<div>{{ schedule.amount }}</div>
-<div>{{ schedule.plan.get_interval_display }}</div>
+<h1>
+Cieszymy się, że jesteś z nami! Dziękujemy za wsparcie!
+</h1>
+<p>
+Od <strong>{{ schedule.started_at.date }}</strong>
+{% if schedule.expires_at %}
+ do <strong>{{ schedule.expires_at.date }}</strong>
+{% endif %}
+wspierasz nas kwotą {{ schedule.amount }} zł{% if schedule.monthly %} miesięcznie{% endif %}{% if schedule.yearly %} rocznie{% endif %}.
+</p>
-<div>{{ schedule.is_active|yesno:"Aktywne,Nieaktywne" }}</div>
+{% 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="/towarzystwo/dolacz/">Odnów składkę</a>
+ </p>
+ {% else %}
+ <form class="wlform" method='post' action="{% url 'club_cancel' schedule.key %}">
+ {% csrf_token %}
+ <button type="submit" class="submit" style="font-size: .9em">Anuluj kolejną płatność</button>
+ </form>
+ {% endif %}
+ {% else %}
+ <form class="wlform" method='post' action=''>
+ {% csrf_token %}
+ <button type="submit" class="submit">Opłać kolejny okres</button>
+ </form>
+ {% endif %}
-<div>Start: {{ schedule.started_at }}</div>
-<div>Opłacone do: {{ schedule.expires_at|default:"brak" }} {% if schedule.is_cancelled %}(anulowana){% endif %}</div>
-{% if schedule.expires_at and not schedule.is_cancelled %}
-<form method='post' action="{% url 'club_cancel' schedule.key %}">
- {% csrf_token %}
- <button type="submit">Anuluj płatność</button>
-</form>
+{% else %}
+ {% if schedule.is_expired %}
+ Członkostwo wygasło.
+ <form method='post' action='' class="wlform">
+ {% csrf_token %}
+ <button type="submit" class="submit">Opłać kolejny okres</button>
+ </form>
+
+
+ {% else %}
+ {% if not schedule.payed_at %}
+ Składka nie została jeszcze opłacona.
+ {% if schedule.payuorder_set.exists %}
+ Czekamy na potwierdzenie płatności.
+ {% else %}
+
+ <form method='post' action=''>
+ {% csrf_token %}
+ <button type="submit" class="submit">Zapłać składkę</button>
+ </form>
+
+ {% endif %}
+ {% endif %}
+ {% endif %}
{% endif %}
-{% if schedule.is_expired %}
- Płatność wygasła. <a href="{% url 'club_join' %}">Wykonaj nową płatność</a>.
-{% endif %}
+
+<hr style="margin: 2em 0;">
+
+
+<h2>Towarzystwo Przyjaciół Wolnych Lektur</h2>
+
{% if schedule.membership %}
<p>
- Członek/członkini Towarzystwa nr {{ schedule.membership.id }} ({{ schedule.membership.user }}).
- </p>
+ Należysz już do Towarzystwa Przyjaciół Wolnych Lektur!</p>
+
+ <form class="wlform" method='post' action='{% url "club_membership" %}'>
+ {% csrf_token %}
+ Skontaktujemy się z Tobą w sprawie odbioru legitymacji członkowskiej.<br>Tutaj możesz podać imię i nazwisko, jakie ma na niej widnieć:<br>
+ <input name="name" value="{{ schedule.membership.name|default:schedule.membership.user.username }}"><br>
+ <button class="submit" type="submit">Zmień dane</button>
+ </form>
+
{% else %}
+
+<p>
+Twoje wsparcie upoważnia Cię do członkostwa w Towarzystwie Przyjaciół Wolnych Lektur.
+Aby w pełni z niego korzystać, zapisz się do Towarzystwa swoim kontem użytkownika na Wolnych Lekturach.
+</p>
+
+
<p>
-Płatność nie przypisana do członkostwa.<br>
-<a href="{% url 'club_claim' schedule.key %}">Przypisz</a>
+<a style="background:#018189;color:white;border-radius: 10px;padding:1em 2em;" href="{% url 'club_claim' schedule.key %}">Zapisz się</a>
</p>
{% endif %}