From 6fb7254ac5eaec71f196b3bbafdd9d216baf8d36 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 5 Jun 2019 14:31:27 +0200 Subject: Operation search: areas criteria --- archaeological_operations/forms.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'archaeological_operations/forms.py') diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index 55a9541ff..c4c61a748 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -45,7 +45,7 @@ from ishtar_common.forms_common import TownFormSet, get_town_field, TownForm from ishtar_common.models import valid_id, Person, Town, \ DocumentTemplate, Organization, get_current_profile, \ person_type_pks_lazy, person_type_pk_lazy, organization_type_pks_lazy, \ - organization_type_pk_lazy, SpatialReferenceSystem + organization_type_pk_lazy, SpatialReferenceSystem, Area from ishtar_common.wizards import MultiValueDict from widgets import ParcelWidget, SelectParcelWidget, OAWidget @@ -488,6 +488,7 @@ class OperationSelect(HistorySelect): drassm_code = forms.CharField( label=_(u"DRASSM code"), required=False, max_length=100) towns = get_town_field() + towns__areas = forms.ChoiceField(label=_("Areas"), choices=[]) parcel = forms.CharField(label=_(u"Parcel")) if settings.ISHTAR_DPTS: towns__numero_insee__startswith = forms.ChoiceField( @@ -576,6 +577,7 @@ class OperationSelect(HistorySelect): FieldType('periods', models.Period), FieldType('record_quality_type', models.RecordQualityType), FieldType('relation_types', models.RelationType), + FieldType('towns__areas', Area), ] SITE_KEYS = {"archaeological_sites": None} -- cgit v1.2.3