Commit bb3d864a authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Merge branch...

Merge branch '417-lidmaatschapsdata-van-een-commissie-kunnen-buiten-het-bestaan-van-een-commissie-vallen' into 'master'

Force start and end date to be within comittee start and end date

Closes #417

See merge request !561
parents a81a3f88 4c6cbebc
......@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-05 19:09+0200\n"
"PO-Revision-Date: 2017-08-17 11:41+0200\n"
"POT-Creation-Date: 2017-09-13 19:42+0200\n"
"PO-Revision-Date: 2017-09-13 19:50+0200\n"
"Last-Translator: Sébastiaan Versteeg <se_bastiaan@outlook.com>\n"
"Language-Team: \n"
"Language: nl\n"
......@@ -54,101 +54,109 @@ msgstr "contact mailinglijst"
msgid "Wiki namespace"
msgstr "Wiki namespace"
#: models.py:121 models.py:124
#: models.py:123 models.py:126
msgid "Please use either the mailing list or email address option."
msgstr "Selecteer een mailinglijst óf vul een e-mailadres in."
#: models.py:135
#: models.py:137
msgid "committee"
msgstr "commissie"
#: models.py:136 templates/activemembers/committee_index.html:7
#: models.py:138 templates/activemembers/committee_index.html:7
msgid "committees"
msgstr "commissies"
#: models.py:157
#: models.py:159
msgid "Is this a board"
msgstr "Is dit een bestuur"
#: models.py:164
#: models.py:166
msgid "Access the board wiki"
msgstr ""
#: models.py:190 models.py:191
#: models.py:192 models.py:193
msgid "A board already exists for those years"
msgstr "Er bestaat al een bestuur voor die jaren"
#: models.py:209 models.py:342
#: models.py:211 models.py:350
msgid "Member"
msgstr "Lid"
#: models.py:215
#: models.py:217
msgid "Committee"
msgstr "Commissie"
#: models.py:219
#: models.py:221
msgid "Committee member since"
msgstr "Commissielid sinds"
#: models.py:220
#: models.py:222
msgid "The date this member joined the committee in this role"
msgstr "De datum waarop deze persoon lid werd deze commissie in deze rol"
#: models.py:225
#: models.py:227
msgid "Committee member until"
msgstr "Commissielid tot"
#: models.py:226
#: models.py:228
msgid "A member of this committee until this time (can't be in the future)."
msgstr ""
"De datum waarop deze persoon de commissie verliet (kan niet in de toekomst "
"liggen)"
#: models.py:233
#: models.py:235
msgid "Chair of the committee"
msgstr "Voorzitter van de commissie"
#: models.py:234
#: models.py:236
msgid "There can only be one chair at a time!"
msgstr "Er kan maar één voorzitter tegelijkertijd zijn!"
#: models.py:240
#: models.py:242
msgid "role"
msgstr "rol"
#: models.py:241
#: models.py:243
msgid "The role of this member"
msgstr "De rol van dit lid binnen de commissie"
#: models.py:267
#: models.py:269
msgid "End date can't be before start date"
msgstr "De einddatum kan niet voor de startdatum liggen"
#: models.py:270
#: models.py:272
msgid "End date can't be in the future"
msgstr "De einddatum kan niet in de toekomst liggen"
#: models.py:274
#: models.py:276
msgid "Start date can't be before committee start date"
msgstr "De begindatum kan niet voor de begindatum van de commissie liggen"
#: models.py:279
msgid "Start date can't be after committee end date"
msgstr "De begindatum kan niet na de einddatum van de commissie liggen"
#: models.py:284
msgid "End date cannot be set for boards"
msgstr "Voor besturen kan geen einddatum worden opgegeven"
#: models.py:298
#: models.py:307
msgid "There already is a chair for this time period"
msgstr "Er is al een voorzitter voor deze periode"
#: models.py:314
#: models.py:324
msgid "This member is already in the committee for this period"
msgstr "Deze persoon is al lid van deze commissie in de aangegeven periode"
#: models.py:334
#: models.py:342
msgid "committee membership"
msgstr "commissielidmaatschap"
#: models.py:335
#: models.py:343
msgid "committee memberships"
msgstr "commissielidmaatschappen"
#: models.py:347
#: models.py:355
#, python-brace-format
msgid "{name} mentor in {year}"
msgstr "{name} mentor in {year}"
......
......@@ -270,6 +270,17 @@ class CommitteeMembership(models.Model, metaclass=ModelTranslateMeta):
if self.until and self.until > timezone.now().date():
raise ValidationError(
{'until': _("End date can't be in the future")})
if (self.since and self.committee.since and
self.since < self.committee.since):
raise ValidationError(
{'since': _("Start date can't be before committee start date")}
)
if (self.since and self.committee.until and
self.since > self.committee.until):
raise ValidationError(
{'since': _("Start date can't be after committee end date")})
try:
if self.until and self.committee.board:
raise ValidationError(
......
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