X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/099e83b3f8a4e583d987a9f3dd3e4aa3c4501951..75349c5b71dfbc94bc28319c86794b56da36a08b:/apps/catalogue/forms.py?ds=inline 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) +