- tags = kwargs.pop('tags', [])
- super(SearchForm, self).__init__(*args, **kwargs)
- self.fields['q'].widget.attrs['title'] = u'tytuł, autor, motyw, epoka, rodzaj, gatunek literacki'
- self.fields['tags'].initial = '/'.join(tag.slug for tag in Tag.get_tag_list(tags))
-
-
-class UserSetsForm(forms.Form):
- def __init__(self, book, user, *args, **kwargs):
- super(UserSetsForm, self).__init__(*args, **kwargs)
- self.fields['set_ids'] = forms.ChoiceField(
- choices=[(tag.id, tag.name) for tag in Tag.objects.filter(category='set', user=user)],
- )
-
-
-class ObjectSetsForm(forms.Form):
- def __init__(self, obj, user, *args, **kwargs):
- super(ObjectSetsForm, self).__init__(*args, **kwargs)
- self.fields['set_ids'] = forms.MultipleChoiceField(
- label=u'Półki',
- required=False,
- choices=[(tag.id, tag.name) for tag in Tag.objects.filter(category='set', user=user)],
- initial=[tag.id for tag in obj.tags.filter(category='set', user=user)],
- widget=forms.CheckboxSelectMultiple
- )
-
-
-class NewSetForm(forms.Form):
- name = forms.CharField(max_length=50, required=True)
-
+ super(DownloadFormatsForm, self).__init__(*args, **kwargs)
+
+
+CUSTOMIZATION_FLAGS = (
+ ('nofootnotes', _("Don't show footnotes")),
+ ('nothemes', _("Don't disply themes")),
+ ('nowlfont', _("Don't use our custom font")),
+ )
+CUSTOMIZATION_OPTIONS = (
+ ('leading', _("Leading"), (
+ ('defaultleading', _('Normal leading')),
+ ('onehalfleading', _('One and a half leading')),
+ ('doubleleading', _('Double leading')),
+ )),
+ ('fontsize', _("Font size"), (
+ ('11pt', _('Default')),
+ ('13pt', _('Big'))
+ )),
+# ('pagesize', _("Paper size"), (
+# ('a4paper', _('A4')),
+# ('a5paper', _('A5')),
+# )),
+ )
+
+
+class CustomPDFForm(forms.Form):