Skip to content

Commit 6d36010

Browse files
speaker form fixes
1 parent b16780f commit 6d36010

File tree

7 files changed

+13
-8
lines changed

7 files changed

+13
-8
lines changed

app/eventyay/api/views/review.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
list=extend_schema(
1717
summary="List Reviews",
1818
parameters=[
19-
build_search_docs("submission.title", "user.name"),
19+
build_search_docs("submission.title", "user.fullname"),
2020
build_expand_docs(
2121
"user",
2222
"scores.category",

app/eventyay/api/views/schedule.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def get_exporter(self, request, event, pk=None, name=None):
212212
summary="List Talk Slots",
213213
description="This endpoint always returns a filtered list. If you don’t provide any filters of your own, it will be filtered to show only talk slots in the latest published schedule.",
214214
parameters=[
215-
build_search_docs("submission.title", "submission.speakers.name"),
215+
build_search_docs("submission.title", "submission.speakers.fullname"),
216216
build_expand_docs(
217217
"room",
218218
"schedule",
@@ -262,7 +262,7 @@ class TalkSlotViewSet(
262262
serializer_class = TalkSlotSerializer
263263
queryset = TalkSlot.objects.none()
264264
endpoint = "slots"
265-
search_fields = ("submission__title", "submission__speakers__name")
265+
search_fields = ("submission__title", "submission__speakers__fullname")
266266
filterset_class = TalkSlotFilter
267267
permission_map = {"ical": "schedule.view_talkslot"}
268268

app/eventyay/api/views/submission.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class Meta:
9191
list=extend_schema(
9292
summary="List Submissions",
9393
parameters=[
94-
build_search_docs("title", "speaker.name"),
94+
build_search_docs("title", "speaker.fullname"),
9595
build_expand_docs(
9696
"speakers",
9797
"speakers.answers",
@@ -161,7 +161,7 @@ class SubmissionViewSet(PretalxViewSetMixin, viewsets.ModelViewSet):
161161
serializer_class = SubmissionSerializer
162162
queryset = Submission.objects.none()
163163
lookup_field = "code__iexact"
164-
search_fields = ("title", "speakers__name")
164+
search_fields = ("title", "speakers__fullname")
165165
filterset_class = SubmissionFilter
166166
permission_map = {
167167
"make_submitted": "submission.state_change_submission",

app/eventyay/cfp/templates/cfp/event/submission_profile.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
{% block inner %}
1111

12-
{{ form.name.as_field_group }}
12+
{{ form.fullname.as_field_group }}
1313
{% if form.biography %}
1414
{{ form.biography.as_field_group }}
1515
{% endif %}

app/eventyay/cfp/templates/cfp/event/user_profile.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h2>{% translate "Your Profile" %}</h2>
2525
{% csrf_token %}
2626
{% include "common/forms/errors.html" with form=profile_form %}
2727

28-
{{ profile_form.name.as_field_group }}
28+
{{ profile_form.fullname.as_field_group }}
2929
{% if profile_form.biography %}
3030
{{ profile_form.biography.as_field_group }}
3131
{% endif %}

app/eventyay/orga/views/typeahead.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def nav_typeahead(request):
136136
if query and request.user.is_administrator:
137137
qs_users = (
138138
User.objects.filter(
139-
Q(name__icontains=query) | Q(email__icontains=query) | Q(code__istartswith=query)
139+
Q(fullname__icontains=query) | Q(email__icontains=query) | Q(code__istartswith=query)
140140
).order_by('email')
141141
if query
142142
else User.objects.none()

app/eventyay/person/forms/profile.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ def __init__(self, *args, name=None, **kwargs):
8888
self.fields[field].widget = self.Meta.widgets.get(field)()
8989
self._update_cfp_texts(field)
9090

91+
field_names = list(self.fields)
92+
if 'fullname' in field_names:
93+
field_names.remove('fullname')
94+
self.order_fields(['fullname'] + field_names)
95+
9196
if not self.event.cfp.request_avatar:
9297
self.fields.pop('avatar', None)
9398
self.fields.pop('avatar_source', None)

0 commit comments

Comments
 (0)