X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/3c12104d064098096eb5fe9c9ee122d0293e10f2..d60f44f5eceafa25705d55044ae1b11aceb28187:/apps/catalogue/forms.py diff --git a/apps/catalogue/forms.py b/apps/catalogue/forms.py index 438df0729..655f1eccd 100644 --- a/apps/catalogue/forms.py +++ b/apps/catalogue/forms.py @@ -36,10 +36,11 @@ class SearchForm(forms.Form): def __init__(self, source, *args, **kwargs): kwargs['auto_id'] = False super(SearchForm, self).__init__(*args, **kwargs) - self.fields['q'].widget.attrs['title'] = _('title, author, theme/topic, epoch, kind, genre, phrase') + self.fields['q'].widget.attrs['id'] = _('search') self.fields['q'].widget.attrs['autocomplete'] = _('off') self.fields['q'].widget.attrs['data-source'] = _(source) - self.fields['q'].widget.attrs['id'] = _('search') + if not 'q' in self.data: + self.fields['q'].widget.attrs['title'] = _('title, author, theme/topic, epoch, kind, genre, phrase') class UserSetsForm(forms.Form):