summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archaeological_operations/forms.py3
-rw-r--r--archaeological_operations/models.py4
2 files changed, 7 insertions, 0 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py
index 8da0cca85..b52496f81 100644
--- a/archaeological_operations/forms.py
+++ b/archaeological_operations/forms.py
@@ -1116,6 +1116,7 @@ class ArchaeologicalSiteForm(ManageOldType):
HEADERS = {}
reference = forms.CharField(label=_("Reference"), max_length=200)
name = forms.CharField(label=_("Name"), max_length=200, required=False)
+ other_names = forms.CharField(label=_("Other names"), required=False)
other_reference = forms.CharField(label=_("Other reference"),
required=False)
periods = forms.MultipleChoiceField(
@@ -1214,6 +1215,7 @@ class SiteSelect(GeoItemSelect, DatingSelect):
reference = forms.CharField(label=_("Reference"), max_length=200,
required=False)
name = forms.CharField(label=_("Name"), max_length=200, required=False)
+ other_names = forms.CharField(label=_("Other names"), required=False)
other_reference = forms.CharField(label=_("Other reference"),
max_length=200, required=False)
types = widgets.Select2SimpleField(label=_("Types"), required=False,
@@ -1398,6 +1400,7 @@ class SiteForm(CustomForm, ManageOldType):
other_reference = forms.CharField(label=_("Other reference"),
required=False)
name = forms.CharField(label=_("Name"), max_length=200, required=False)
+ other_names = forms.CharField(label=_("Other names"), required=False)
heritage_interest = forms.MultipleChoiceField(
label=_("Heritage interest"), choices=[], widget=widgets.Select2Multiple,
required=False)
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index e94b97cf8..e63299285 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -447,6 +447,7 @@ class ArchaeologicalSite(
SearchVectorConfig("locality_cadastral", "local"),
SearchVectorConfig("locality_ngi", "local"),
SearchVectorConfig("name", "raw"),
+ SearchVectorConfig("other_names", "raw"),
SearchVectorConfig("oceanographic_service_localisation"),
SearchVectorConfig("reference", "raw"),
SearchVectorConfig("other_reference", "raw"),
@@ -506,6 +507,9 @@ class ArchaeologicalSite(
"name": SearchAltName(
pgettext_lazy("key for text search", "name"), "name__iexact"
),
+ "other_names": SearchAltName(
+ pgettext_lazy("key for text search", "other-names"), "other_names__iexact"
+ ),
"other_reference": SearchAltName(
pgettext_lazy("key for text search", "other-reference"),
"other_reference__iexact",