Progress bar on payment form page.
[wolnelektury.git] / src / club / templates / club / membership_form.html
1 {% extends request.session.from_app|yesno:"base/app.html,base/base.html" %}
2 {% load i18n %}
3 {% load chunks %}
4 {% load thumbnail %}
5 {% load club %}
6
7 {% block titleextra %}{% trans "Join us in freeing the books!" %}{% endblock %}
8 {% block metadescription %}{% trans "„Wolne Lektury należy wspierać, bo są” - Filip Springer" %}{% endblock %}
9
10
11 {% block body %}
12   <div class="white-box normal-text">
13
14     <h1>{% trans "Support Wolne Lektury" %}</h1>
15     <h2 style="margin-bottom:2em;">
16       {% if membership %}
17         {# Displays to members. #}
18         {% trans "Thank you for your support! Support us again!" %}
19       {% else %}
20         {# Displays to non-supporters. #}
21         {% trans "Thank you for wanting to free the books with us!" %}
22       {% endif %}</h2>
23
24       {% with schedule=request.user|active_schedule %}
25         {% if schedule %}
26           <p><a href="{{ schedule.get_absolute_url }}">{% trans "See your past support." %}</a></p>
27         {% endif %}
28       {% endwith %}
29
30       <div class='twocol'>
31
32       <form method="POST" action="" id="payment-form" class="wlform">
33         {% csrf_token %}
34
35         {% chunk 'club_form_top' %}
36
37         {% club_monthly_since '2020-12-01' as cc %}
38         {% club_monthly_missing_since '2020-12-01' 100 as cm %}
39         <p>Pomóż nam zdobyć 100 nowych Przyjaciół do końca roku. W grudniu stałą wpłatą wsparło nas już <b style="color: #0d7e85">{{ cc }}</b> czytelników i czytelniczek, brakuje  <b style="color: #0d7e85">{{ cm }}</b>.</p>
40         <div class="funding" style="background: none;"><div class="description"><div class="progress" style="text-align: center; background-size: {{ cc }}% 1px;"><span class="piece progress-collected">&nbsp;{{ cc }}</span><span class="piece progress-target">{{ cm }}&nbsp;</span><div style="clear: both"></div></div></div></div>
41
42         {% include "club/payment_form.html" %}
43
44         {% chunk 'club_form_bottom' %}
45
46       </form>
47
48       <div class="club-form-info">
49         {% if ambassador %}
50         <div class="ambassador {% if ambassador.photo %}with-photo{% endif %}">
51             <div>
52               <em>
53                 {{ ambassador.text }}
54               </em>
55               <div style="font-size: 1.2em">{{ ambassador.name }}</div>
56             </div>
57             {% if ambassador.photo %}
58               <img src="{% thumbnail ambassador.photo "100x100" as thumb %}{{ thumb.url }}{% empty %}{{ ambassador.photo.url }}{% endthumbnail %}">
59             {% endif %}
60           </div>
61         {% endif %}
62
63         {% include "club/payment_info.html" %}
64 </div>
65 </div>
66
67 </div>
68
69 {% endblock %}