summaryrefslogtreecommitdiff
path: root/archaeological_operations/forms.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2022-11-02 16:03:26 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-12-12 12:23:19 +0100
commit49baa55756d8f6427f382c327ec7fe233b2c05d3 (patch)
tree5888b277c026e0c6e9209472f016055ba73d77c4 /archaeological_operations/forms.py
parent4ed26f54bde75a1a392b717d5306a3f59802206b (diff)
downloadIshtar-49baa55756d8f6427f382c327ec7fe233b2c05d3.tar.bz2
Ishtar-49baa55756d8f6427f382c327ec7fe233b2c05d3.zip
Geodata - search: add search fields on related items searches
Diffstat (limited to 'archaeological_operations/forms.py')
-rw-r--r--archaeological_operations/forms.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py
index 4609813b8..b4822e496 100644
--- a/archaeological_operations/forms.py
+++ b/archaeological_operations/forms.py
@@ -42,7 +42,7 @@ from ishtar_common import widgets
from ishtar_common.forms import FinalForm, FormSet, get_now, \
reverse_lazy, TableSelect, get_data_from_formset, QAForm, CustomFormSearch,\
ManageOldType, IshtarForm, CustomForm, FieldType, FormHeader, \
- DocumentItemSelect, LockForm, MultiSearchForm
+ GeoItemSelect, LockForm, MultiSearchForm
from ishtar_common.forms_common import TownFormSet, get_town_field, TownForm
from ishtar_common.models import valid_id, valid_ids, Person, Town, \
DocumentTemplate, Organization, get_current_profile, \
@@ -479,7 +479,7 @@ RecordRelationsFormSet.form_admin_name = _("Operation - 080 - Relations")
RecordRelationsFormSet.form_slug = "operation-080-relations"
-class OperationSelect(DocumentItemSelect):
+class OperationSelect(GeoItemSelect):
_model = models.Operation
form_admin_name = _("Operation - 001 - Search")
form_slug = "operation-001-search"
@@ -587,7 +587,7 @@ class OperationSelect(DocumentItemSelect):
FieldType('record_quality_type', models.RecordQualityType),
FieldType('relation_types', models.RelationType),
FieldType('towns__areas', Area),
- ]
+ ] + GeoItemSelect.TYPES
SITE_KEYS = {"archaeological_sites": None}
def __init__(self, *args, **kwargs):
@@ -1303,7 +1303,7 @@ class OperationDeletionForm(FinalForm):
#########
-class SiteSelect(DocumentItemSelect):
+class SiteSelect(GeoItemSelect):
_model = models.ArchaeologicalSite
form_admin_name = _("Archaeological site - 001 - Search")
form_slug = "archaeological_site-001-search"
@@ -1365,7 +1365,7 @@ class SiteSelect(DocumentItemSelect):
FieldType('remains', models.RemainType),
FieldType('cultural_attributions', models.CulturalAttributionType),
FieldType('towns__areas', Area),
- ]
+ ] + GeoItemSelect.TYPES
def __init__(self, *args, **kwargs):
super(SiteSelect, self).__init__(*args, **kwargs)
@@ -1968,7 +1968,7 @@ class QAArchaeologicalSiteFormMulti(QAForm):
choices=[],
)
qa_remains = forms.ChoiceField(
- label=("Remains"),
+ label=_("Remains"),
required=False,
choices=[],
)