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