'monthly': forms.HiddenInput,
}
+ def __init__(self, referer=None, **kwargs):
+ self.referer = referer
+ super().__init__(**kwargs)
+
def clean_amount(self):
value = self.cleaned_data['amount']
club = models.Club.objects.first()
def save(self, *args, **kwargs):
NewsletterForm.save(self, *args, **kwargs)
+ self.instance.source = self.referer or ''
return super().save(*args, **kwargs)
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2021-01-20 14:34+0100\n"
+"PO-Revision-Date: 2021-05-19 15:02+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: pl\n"
msgid "Club"
msgstr "Towarzystwo"
-#: club/forms.py:26
+#: club/forms.py:32
#, python-format
msgid "Minimal amount is %(amount)d PLN."
msgstr "Minimalna kwota to %(amount)d zł."
msgid "clubs"
msgstr "towarzystwa"
-#: club/models.py:47
+#: club/models.py:48
msgid "key"
msgstr "klucz"
-#: club/models.py:48
+#: club/models.py:49
msgid "email"
msgstr "email"
-#: club/models.py:49 club/models.py:155
+#: club/models.py:50 club/models.py:143
msgid "membership"
msgstr "członkostwo"
-#: club/models.py:50
-msgid "payed at"
-msgstr "opłacona"
-
#: club/models.py:51
-msgid "expires_at"
-msgstr "wygasa"
-
-#: club/models.py:71
msgid "amount"
msgstr "kwota"
-#: club/models.py:72 club/templates/club/payment_form.html:21
+#: club/models.py:52 club/templates/club/payment_form.html:21
msgid "monthly"
msgstr "miesięcznie"
-#: club/models.py:73
+#: club/models.py:53
msgid "yearly"
msgstr "rocznie"
-#: club/models.py:75
+#: club/models.py:55
+msgid "source"
+msgstr "źródło"
+
+#: club/models.py:57
msgid "cancelled"
msgstr "anulowany"
-#: club/models.py:76
+#: club/models.py:58
+msgid "payed at"
+msgstr "opłacona"
+
+#: club/models.py:59
msgid "started at"
msgstr "start"
-#: club/models.py:79
+#: club/models.py:60
+msgid "expires_at"
+msgstr "wygasa"
+
+#: club/models.py:64
msgid "schedule"
msgstr "harmonogram"
-#: club/models.py:80
+#: club/models.py:65
msgid "schedules"
msgstr "harmonogramy"
-#: club/models.py:147
+#: club/models.py:135
msgid "user"
msgstr "użytkownik"
-#: club/models.py:148
+#: club/models.py:136
msgid "created at"
msgstr "utworzone"
-#: club/models.py:149 club/models.py:210
+#: club/models.py:137 club/models.py:198
msgid "name"
msgstr "nazwisko"
-#: club/models.py:150
+#: club/models.py:138
msgid "manual"
msgstr "ustawiony ręcznie"
-#: club/models.py:151
+#: club/models.py:139
msgid "notes"
msgstr "notatki"
-#: club/models.py:152
+#: club/models.py:140
msgid "updated at"
msgstr "aktualizacja"
-#: club/models.py:156
+#: club/models.py:144
msgid "memberships"
msgstr "członkostwa"
-#: club/models.py:193
+#: club/models.py:181
msgid "days before"
msgstr "dni przed"
-#: club/models.py:194
+#: club/models.py:182
msgid "subject"
msgstr "temat"
-#: club/models.py:195 club/payu/models.py:140
+#: club/models.py:183 club/payu/models.py:140
msgid "body"
msgstr "treść"
-#: club/models.py:198
+#: club/models.py:186
msgid "reminder email"
msgstr "email z przypomnieniem"
-#: club/models.py:199
+#: club/models.py:187
msgid "reminder emails"
msgstr "emaile z przypomnieniem"
-#: club/models.py:204
+#: club/models.py:192
#, python-format
msgid "a day before expiration"
msgid_plural "%d days before expiration"
msgstr[2] "%d dni przed wygaśnięciem"
msgstr[3] "%d dni przed wygaśnięciem"
-#: club/models.py:206
+#: club/models.py:194
#, python-format
msgid "a day after expiration"
msgid_plural "%d days after expiration"
msgstr[2] "%d dni po wygaśnięciu"
msgstr[3] "%d dni przed wygaśnięciem"
-#: club/models.py:211
+#: club/models.py:199
msgid "photo"
msgstr "zdjęcie"
-#: club/models.py:212
+#: club/models.py:200
msgid "text"
msgstr "tekst"
-#: club/models.py:215
+#: club/models.py:203
msgid "ambassador"
msgstr "ambasador"
-#: club/models.py:216
+#: club/models.py:204
msgid "ambassadors"
msgstr "ambasadorowie"
-#: club/models.py:247 club/templates/club/index.html:7
+#: club/models.py:235 club/templates/club/index.html:7
#: club/templates/club/index.html:13 club/templates/club/thanks.html:6
#: club/templates/payu/rec_payment.html:5
msgid "Towarzystwo Przyjaciół Wolnych Lektur"
msgid "See your past support."
msgstr "Zobacz swoje dotychczasowe wsparcie."
-#: club/templates/club/membership_form.html:40
+#: club/templates/club/membership_form.html:41
msgid "Help us get 100 new Friends by the end of the school semester."
msgstr "Pomóż nam zdobyć 100 nowych Przyjaciół do końca semestru szkolnego."
-#: club/templates/club/membership_form.html:41
+#: club/templates/club/membership_form.html:42
#, python-format
msgid ""
"\n"
"Od początku tej kampanii stałą wpłatą wsparło nas już <b style=\"color: "
"#0d7e85\">%(supporters)s</b> czytelników i czytelniczek,"
-#: club/templates/club/membership_form.html:46
+#: club/templates/club/membership_form.html:47
#, python-format
msgid ""
"\n"
"\" href=\"https://nowoczesnapolska.org.pl/prywatnosc/\">polityce "
"prywatności</a>."
-#: club/templates/club/payment_form.html:64
+#: club/templates/club/payment_form.html:65
msgid "Donate"
msgstr "Wpłać"
amount = models.DecimalField(_('amount'), max_digits=10, decimal_places=2)
monthly = models.BooleanField(_('monthly'), default=True)
yearly = models.BooleanField(_('yearly'), default=False)
-
+
+ source = models.CharField(_('source'), max_length=255, blank=True)
+
is_cancelled = models.BooleanField(_('cancelled'), default=False)
payed_at = models.DateTimeField(_('payed at'), null=True, blank=True)
started_at = models.DateTimeField(_('started at'), auto_now_add=True)
'email': self.request.user.email,
}
+ def get_form_kwargs(self):
+ kwargs = super().get_form_kwargs()
+ kwargs['referer'] = self.request.META.get('HTTP_REFERER', '')
+ return kwargs
+
def form_valid(self, form):
retval = super(JoinView, self).form_valid(form)
if self.request.user.is_authenticated: