fixes
authorRadek Czajka <rczajka@rczajka.pl>
Tue, 24 Mar 2026 17:27:05 +0000 (18:27 +0100)
committerRadek Czajka <rczajka@rczajka.pl>
Tue, 24 Mar 2026 17:27:05 +0000 (18:27 +0100)
src/annoy/models.py
src/annoy/templates/annoy/banner_seasonal.html
src/club/forms.py
src/wolnelektury/static/2022/styles/layout/_checkout.scss

index 638da5e..e1604bb 100644 (file)
@@ -127,7 +127,7 @@ class Banner(models.Model):
         progress = PayUOrder.objects.filter(
             completed_at__gte=self.since,
             completed_at__lte=self.until,
         progress = PayUOrder.objects.filter(
             completed_at__gte=self.since,
             completed_at__lte=self.until,
-        ).aggregate(c=models.Sum('schedule__amount'))['c']
+        ).aggregate(c=models.Sum('schedule__amount'))['c'] or 0
 
         for schedule in Schedule.objects.filter(
                 method='paypal',
 
         for schedule in Schedule.objects.filter(
                 method='paypal',
index a3a8a1a..dba55a0 100644 (file)
@@ -51,7 +51,7 @@
          <div class="progress-box">
            <div>
              <div class="l-checkout__support__bar">
          <div class="progress-box">
            <div>
              <div class="l-checkout__support__bar">
-               <span class="{% if banner.progress_percent < 15 %}little-progress{% endif %}" data-label="{{ banner.progress_percent_pretty }}%" style="width: {{ banner.progress_percent|stringformat:".3f" }}%;"></span>
+               <span class="{% if banner.progress_percent < 15 %}little-progress{% endif %}" data-label="{{ banner.progress_percent|floatformat:"2" }}%" style="width: {{ banner.progress_percent|stringformat:".3f" }}%;"></span>
              </div>
            </div>
          </div>
              </div>
            </div>
          </div>
@@ -60,7 +60,7 @@
            <strong class="countdown inline" data-until='{{ banner.until|date_to_utc:True|utc_for_js }}'>&nbsp;</strong>
          </div>
           {% if banner.target %}
            <strong class="countdown inline" data-until='{{ banner.until|date_to_utc:True|utc_for_js }}'>&nbsp;</strong>
          </div>
           {% if banner.target %}
-          <strong>{{ banner.target }} zł</strong>
+          <strong>{{ banner.target|floatformat:"g" }} zł</strong>
           {% endif %}
           </div>
        </div>
           {% endif %}
           </div>
        </div>
index ceda8d5..0ee00dc 100644 (file)
@@ -90,7 +90,7 @@ class DonationStep2Form(forms.ModelForm, NewsletterForm):
 
         consents = []
         for consent, key, consent_field in self.consent:
 
         consents = []
         for consent, key, consent_field in self.consent:
-            if self.cleaned_data[key]:
+            if consent.required or self.cleaned_data[key]:
                 instance.consent.add(consent)
 
         return instance
                 instance.consent.add(consent)
 
         return instance
index 71d6e82..3b1ce06 100644 (file)
   line-height: 150%;
   color: #FFFFFF;
   margin-top: 8px;
   line-height: 150%;
   color: #FFFFFF;
   margin-top: 8px;
-  max-width: 410px;
 }
 
 .l-checkout__box__header__content {
 }
 
 .l-checkout__box__header__content {