Membership form changes.
authorRadek Czajka <rczajka@rczajka.pl>
Tue, 8 Sep 2020 09:39:01 +0000 (11:39 +0200)
committerRadek Czajka <rczajka@rczajka.pl>
Thu, 10 Sep 2020 12:15:11 +0000 (14:15 +0200)
src/club/forms.py
src/club/templates/club/membership_form.html

index 8df7783..2ebe4e5 100644 (file)
@@ -3,11 +3,12 @@
 #
 from decimal import Decimal
 from django import forms
+from newsletter.forms import NewsletterForm
 from . import models
 from .payu.forms import CardTokenForm
 
 
-class ScheduleForm(forms.ModelForm):
+class ScheduleForm(NewsletterForm, forms.ModelForm):
     class Meta:
         model = models.Schedule
         fields = ['monthly', 'amount', 'email']
index 43e925f..474095b 100644 (file)
@@ -82,7 +82,7 @@ vertical-align: middle;
    }
 
    .kwota.active, .plan-toggle.active {
-       background: #b2ce1f;
+       background: #9ACD32;
    }
    .inna input {display: none;}
    .inna.active input {display: inline;}
@@ -150,12 +150,12 @@ vertical-align: middle;
      {% endif %}
     {% endwith %}
 
-    {% chunk 'club_form_top' %}
     <div class='twocol'>
 
       <form method="POST" action="" id="payment-form" class="wlform">
         {% csrf_token %}
-        <h3>Zadeklaruj, jak często i jaką kwotą chcesz nas wspierać:</h3>
+
+        {% chunk 'club_form_top' %}
 
         <ul class="errorlist">
           {% for e in  form.non_field_errors %}
@@ -169,6 +169,8 @@ vertical-align: middle;
           {% endfor %}
         </ul>
 
+        <h3>1. Wybierz rodzaj wsparcia</h3>
+
         {{ form.amount }}
         {{ form.monthly }}
         <div class="plan-select">
@@ -176,6 +178,8 @@ vertical-align: middle;
           <span class="button plan-toggle active" data-plan="plan-monthly" data-monthly="True">miesięcznie</span>
         </div>
 
+        <h3>2. Wybierz kwotę</h3>
+
         <div class="plan" id="plan-single" style="display:none;" data-monthly="False" data-min-for-year="{{ club.min_for_year }}" data-amount="{{ club.default_single_amount }}">
           {% for amount in club.proposed_single_amounts %}
             <span class="button kwota{% if amount == club.default_single_amount %} active{% endif %}{% if amount >= club.min_for_year %} yearly{% endif %}">{{ amount }}</span>
@@ -201,13 +205,23 @@ vertical-align: middle;
 <div class="methods">{% include 'club/payment/payu-re.html' %}</div>
         </div>
 
-        <h3>
-          Podaj nam swój adres e-mail, żebyśmy mogli się z Tobą skontaktować:
-        </h3>
+        <h3>3. Podaj adres e-mail</h3>
+
+        <p>{{ form.email }}</p>
 
         <p>
-          {{ form.email }}</p>
-        <button class="submit" type='submit'>Wpłać</button>
+          {{ form.agree_newsletter }}
+          <label for="agree_newsletter">
+            Chcę dostawać informacje o nowościach
+          </label>
+        </p>
+
+        <p>W każdej chwili możesz zrezygnować z subskrypcji. Więcej w <a href="https://nowoczesnapolska.org.pl/prywatnosc/">polityce prywatności</a>.</p>
+
+        <div><button class="submit" type='submit'>Wpłać</button></div>
+
+        {% chunk 'club_form_bottom' %}
+
       </form>
 
       <div class="club-form-info">
@@ -238,8 +252,6 @@ vertical-align: middle;
 </div>
 </div>
 
-{% chunk 'club_form_bottom' %}
-
 </div>
 
 {% endblock %}