summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Hagander2025-10-01 15:43:30 +0000
committerMagnus Hagander2025-10-01 15:43:30 +0000
commit22173a4c3aecbc405c7f765de14a66aaafbcf4c7 (patch)
treebbf93c600fa543e142832c6407d65807f6f8082d
parentd99ff874e6ecedc0c6d5d7980a7af4340797514c (diff)
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.
-rw-r--r--postgresqleu/confreg/backendforms.py3
-rw-r--r--postgresqleu/confreg/checkin.py4
-rw-r--r--postgresqleu/confreg/migrations/0121_conferenceregistration_checkinmessage.py18
-rw-r--r--postgresqleu/confreg/models.py1
-rw-r--r--template/confreg/admin_registration_single.html6
5 files changed, 29 insertions, 3 deletions
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 @@
<tr>
<th colspan="2" class="col-md-12">Check-in process</th>
</tr>
+{%if reg.checkinmessage %}
+ <tr>
+ <td>Check-in message</td>
+ <td>{{reg.checkinmessage}}</td>
+ </tr>
+{%endif%}
{%if conference.queuepartitioning%}
<tr>
<td>Queue partition</td>