Skip to content

Commit c071241

Browse files
authored
optional use of saved answers (#1634)
1 parent 4da55b7 commit c071241

14 files changed

Lines changed: 258 additions & 88 deletions

File tree

ephios/core/signals.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ def collect_signup_form_fields(shift, participant, participation, signup_choice)
158158
)
159159
for _, additional_fields in responses:
160160
for fieldname, field in additional_fields.items():
161+
# add some defaults to form field and serializer kwargs
161162
yield fieldname, {
162163
**field,
163164
"form_kwargs": {

ephios/core/signup/views.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
from django.db import transaction
33
from django.shortcuts import redirect
44
from django.utils.functional import SimpleLazyObject, cached_property
5+
from django.utils.html import format_html
6+
from django.utils.translation import gettext
57
from django.utils.translation import gettext_lazy as _
68
from django.views.generic import FormView
79

@@ -93,9 +95,13 @@ def _collect_quick_action_signup_data(self):
9395
):
9496
messages.warning(
9597
self.request,
96-
_(
97-
"You are already confirmed for the following other shifts: {shifts}. Please check your individual availability."
98-
).format(shifts=", ".join(str(shift) for shift in conflicts)),
98+
format_html(
99+
gettext(
100+
"Please check that your individual start and end times do not overlap with these "
101+
"other confirmed participations: {shifts}"
102+
),
103+
shifts=", ".join(str(shift) for shift in conflicts),
104+
),
99105
)
100106
return None
101107

0 commit comments

Comments
 (0)