ignore comments in xml when indexing; make-xml-zip script
[wolnelektury.git] / apps / catalogue / forms.py
index 438df07..655f1ec 100644 (file)
@@ -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):