Locatizations.
[wolnelektury.git] / src / club / templates / club / donation_step1_form.html
1 {% load static %}
2 {% load i18n %}
3
4 <form method="post" action="{% url 'club_join' %}">
5   {% csrf_token %}
6   {{ form.errors }}
7   <input type="radio" name="switch" id="switch-once" value="single" class="toggle-input" {% if schedule and not schedule.monthly %}checked{% endif %}>
8   <input type="radio" name="switch" id="switch-monthly" value="monthly" class="toggle-input" {% if not schedule or schedule.monthly %}checked{% endif %}>
9   <div class="l-switch__wrapper">
10     {% if user.is_staff %}
11       <span data-edit="club/club/{{ club.pk }}"></span>
12     {% endif %}
13
14     <div class="l-switch white">
15       <label class='toggle-for' for="switch-once">{% trans "Jednorazowo" %}</label>
16       <label class='toggle-for' for="switch-monthly">{% trans "Miesięcznie" %}</label>
17       <span class="toggle"></span>
18     </div>
19   </div>
20
21   {% with amounts=club.get_amounts %}
22     <div class="l-checkout__payments payments-once wide-spot-{{ amounts.single_wide_spot }}">
23       {% for amount in amounts.single %}
24         <div class="l-checkout__payments__box once{% if not schedule.monthly and schedule.amount == amount.amount or not schedule and club.default_single_amount == amount.amount %} is-active{% endif %}{% if amount.wide %} l-checkout__payments__box--special{% endif %} l-checkout__payments__box--{{ amount.box_variant }}">
25
26           <h3>{{ amount.amount }} zł</h3>
27           <div class="l-checkout__payments__box__btn-wrp">
28             {% if amount.description %}
29               <p>{{ amount.description|safe }}</p>
30             {% endif %}
31             <button name="single_amount" value="{{ amount.amount }}">{% trans "Wybierz" %}</button>
32           </div>
33         </div>
34       {% endfor %}
35       <input type="hidden"
36              name="single_amount_selected"
37              value="{% if schedule and not schedule.monthly %}{{ schedule.amount|floatformat }}{% else %}{{ club.default_single_amount }}{% endif %}">
38
39     </div>
40
41
42     <div class="l-checkout__payments payments-recurring wide-spot-{{ amounts.monthly_wide_spot }}">
43     {% for amount in amounts.monthly %}
44       <div class="l-checkout__payments__box{% if schedule.monthly and schedule.amount == amount.amount or not schedule and amount.amount == club.default_monthly_amount %} is-active{% endif %}{% if amount.wide %} l-checkout__payments__box--special{% endif %} l-checkout__payments__box--{{ amount.box_variant }}">
45         <h3>{{ amount.amount }} zł <span>{% trans "/mies." context "kwota na miesiąc" %}</span></h3>
46         <div class="l-checkout__payments__box__btn-wrp">
47           {% if amount.description %}
48             <p>{{ amount.description|safe }}</p>
49           {% endif %}
50           <button name="monthly_amount" value="{{ amount.amount }}">{% trans "Wybierz" %}</button>
51         </div>
52       </div>
53     {% endfor %}
54     <input type="hidden"
55            name="monthly_amount_selected"
56            value="{% if schedule and schedule.monthly %}{{ schedule.amount|floatformat }}{% else %}{{ club.default_monthly_amount }}{% endif %}">
57   </div>
58
59   <div class="l-checkout__amount">
60     <div class="l-checkout__input">
61       <label for="kwota">{% trans "Inna kwota" %}</label>
62       {{ form.custom_amount }}
63     </div>
64     <button>{% trans "Dalej" %}</button>
65   </div>
66   {% endwith %}
67 </form>
68
69 <div class="l-checkout__secure">
70   <img src="{% static '2022/images/payments-padlock.png' %}" class="l-checkout__secure__padlock">
71   {% trans "Bezpieczne płatności zapewniają" %}:
72   <img src="{% static '2022/images/payments-payu.png' %}" class="l-checkout__secure__img" alt="PayU Visa MasterCard">
73   {% if club.paypal_enabled %}
74     <img src="{% static '2022/images/payments-paypal.png' %}" class="l-checkout__secure__img" alt="PayPal">
75   {% endif %}
76 </div>
77
78 <div class="l-checkout__cols bt-w">
79   <div class="l-checkout__col full">
80     <div class="l-checkout__form">
81       <div class="l-checkout__form__row full">
82         <h3>{% trans "Dane do przelewu tradycyjnego" %}:</h3>
83         {% include "club/transfer_info.html" %}
84       </div>
85     </div>
86   </div>
87 </div>