Skip to content

Commit 9e36c59

Browse files
committed
Add "check-in message" to registration types
This message will be shown (highlighed) when an attendee is checked in, and can be used to for example alert the person doing the check-in that they should validate the registration by checking a student-id. To do so, the "highlight this field" functionality is moved into the backend and returned as part of the API, instead of the very limited "if ' NOT ' is present in the field text then highlight it" (used only for unconfirmed policies) that was previously used. Fixes #190
1 parent d73bc19 commit 9e36c59

File tree

7 files changed

+38
-3
lines changed

7 files changed

+38
-3
lines changed

docs/confreg/registrations.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,14 @@ Alert message
238238
registration. This is typically used for things like informing people of special
239239
requirements such as a student ID to access student discounts.
240240

241+
Check-in message
242+
: This message is shown when the attendee is [checked in](tickets#checkin),
243+
either using the web app or the native app. It
244+
is shown only to the person making the check-in. This cam typically be
245+
used to alert the check-in operator that they should verify the
246+
attendees eligibility for the registration type, for example by
247+
checking a student or corporate id.
248+
241249
Autocancel invoices
242250
: If registrations with this registration type should override the value for
243251
autocancel from the [conference](configuring). The lowest value of

docs/confreg/tickets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ the desired number of queue partitions, and the system will calculate
4545
(based on current confirmed attendees) which letters to send to which
4646
queue.
4747

48-
## Check-in
48+
## Check-in <a name="checkin"></a>
4949

5050
The check-in system is designed for those working the registration
5151
desk at the event. It's a small web app designed specifically to be

media/js/scanner.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function add_dynamic_fields(reg, cl, regcompleted) {
7474

7575
if (typeof(val) == 'string') {
7676
let e = $('<dd/>').text(val).addClass('found_dyn');
77-
if (val.includes(' NOT ')) {
77+
if (reg['highlight'].includes(a[0])) {
7878
e = $(e).addClass('found_dyn_warn');
7979
}
8080
elements.push(e);

postgresqleu/confreg/backendforms.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ class BackendRegistrationTypeForm(BackendForm):
437437

438438
class Meta:
439439
model = RegistrationType
440-
fields = ['regtype', 'regclass', 'cost', 'active', 'activeuntil', 'days', 'sortkey', 'specialtype', 'require_phone', 'alertmessage', 'invoice_autocancel_hours', 'requires_option', 'upsell_target']
440+
fields = ['regtype', 'regclass', 'cost', 'active', 'activeuntil', 'days', 'sortkey', 'specialtype', 'require_phone', 'alertmessage', 'checkinmessage', 'invoice_autocancel_hours', 'requires_option', 'upsell_target']
441441

442442
@classmethod
443443
def get_column_filters(cls, conference):
@@ -525,6 +525,7 @@ def copy_from_conference(self, targetconf, sourceconf, idlist):
525525
specialtype=source.specialtype,
526526
# Not copying days
527527
alertmessage=source.alertmessage,
528+
checkinmessage=source.checkinmessage,
528529
upsell_target=source.upsell_target,
529530
# Not copying invoice_autocancel_hours
530531
# Not copying requires_option

postgresqleu/confreg/checkin.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ def _do_checkin_scan(request, conference, is_admin, extra=None):
8787
'scanfields': [
8888
["name", "Name"],
8989
["type", "Registration type"],
90+
["checkinmessage", "Check-in message"],
9091
["policyconfirmed", "Policy confirmed"],
9192
["photoconsent", "Photo consent"],
9293
["tshirt", "T-Shirt size"],
@@ -252,11 +253,17 @@ def _get_reg_json(r, fieldscan=False):
252253
'tshirt': r.shirtsize and r.shirtsize.shirtsize,
253254
'additional': [a.name for a in r.additionaloptions.all()],
254255
'token': r.publictoken if fieldscan else r.idtoken,
256+
'highlight': [],
255257
}
256258
if r.conference.askphotoconsent:
257259
d['photoconsent'] = r.photoconsent and "Photos OK" or "Photos NOT OK"
258260
if r.conference.confirmpolicy:
259261
d['policyconfirmed'] = r.policyconfirmedat and "Policy confirmed" or "Policy NOT confirmed"
262+
if not r.policyconfirmedat:
263+
d['highlight'].append('policyconfirmed')
264+
if r.regtype.checkinmessage:
265+
d['checkinmessage'] = r.regtype.checkinmessage
266+
d['highlight'].append('checkinmessage')
260267
if r.checkedinat and not fieldscan:
261268
d['already'] = {
262269
'title': 'Attendee already checked in',
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 4.2.11 on 2025-08-10 12:32
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('confreg', '0117_pronouns'),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name='registrationtype',
15+
name='checkinmessage',
16+
field=models.TextField(blank=True, help_text='Message shown when the attendee is checked in', verbose_name='Check-in message'),
17+
),
18+
]

postgresqleu/confreg/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ class RegistrationType(models.Model):
466466
require_phone = models.BooleanField(null=False, blank=False, default=False, help_text="Require phone number to be entered")
467467
days = models.ManyToManyField(RegistrationDay, blank=True)
468468
alertmessage = models.TextField(null=False, blank=True, verbose_name="Alert message", help_text="Message shown in popup to user when completing the registration")
469+
checkinmessage = models.TextField(null=False, blank=True, verbose_name='Check-in message', help_text='Message shown when the attendee is checked in')
469470
upsell_target = models.BooleanField(null=False, blank=False, default=False, help_text='Is target registration type for upselling in order to add additional options')
470471
invoice_autocancel_hours = models.IntegerField(blank=True, null=True, validators=[MinValueValidator(1), ], verbose_name="Autocancel invoices", help_text="Automatically cancel invoices after this many hours")
471472
requires_option = models.ManyToManyField('ConferenceAdditionalOption', blank=True, help_text='Requires at least one of the selected additional options to be picked')

0 commit comments

Comments
 (0)