summaryrefslogtreecommitdiff
path: root/archaeological_operations/forms.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2024-09-20 10:30:42 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2024-09-20 15:47:14 +0200
commit14b2433f8b04d11c2c3ad721997289ffa0777de3 (patch)
tree67b2f6bdc05b81979e59690e8128cb97c5b0dbfe /archaeological_operations/forms.py
parentfc50391805b08914e740c518301dd16087b00028 (diff)
downloadIshtar-14b2433f8b04d11c2c3ad721997289ffa0777de3.tar.bz2
Ishtar-14b2433f8b04d11c2c3ad721997289ffa0777de3.zip
✨ archaeological sites search: add new fields
Diffstat (limited to 'archaeological_operations/forms.py')
-rw-r--r--archaeological_operations/forms.py20
1 files changed, 18 insertions, 2 deletions
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