Changes in club payments.
[wolnelektury.git] / src / club / templates / club / schedule.html
1 {% extends "base/base.html" %}
2
3
4 {% block titleextra %}Towarzystwo Wolnych Lektur{% endblock %}
5
6
7 {% block body %}
8 <div class="white-box normal-text">
9
10 <h1>Plan płatności</h1>
11
12 <div>E-mail: {{ schedule.email }}</div>
13 <div>Składka: {{ schedule.amount }} zł {{ schedule.plan.get_interval_display }}</div>
14 <div>Wybrana metoda płatności: {{ schedule.get_payment_method.name }}</div>
15
16 {% if schedule.is_active %}
17   {% if schedule.plan.is_perpetual %}
18     Opłacona na zawsze.
19   {% endif %}
20   Aktualnie opłacona do: {{ schedule.expires_at }}
21
22   {% if schedule.get_payment_method.is_recurring %}
23   <form method='post' action="{% url 'club_cancel' schedule.key %}">
24         {% csrf_token %}
25         <button type="submit">Anuluj kolejną płatność</button>
26   </form>
27   {% else %}
28   <form method='post' action=''>
29         {% csrf_token %}
30         <button type="submit">Opłać kolejny okres</button>
31   </form>
32   {% endif %}
33
34
35 {% else %}
36  {% if schedule.is_expired %}
37    Członkostwo wygasło.
38    <form method='post' action=''>
39         {% csrf_token %}
40         <button type="submit">Opłać kolejny okres</button>
41    </form>
42
43
44  {% else %}
45    Składka nie została jeszcze opłacona.
46    {% if schedule.payuorder_set.exists %}
47      Czekamy na potwierdzenie płatności.
48    {% else %}
49
50      <form method='post' action=''>
51         {% csrf_token %}
52         <button type="submit">Zapłać składkę</button>
53      </form>
54
55    {% endif %}
56  {% endif %}
57 {% endif %}
58
59 <hr>
60
61
62
63 {% if schedule.membership %}
64   <p>
65   Członek/członkini Towarzystwa nr {{ schedule.membership.id }} ({{ schedule.membership.user }}).
66   </p>
67
68   <form method='post' action='{% url "club_membership" %}'>
69           {% csrf_token %}
70           Imię i nazwisko na legitymację: <br>
71           <input name="name" value="{{ schedule.membership.name|default:schedule.membership.user.username }}"><br>
72           <button type="submit">Zapisz</button>
73   </form>
74
75 {% else %}
76 <p>
77 Płatność nie przypisana do członkostwa.<br>
78 <a href="{% url 'club_claim' schedule.key %}">Przypisz</a>
79 </p>
80 {% endif %}
81
82
83
84
85         
86 <a href="">
87
88 </div>
89
90 {% endblock %}