X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/099e83b3f8a4e583d987a9f3dd3e4aa3c4501951..9531d8a55106384d86cda24825b5f9a9d769d33d:/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) +