Make offer confirmation singular/plural
authorDaniel Gustafsson <daniel@yesql.se>
Tue, 25 Sep 2018 19:04:34 +0000 (21:04 +0200)
committerDaniel Gustafsson <daniel@yesql.se>
Tue, 25 Sep 2018 19:10:08 +0000 (21:10 +0200)
Present different confirmation texts for waitlist offers depending on
if a single offer is extended, or multiple.

Reviewed-by: Magnus Hagander
postgresqleu/confreg/forms.py

index 40819ec2d281b624bbbc278c2bd8e411d4261540..e53c3125debfe322932cbe9958b1115d1086b321 100644 (file)
@@ -622,7 +622,10 @@ class WaitlistOfferForm(forms.Form):
                super(WaitlistOfferForm, self).__init__(*args, **kwargs)
                if self.data:
                        self.reg_list = self._get_id_list_from_data()
-                       self.fields['confirm'].help_text = "Confirm that you want to send an offer to {0} attendees on the waitlist".format(len(self.reg_list))
+                       if len(self.reg_list) == 1:
+                               self.fields['confirm'].help_text = "Confirm that you want to send an offer to an attendee on the waitlist"
+                       else
+                               self.fields['confirm'].help_text = "Confirm that you want to send an offer to {0} attendees on the waitlist".format(len(self.reg_list))
                        if self.data.get('submit') == 'Make offer for hours':
                                del self.fields['until']
                        else: