- self.fields['q'].widget.attrs['title'] = _('title, author, theme/topic, epoch, kind, genre, phrase')
- #self.fields['q'].widget.attrs['style'] = ''
- self.fields['tags'].initial = '/'.join(tag.url_chunk for tag in Tag.get_tag_list(tags))
- if book is not None:
- self.fields['book'].initial = book.id
+ self.fields['q'].widget.attrs['id'] = _('search')
+ self.fields['q'].widget.attrs['autocomplete'] = _('off')
+ self.fields['q'].widget.attrs['data-source'] = _(source)
+ if not 'q' in self.data:
+ self.fields['q'].widget.attrs['title'] = _('title, author, theme/topic, epoch, kind, genre, phrase')