Skip to content

Commit

Permalink
signup form was using the wrong enum values
Browse files Browse the repository at this point in the history
  • Loading branch information
bbonf committed Jan 9, 2024
1 parent 46a07c8 commit 9df4e1c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions parent/parent/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def get_context(self, name, value, attrs):
context = super().get_context(name, value, attrs)
if value is None:
return context

if value == ["Nederlands"]:
context["mono_dutch_checked"] = True
elif len(value) == 1:
Expand Down Expand Up @@ -84,18 +84,18 @@ class SignupForm(TemplatedForm):
birth_weight = forms.ChoiceField(
label=_("parent:forms:signup:birth_weight"),
choices=(
("less_than_2500", _("parent:forms:birth_weight:less_than_2500")),
("2500_to_4500", _("parent:forms:birth_weight:2500_to_4500")),
("more_than_4500", _("parent:forms:birth_weight:more_than_4500")),
("LESS_THAN_2500", _("parent:forms:birth_weight:less_than_2500")),
("2500_TO_4500", _("parent:forms:birth_weight:2500_to_4500")),
("MORE_THAN_4500", _("parent:forms:birth_weight:more_than_4500")),
),
widget=BootstrapRadioSelect(),
)
pregnancy_duration = forms.ChoiceField(
label=_("parent:forms:signup:pregnancy_duration"),
choices=(
("less_than_37", _("parent:forms:pregnancy_duration:less_than_37")),
("37_42_weeks", _("parent:forms:pregnancy_duration:37_42_weeks")),
("more_than_42", _("parent:forms:pregnancy_duration:more_than_42")),
("LESS_THAN_37", _("parent:forms:pregnancy_duration:less_than_37")),
("37_TO_42", _("parent:forms:pregnancy_duration:37_to_42")),
("MORE_THAN_42", _("parent:forms:pregnancy_duration:more_than_42")),
),
widget=BootstrapRadioSelect(),
)
Expand Down
2 changes: 1 addition & 1 deletion parent/parent/locale/nl/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ msgid "parent:forms:pregnancy_duration:less_than_37"
msgstr "minder dan 37 weken"

#: parent/forms.py:73
msgid "parent:forms:pregnancy_duration:37_42_weeks"
msgid "parent:forms:pregnancy_duration:37_to_42"
msgstr "37 – 42 weken"

#: parent/forms.py:74
Expand Down

0 comments on commit 9df4e1c

Please sign in to comment.