diff options
author | Magnus Hagander | 2024-01-29 08:50:55 +0000 |
---|---|---|
committer | Magnus Hagander | 2024-01-29 08:50:55 +0000 |
commit | d921161847d71503f55fe25068521f1ee6fa3522 (patch) | |
tree | 81dade5a4d6fdbd0ff81e126d1e470d740e42c5f /postgresqleu/util/widgets.py | |
parent | cddc17db208a0c0562f1784ac80d44597769946c (diff) |
Remove jquery, selectize and bootstrap js from conference frontend
This was used for the call for papers form handling of multiple
speakers at this point, and caused issues with skins that didn't realize
this and thus didn't include them.
Replace it with a native js version, which instead of doing autocomplete
just adds a button for "Add speaker" to add secondary speakers. This
shows a browser popup asking for the email address of an existing
profile.
In practice I think this actually makes it more clear to the user what's
going on than the previous autocomplete version, just not as pretty.
It was also used for tags, which being a much shorter list, could just
be replaced with a set of checkboxes. Tags was also something most
conferences didn't use, and it only showed up if explicitly enabled on
the conference (non-default).
Diffstat (limited to 'postgresqleu/util/widgets.py')
-rw-r--r-- | postgresqleu/util/widgets.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/postgresqleu/util/widgets.py b/postgresqleu/util/widgets.py index 146cd458..8a330204 100644 --- a/postgresqleu/util/widgets.py +++ b/postgresqleu/util/widgets.py @@ -168,3 +168,12 @@ class SelectSetValueWidget(forms.Select): context = super().get_context(name, value, attrs) context['setmap'] = self.setvalues return context + + +class CallForPapersSpeakersWidget(forms.SelectMultiple): + template_name = 'forms/widgets/speaker_select.html' + + def get_context(self, name, value, attrs): + context = super().get_context(name, value, attrs) + context['widget']['options'] = list(self.options(name, context['widget']['value'], attrs)) + return context |