Add fieldsets to registration edit form
authorMagnus Hagander <magnus@hagander.net>
Sat, 17 Nov 2018 17:44:39 +0000 (18:44 +0100)
committerMagnus Hagander <magnus@hagander.net>
Sat, 17 Nov 2018 17:44:39 +0000 (18:44 +0100)
Makes it easier to parse since it's now a fairly large form.

postgresqleu/confreg/backendforms.py

index c5b441c0273442418d484b2fc14a1d7bc862d1e6..ce7836977eec9005014efb865d0561024ff2f3f6 100644 (file)
@@ -250,6 +250,11 @@ class BackendRegistrationForm(BackendForm):
                fields = ['firstname', 'lastname', 'email', 'company', 'address', 'country', 'phone',
                                  'shirtsize', 'dietary', 'twittername', 'nick', 'shareemail',
                                  'regtype', 'additionaloptions']
+       fieldsets = [
+               {'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', 'shareemail']},
+               {'id': 'attendee_specifics', 'legend': 'Attendee specifics', 'fields': ['shirtsize', 'dietary']},
+       ]
 
        def fix_fields(self):
                if self.instance.payconfirmedat: