minor donation fix
[wolnelektury.git] / src / club / templates / club / donation_step1_form.html
1 {% load static %}
2 {% load i18n %}
3
4 <form method="post" action="{% if schedule %}{% url 'donation_step1' key=schedule.key %}{% else %}{% url 'club_join' %}{% endif %}">
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 initial-active{% endif %}{% if amount.wide %} l-checkout__payments__box--special{% endif %} l-checkout__payments__box--{{ amount.box_variant }}">
25
26           <div class="l-checkout__payments__box__btn-wrp">
27             <button name="single_amount" value="{{ amount.amount }}">{{ amount.amount }} zł</button>
28           </div>
29         </div>
30       {% endfor %}
31       <input type="hidden"
32              name="single_amount_selected"
33              value="{% if schedule and not schedule.monthly %}{{ schedule.amount|floatformat }}{% else %}{{ club.default_single_amount }}{% endif %}">
34
35     </div>
36
37
38     <div class="l-checkout__payments payments-recurring wide-spot-{{ amounts.monthly_wide_spot }}">
39     {% for amount in amounts.monthly %}
40       <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 initial-active{% endif %}{% if amount.wide %} l-checkout__payments__box--special{% endif %} l-checkout__payments__box--{{ amount.box_variant }}">
41         <div class="l-checkout__payments__box__btn-wrp">
42           <button name="monthly_amount" value="{{ amount.amount }}">{{ amount.amount }} zł <span> /mies.</span></button>
43         </div>
44       </div>
45     {% endfor %}
46     <input type="hidden"
47            name="monthly_amount_selected"
48            value="{% if schedule and schedule.monthly %}{{ schedule.amount|floatformat }}{% else %}{{ club.default_monthly_amount }}{% endif %}">
49   </div>
50
51   <div class="l-checkout__amount">
52     <div class="l-checkout__input">
53       <label for="id_custom_amount">{% trans "Inna kwota" %}</label>
54       {{ form.custom_amount }}
55     </div>
56     <button>{% trans "Dalej" %}</button>
57   </div>
58   {% endwith %}
59 </form>
60
61 <div class="l-checkout__secure">
62   <img src="{% static '2022/images/payments-padlock.png' %}" class="l-checkout__secure__padlock">
63   {% trans "Bezpieczne płatności zapewniają" %}:
64   <img src="{% static '2022/images/payments-payu.png' %}" class="l-checkout__secure__img" alt="PayU Visa MasterCard">
65   {% if club.paypal_enabled %}
66     <img src="{% static '2022/images/payments-paypal.png' %}" class="l-checkout__secure__img" alt="PayPal">
67   {% endif %}
68 </div>
69
70 <div class="l-checkout__cols bt-w">
71   <div class="l-checkout__col full">
72     <div class="l-checkout__form">
73       <div class="l-checkout__form__row full">
74         <h3>{% trans "Dane do przelewu tradycyjnego" %}:</h3>
75         {% include "club/transfer_info.html" %}
76       </div>
77     </div>
78   </div>
79 </div>