-{% extends "base/base.html" %}
+{% extends "base_simple.html" %}
+{% load i18n %}
-{% block titleextra %}Towarzystwo Wolnych Lektur{% endblock %}
+{% block titleextra %}{% trans "Wolne Lektury potrzebują Twojej pomocy!" %}{% endblock %}
{% block body %}
-<div class="white-box normal-text">
-<h1>Plan płatności</h1>
+ <h1>
+ {% trans "Cieszymy się, że jesteś z nami! Dziękujemy za wsparcie!" %}
+ </h1>
+ <div class="white-box normal-text">
+ <p>
+
+
+ {% if schedule.payed_at %}
+ {% trans "Kwota" %}:
+ {{ schedule.amount }} zł
+
+ <br>
+
+ {% trans "Pierwsza wpłata" %}:
+ {{ schedule.payed_at.date }}
+
+ <br>
+
+ {% if schedule.is_expired %}
+ <strong style="color: red">
+ {% trans "Status darczyńcy nieaktywny od" %}
+ {{ schedule.expires_at.date }}
+ </strong>
+ {% else %}
+ <strong style="color: green">
+ {% trans "Status darczyńcy aktywny" %}
+ {% if schedule.get_payment_method.expiration_reliable %}
+ {% trans "do" %}
+ {{ schedule.expires_at.date }}
+ {% endif %}
+ </strong>
+ {% endif %}
+
+ <br>
+
+ {% endif %}
+
+
+
+{% if schedule.is_active %}
+ {% if schedule.is_recurring %}
+ {% if schedule.is_cancelled %}
+ <p><strong>{% trans "Płatność anulowana." %}</strong></p>
+ <p>
+ <a style="background:#018189;color:white;border-radius: 10px;padding:1em 2em" href="/pomagam/">{% trans "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">
+ {% trans "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">{% trans "Zrezygnuj z kolejnych płatności" %}</button>
+ </form>
+ {% endif %}
+ {% endif %}
+ {% else %}
+ <form class="wlform" method='post' action=''>
+ {% csrf_token %}
+ <button type="submit" class="submit">{% trans "Dorzuć się ponownie" %}</button>
+ </form>
+ {% endif %}
-<div>{{ schedule.email }}</div>
-<div>{{ schedule.amount }}</div>
-<div>{{ schedule.plan.get_interval_display }}</div>
-<div>{{ schedule.is_active|yesno:"Aktywne,Nieaktywne" }}</div>
+{% else %}
+ {% if schedule.is_expired %}
+
+ <form method='post' action='' class="wlform">
+ {% csrf_token %}
+ <button type="submit" class="submit">
+ {% if schedule.is_recurring %}
+ {% trans "Zaktualizuj dane płatności" %}
+ {% else %}
+ {% trans "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" class="submit" style="font-size: .9em">{% trans "Zrezygnuj z kolejnych płatności" %}</button>
+ </form>
+ {% endif %}
+
+
+ {% else %}
+ {% if not schedule.payed_at %}
+ <p>{% trans "Płatność nie została jeszcze wykonana." %}</p>
+ {% if schedule.payuorder_set.exists %}
+ {% trans "Czekamy na potwierdzenie płatności." %}
+ {% else %}
+
+ <form method='post' action='' class="wlform">
+ {% csrf_token %}
+ <button type="submit" class="submit">{% trans "Dokończ płatność" %}</button>
+ </form>
+
+ {% endif %}
+ {% endif %}
+ {% endif %}
+{% 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>
-{% endif %}
+{% if not schedule.membership %}
+
+ <hr style="margin: 2em 0;">
+
+ <h2>{% trans "Powiązanie z kontem użytkownika" %}</h2>
-{% if schedule.is_expired %}
- Płatność wygasła. <a href="{% url 'club_join' %}">Wykonaj nową płatność</a>.
-{% endif %}
-{% if schedule.membership %}
<p>
- Członek/członkini Towarzystwa nr {{ schedule.membership.id }} ({{ schedule.membership.user }}).
+ {% blocktrans trimmed %}
+ 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.
+ {% endblocktrans %}
</p>
-{% else %}
-<p>
-Płatność nie przypisana do członkostwa.<br>
-<a href="{% url 'club_claim' schedule.key %}">Przypisz</a>
-</p>
-{% endif %}
-
+<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 %}
+ {% blocktrans trimmed with user=request.user.username %}
+ Powiąż darowiznę z kontem <strong>{{ user }}</strong>
+ {% endblocktrans %}
+ {% else %}
+ {% trans "Zaloguj się i powiąż darowiznę z kontem" %}
+ {% endif %}
+ </a>
+</p>
+{% endif %}
-
-<a href="">
</div>