From 6029e4f0e58451848e2c4812d107aae190aa10c7 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 2 Jul 2018 19:58:25 +0200 Subject: Full text search: manage facet search (simple, hierarchic, OR) (refs #4180) --- archaeological_operations/forms.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'archaeological_operations/forms.py') diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index cbaa37310..4e01a492a 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -472,6 +472,8 @@ RecordRelationsFormSet.form_slug = "operation-080-relations" class OperationSelect(TableSelect): + _model = models.Operation + search_vector = forms.CharField(label=_(u"Full text search"), widget=widgets.SearchWidget) year = forms.IntegerField(label=_("Year")) @@ -486,12 +488,9 @@ class OperationSelect(TableSelect): if settings.ISHTAR_DPTS: towns__numero_insee__startswith = forms.ChoiceField( label=_(u"Department"), choices=[]) - common_name = forms.CharField(label=_(u"Name"), - max_length=30) - address = forms.CharField(label=_(u"Address / Locality"), - max_length=100) - operation_type = forms.ChoiceField(label=_(u"Operation type"), - choices=[]) + common_name = forms.CharField(label=_(u"Name"), max_length=30) + address = forms.CharField(label=_(u"Address / Locality"), max_length=100) + operation_type = forms.ChoiceField(label=_(u"Operation type"), choices=[]) end_date = forms.NullBooleanField(label=_(u"Is open?")) in_charge = forms.IntegerField( widget=widgets.JQueryAutoComplete( -- cgit v1.2.3