From: Magnus Hagander Date: Wed, 1 Oct 2025 15:43:30 +0000 (+0200) Subject: Allow specifying check-in highlighted messages per registration X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=22173a4c3aecbc405c7f765de14a66aaafbcf4c7;p=pgeu-system.git Allow specifying check-in highlighted messages per registration This will be prepended to the check-in message that's set on the registration type, if both are set. Can be used to highlight an individual attendee for specific handling during check-in, e.g. brint attention about a keynote speaker. --- diff --git a/postgresqleu/confreg/backendforms.py b/postgresqleu/confreg/backendforms.py index 28dd70b1..492f3e90 100644 --- a/postgresqleu/confreg/backendforms.py +++ b/postgresqleu/confreg/backendforms.py @@ -334,7 +334,7 @@ class BackendRegistrationForm(BackendForm): model = ConferenceRegistration fields = ['firstname', 'lastname', 'email', 'company', 'address', 'country', 'phone', 'shirtsize', 'dietary', 'pronouns', 'twittername', 'nick', 'badgescan', 'shareemail', - 'regtype', 'additionaloptions'] + 'regtype', 'additionaloptions', 'checkinmessage'] _all_dynamic_fields = set(['badgescan', 'shareemail', 'dietary', 'pronouns', 'shirtsize']) @@ -365,6 +365,7 @@ class BackendRegistrationForm(BackendForm): fs = [ {'id': 'personal_info', 'legend': 'Personal information', 'fields': ['firstname', 'lastname', 'email', 'company', 'address', 'country', 'phone', 'twittername', 'nick']}, {'id': 'reg_info', 'legend': 'Registration information', 'fields': ['regtype', 'additionaloptions'] + list(self._get_reginfo_fields())}, + {'id': 'checkin', 'legend': 'Check-in', 'fields': ['checkinmessage']}, ] aspec = list(self._get_attendeespec_fields()) if aspec: diff --git a/postgresqleu/confreg/checkin.py b/postgresqleu/confreg/checkin.py index 2b6e829d..c38d35f1 100644 --- a/postgresqleu/confreg/checkin.py +++ b/postgresqleu/confreg/checkin.py @@ -261,8 +261,8 @@ def _get_reg_json(r, fieldscan=False): d['policyconfirmed'] = r.policyconfirmedat and "Policy confirmed" or "Policy NOT confirmed" if not r.policyconfirmedat: d['highlight'].append('policyconfirmed') - if r.regtype.checkinmessage: - d['checkinmessage'] = r.regtype.checkinmessage + if r.regtype.checkinmessage or r.checkinmessage: + d['checkinmessage'] = "\n\n".join(m for m in (r.checkinmessage, r.regtype.checkinmessage) if m) d['highlight'].append('checkinmessage') if r.checkedinat and not fieldscan: d['already'] = { diff --git a/postgresqleu/confreg/migrations/0121_conferenceregistration_checkinmessage.py b/postgresqleu/confreg/migrations/0121_conferenceregistration_checkinmessage.py new file mode 100644 index 00000000..5e8a9977 --- /dev/null +++ b/postgresqleu/confreg/migrations/0121_conferenceregistration_checkinmessage.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.11 on 2025-10-01 15:36 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('confreg', '0120_pronounstext'), + ] + + operations = [ + migrations.AddField( + model_name='conferenceregistration', + name='checkinmessage', + field=models.CharField(blank=True, help_text='Message shown when the attendee is checked in', max_length=500, verbose_name='Check-in message'), + ), + ] diff --git a/postgresqleu/confreg/models.py b/postgresqleu/confreg/models.py index bfe6acdc..b8e1b4b3 100644 --- a/postgresqleu/confreg/models.py +++ b/postgresqleu/confreg/models.py @@ -656,6 +656,7 @@ class ConferenceRegistration(models.Model): lastmodified = models.DateTimeField(null=False, blank=False, auto_now=True) checkedinat = models.DateTimeField(null=True, blank=True, verbose_name="Checked in at") checkedinby = models.ForeignKey('ConferenceRegistration', null=True, blank=True, verbose_name="Checked by by", on_delete=models.CASCADE) + checkinmessage = models.CharField(max_length=500, null=False, blank=True, verbose_name='Check-in message', help_text='Message shown when the attendee is checked in') # If an invoice is generated, link to it here so we can find our # way back easily. diff --git a/template/confreg/admin_registration_single.html b/template/confreg/admin_registration_single.html index 87e11fc0..6b65744e 100644 --- a/template/confreg/admin_registration_single.html +++ b/template/confreg/admin_registration_single.html @@ -175,6 +175,12 @@ Check-in process +{%if reg.checkinmessage %} + + Check-in message + {{reg.checkinmessage}} + +{%endif%} {%if conference.queuepartitioning%} Queue partition