From 14b2433f8b04d11c2c3ad721997289ffa0777de3 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 20 Sep 2024 10:30:42 +0200 Subject: ✨ archaeological sites search: add new fields MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archaeological_operations/forms.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'archaeological_operations/forms.py') diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index 1dbafbd14..18e588d5a 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -1200,14 +1200,23 @@ class SiteSelect(GeoItemSelect): name = forms.CharField(label=_("Name"), max_length=200, required=False) other_reference = forms.CharField(label=_("Other reference"), max_length=200, required=False) + types = forms.ChoiceField(label=_("Types"), choices=[], required=False) + discoverer = forms.IntegerField( + widget=widgets.JQueryAutoComplete(reverse_lazy('autocomplete-person'), associated_model=Person), + label=_("Discoverer")) periods = forms.ChoiceField(label=_("Periods"), choices=[], required=False) remains = forms.ChoiceField(label=_("Remains"), choices=[], required=False) cultural_attributions = forms.ChoiceField( label=_("Cultural attribution"), choices=[], required=False) + discovery_status = forms.ChoiceField(label=_("Discovery status"), choices=[], required=False) + current_status = forms.ChoiceField(label=_("Current status"), choices=[], required=False) + nature_of_site = forms.ChoiceField(label=_("Nature of site"), choices=[], required=False) + interpretation_level = forms.ChoiceField(label=_("Interpretation level"), choices=[], required=False) towns = get_town_field() towns__areas = forms.ChoiceField(label=_("Areas"), choices=[]) - comment = forms.CharField(label=_("Comment"), max_length=200, - required=False) + description = forms.CharField(label=_("Description"), max_length=200, required=False) + public_description = forms.CharField(label=_("Public description"), max_length=200, required=False) + comment = forms.CharField(label=_("Comment"), max_length=200, required=False) top_operation = forms.IntegerField( label=_("Top operation"), required=False, widget=widgets.JQueryAutoComplete( @@ -1220,6 +1229,8 @@ class SiteSelect(GeoItemSelect): reverse_lazy('autocomplete-operation'), associated_model=models.Operation), validators=[valid_id(models.Operation)]) + precise_locality = forms.CharField(label=_("Precise locality"), max_length=200, + required=False) locality_ngi = forms.CharField( label=_("National Geographic Institute locality"), max_length=200, required=False) @@ -1247,7 +1258,12 @@ class SiteSelect(GeoItemSelect): TYPES = [ FieldType('periods', models.Period), FieldType('remains', models.RemainType), + FieldType('types', models.SiteType), + FieldType('current_status', models.SiteCurrentStatusType), + FieldType('discovery_status', models.SiteDiscoveryStatusType), FieldType('cultural_attributions', models.CulturalAttributionType), + FieldType('nature_of_site', models.NatureOfSiteType), + FieldType('interpretation_level', models.InterpretationLevelType), FieldType('towns__areas', Area), ] + GeoItemSelect.TYPES -- cgit v1.2.3