X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/099e83b3f8a4e583d987a9f3dd3e4aa3c4501951..20be4d9d8dad31ecbda183f4b5c74c9d80799f72:/apps/catalogue/forms.py?ds=sidebyside diff --git a/apps/catalogue/forms.py b/apps/catalogue/forms.py index 48faeb15b..bf6b0df35 100644 --- a/apps/catalogue/forms.py +++ b/apps/catalogue/forms.py @@ -60,3 +60,19 @@ class NewSetForm(forms.Form): new_set.save() return new_set + +FORMATS = ( + ('mp3', 'MP3'), + ('ogg', 'OGG'), + ('pdf', 'PDF'), + ('odt', 'ODT'), + ('txt', 'TXT'), +) + + +class DownloadFormatsForm(forms.Form): + formats = forms.MultipleChoiceField(required=False, choices=FORMATS, widget=forms.CheckboxSelectMultiple) + + def __init__(self, *args, **kwargs): + super(DownloadFormatsForm, self).__init__(*args, **kwargs) +