Commit 9657cf64 authored by Thom Wiggers's avatar Thom Wiggers

Merge branch '452-valideer-dat-mensen-met-automatische-incasso-een-iban-hebben' into 'master'

Prevent setting automatic member payment fees to true without an IBAN.

Closes #452

See merge request !587
parents 8a5cc220 3fff0ae1
......@@ -31,6 +31,7 @@ class ProfileInline(admin.StackedInline):
'emergency_contact_phone_number', 'language',
'event_permissions')
model = models.Profile
form = forms.ProfileForm
can_delete = False
......
......@@ -23,6 +23,17 @@ class ProfileForm(forms.ModelForm):
'receive_optin', 'receive_newsletter']
model = Profile
def clean(self):
super().clean()
errors = {}
direct_debit_authorized = self.cleaned_data\
.get('direct_debit_authorized')
bank_account = self.cleaned_data.get('bank_account')
if direct_debit_authorized and not bank_account:
errors.update({'bank_account': _('Please enter a bank account')})
raise forms.ValidationError(errors)
class UserCreationForm(BaseUserCreationForm):
# Don't forget to edit the formset in admin.py!
......
This diff was suppressed by a .gitattributes entry.
......@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-10-13 16:01+0200\n"
"PO-Revision-Date: 2017-09-20 21:10+0200\n"
"POT-Creation-Date: 2017-10-18 21:31+0200\n"
"PO-Revision-Date: 2017-10-18 21:32+0200\n"
"Last-Translator: Sébastiaan Versteeg <se_bastiaan@outlook.com>\n"
"Language-Team: \n"
"Language: nl\n"
......@@ -16,61 +16,61 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.0.3\n"
"X-Generator: Poedit 2.0.4\n"
#: admin.py:38
#: admin.py:39
msgid "membership type"
msgstr "lidtype"
#: admin.py:56
#: admin.py:57
msgid "Age"
msgstr "Leeftijd"
#: admin.py:61
#: admin.py:62
msgid "≥ 18"
msgstr "≥ 18"
#: admin.py:62
#: admin.py:63
msgid "< 18"
msgstr "< 18"
#: admin.py:63
#: admin.py:64
msgid "Unknown"
msgstr "Onbekend"
#: admin.py:111 admin.py:130
#: admin.py:112 admin.py:131
msgid "First name"
msgstr "Voornaam"
#: admin.py:111 admin.py:130
#: admin.py:112 admin.py:131
msgid "Last name"
msgstr "Achternaam"
#: admin.py:111
#: admin.py:112
msgid "Address"
msgstr "Adres"
#: admin.py:112
#: admin.py:113
msgid "Address line 2"
msgstr "Tweede adresregel"
#: admin.py:112 models.py:189
#: admin.py:113 models.py:202
msgid "Postal code"
msgstr "Postcode"
#: admin.py:112 models.py:195
#: admin.py:113 models.py:208
msgid "City"
msgstr "Woonplaats"
#: admin.py:122
#: admin.py:123
msgid "Download address label for selected users"
msgstr "Download adreslabels voor geselecteerde gebruikers"
#: admin.py:130 models.py:152
#: admin.py:131 models.py:165
msgid "Student number"
msgstr "Studentnummer"
#: admin.py:137
#: admin.py:138
msgid "Download student number label for selected users"
msgstr "Download studentnummers voor geselecteerde gebruikers"
......@@ -98,95 +98,99 @@ msgstr "Verlopen lidmaatschap"
msgid "Membership expiration announcement sent"
msgstr "Meldingen vervallen lidmaatschap verzonden"
#: forms.py:42
#: forms.py:33
msgid "Please enter a bank account"
msgstr "Voer een bankrekening in"
#: forms.py:53
msgid "Send welcome email"
msgstr "Stuur welkomste-mails"
#: forms.py:43
#: forms.py:54
msgid "This email will include the generated password"
msgstr "Deze e-mail zal het gegenereerde wachtwoord bevatten"
#: forms.py:75
#: forms.py:86
msgid "Welcome to Study Association Thalia"
msgstr "Welkom bij Studievereniging Thalia"
#: models.py:99
#: models.py:110
msgid "Is this user currently active"
msgstr "Is deze user op dit moment actief"
#: models.py:133
#: models.py:144
msgid "Computing Science"
msgstr "Informatica"
#: models.py:134
#: models.py:145
msgid "Information Sciences"
msgstr "Informatiekunde"
#: models.py:146 templates/members/profile.html:40
#: models.py:159 templates/members/profile.html:40
msgid "Study programme"
msgstr "Studie"
#: models.py:156
#: models.py:169
msgid "Enter a valid student- or e/z/u-number."
msgstr "Voer een geldig student- of e/z/u-nummer in."
#: models.py:162
#: models.py:175
msgid "Starting year"
msgstr "Startjaar"
#: models.py:163
#: models.py:176
msgid "The year this member started studying."
msgstr "Het jaar waarop dit lid begon met studeren."
#: models.py:174
#: models.py:187
msgid "Include the house number"
msgstr "Inclusief huisnummer"
#: models.py:176
#: models.py:189
msgid "Street and house number"
msgstr "Straat en huisnummer"
#: models.py:182
#: models.py:195
msgid "Second address line"
msgstr "Tweede adresregel"
#: models.py:201
#: models.py:214
msgid "Phone number"
msgstr "Telefoonnummer"
#: models.py:202
#: models.py:215
msgid "Enter a phone number so Thalia may reach you"
msgstr "Voer een telefoonnummer in zodat Thalia je kan bereiken"
#: models.py:205 models.py:227
#: models.py:218 models.py:240
msgid "Please enter a valid phone number"
msgstr "Voer svp een geldig telefoonnummer in"
#: models.py:215
#: models.py:228
msgid "Emergency contact name"
msgstr "Contact voor noodgevallen"
#: models.py:216
#: models.py:229
msgid "Who should we contact in case of emergencies"
msgstr "Wie Thalia moet bereiken in bij noodgevallen"
#: models.py:223
#: models.py:236
msgid "Emergency contact phone number"
msgstr "Telefoonnummer noodcontact"
#: models.py:224
#: models.py:237
msgid "The phone number for the emergency contact"
msgstr "Het telefoonummer van de noodcontact"
#: models.py:236 templates/members/profile.html:47
#: models.py:249 templates/members/profile.html:47
msgid "Birthday"
msgstr "Verjaardag"
#: models.py:241
#: models.py:254
msgid "Display birthday"
msgstr "Laat verjaardag zien"
#: models.py:243
#: models.py:256
msgid ""
"Show your birthday to other members on your profile page and in the birthday "
"calendar"
......@@ -194,107 +198,107 @@ msgstr ""
"Toon je verjaardag aan andere leden op je profielpagina en in de "
"verjaardagskalender"
#: models.py:250 templates/members/profile.html:43
#: models.py:263 templates/members/profile.html:43
msgid "Website"
msgstr "Website"
#: models.py:251
#: models.py:264
msgid "Website to display on your profile page"
msgstr "Website om op je profiel te linken"
#: models.py:257
#: models.py:270
msgid "Profile text"
msgstr "Profieltekst"
#: models.py:258
#: models.py:271
msgid "Text to display on your profile"
msgstr "Tekst om te laten zien op je profielpagina"
#: models.py:265
#: models.py:278
msgid "Initials"
msgstr "Initialen"
#: models.py:272
#: models.py:285
msgid "Nickname"
msgstr "Bijnaam"
#: models.py:279
#: models.py:292
msgid "How to display name"
msgstr "Weergave naam"
#: models.py:280
#: models.py:293
msgid "Show full name"
msgstr "Volledige naam"
#: models.py:281
#: models.py:294
msgid "Show only nickname"
msgstr "Alleen initialen"
#: models.py:282
#: models.py:295
msgid "Show only first name"
msgstr "Alleen voornaam"
#: models.py:283
#: models.py:296
msgid "Show initials and last name"
msgstr "Alleen initialen en achternaam"
#: models.py:284
#: models.py:297
msgid "Show name like \"John 'nickname' Doe\""
msgstr "Laat zien als \"John 'bijnaam' Doe\""
#: models.py:285
#: models.py:298
msgid "Show nickname and last name"
msgstr "Laat bijnaam en achternaam zien"
#: models.py:290
#: models.py:303
msgid "Photo"
msgstr "Foto"
#: models.py:298
#: models.py:311
msgid "Which events can this member attend"
msgstr "Welke evenementen mag dit lid bijwonen"
#: models.py:299
#: models.py:312
msgid "All events"
msgstr "Alle evenementen"
#: models.py:300
#: models.py:313
msgid "User may not attend events"
msgstr "Gebruiker mag niet naar evenementen"
#: models.py:301
#: models.py:314
msgid "User may not attend drinks"
msgstr "Gebruiker mag niet naar borrels"
#: models.py:302
#: models.py:315
msgid "User may not attend anything"
msgstr "Gebruiker mag nergens heen"
#: models.py:309
#: models.py:322
msgid "Preferred language"
msgstr "Voorkeurstaal"
#: models.py:310
#: models.py:323
msgid "Preferred language for e.g. newsletters"
msgstr "Voorkeurstaal voor b.v.b. nieuwsbrieven"
#: models.py:317
#: models.py:330
msgid "Receive opt-in mailings"
msgstr "Ontvang opt-in mailings"
#: models.py:318
#: models.py:331
msgid "Receive mailings about vacancies and events from Thalia's sponsors."
msgstr "Ontvang mailings over vacatures en evenementen van Thalia's sponsoren."
#: models.py:324
#: models.py:337
msgid "Receive newsletter"
msgstr "Ontvang nieuwsbrief"
#: models.py:325
#: models.py:338
msgid "Receive the Thalia Newsletter"
msgstr "Ontvang de Thalia nieuwsbrief"
#: models.py:332
#: models.py:345
msgid ""
"Yes, I want Thalia to take the membership fees from my bank account through "
"direct debit for each year."
......@@ -302,69 +306,69 @@ msgstr ""
"Ja, ik wil dat Thalia verschuldigde lidmaatschapsgelden elk jaar van mijn "
"bankrekening afschrijft."
#: models.py:335
#: models.py:348
msgid "No, I will pay the contribution myself"
msgstr "Nee, ik zal de contributie zelf betalen"
#: models.py:336
#: models.py:349
msgid "Direct debit"
msgstr "Automatische afschijving"
#: models.py:337
#: models.py:350
msgid "Each year, have Thalia take the membership fees from my bank account"
msgstr ""
"Laat Thalia elk jaar het lidmaatschapsgeld van mijn bankrekening afschrijven"
#: models.py:343
#: models.py:356
msgid "Bank account"
msgstr "Bankrekening"
#: models.py:344
#: models.py:357
msgid "Bank account for direct debit"
msgstr "Bankrekening voor automatische afschrijving"
#: models.py:371
#: models.py:381
msgid "Display name"
msgstr "Weergavenaam"
#: models.py:396
#: models.py:410
msgid "You need to enter a nickname to use it as display name"
msgstr ""
"Je moet een bijnaam invoeren voordat je deze kunt gebruiken als weergavenaam"
#: models.py:407
#: models.py:444
msgid "Member"
msgstr "Lid"
#: models.py:408
#: models.py:445
msgid "Supporter"
msgstr "Begunstiger"
#: models.py:409
#: models.py:446
msgid "Honorary Member"
msgstr "Erelid"
#: models.py:414 templates/members/profile.html:37
#: models.py:451 templates/members/profile.html:37
msgid "Membership type"
msgstr "Lidtype"
#: models.py:423
#: models.py:459
msgid "User"
msgstr "Gebruiker"
#: models.py:427
#: models.py:463
msgid "Membership since"
msgstr "Lid sinds"
#: models.py:428
#: models.py:464
msgid "The date the member started holding this membership."
msgstr "De datum waarop het lid dit lidmaatschap is begonnen."
#: models.py:433
#: models.py:469
msgid "Membership until"
msgstr "Lid tot"
#: models.py:434
#: models.py:470
msgid "The date the member stops holding this membership."
msgstr "De datum waarop het lid dit lidmaatschap beëindigd."
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment