summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2022-11-08 16:41:28 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-12-12 12:23:19 +0100
commit90c4e9f593912e9c28b12b5c4582adbcd7291245 (patch)
treed404c1a2a7fbe8b64ccf6f630bd65e048c7b0c2b
parent6e5a2d7400e4eaa046d83758ef752bd41ddc2b05 (diff)
downloadIshtar-90c4e9f593912e9c28b12b5c4582adbcd7291245.tar.bz2
Ishtar-90c4e9f593912e9c28b12b5c4582adbcd7291245.zip
Remove deprecated x, y, z fields on main item forms - Find form: fix order of decoration field
-rw-r--r--CHANGES.md12
-rw-r--r--archaeological_context_records/forms.py29
-rw-r--r--archaeological_finds/forms.py34
-rw-r--r--archaeological_operations/forms.py49
-rw-r--r--archaeological_warehouse/forms.py6
-rw-r--r--ishtar_common/version.py4
6 files changed, 17 insertions, 117 deletions
diff --git a/CHANGES.md b/CHANGES.md
index dcfcb1fac..fe4ea3145 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,8 +1,18 @@
---
title: Ishtar changelog
-date: 2022-11-27
+date: 2022-11-08
---
+v4.0.26 - 2022-11-08
+--------------------
+
+### Features ###
+- remove deprecated x, y, z fields on main item forms
+
+### Bug fix ###
+- Sheet find: fix map display
+- Find form: fix order of decoration field
+
v4.0.25 - 2022-11-07
--------------------
diff --git a/archaeological_context_records/forms.py b/archaeological_context_records/forms.py
index 27900ef80..545bcb3c4 100644
--- a/archaeological_context_records/forms.py
+++ b/archaeological_context_records/forms.py
@@ -346,23 +346,6 @@ class RecordFormGeneral(CustomForm, ManageOldType):
validators=[validators.MaxLengthValidator(200)],
)
- HEADERS["x"] = FormHeader(_("Coordinates"))
- x = forms.FloatField(label=_("X"), required=False)
- estimated_error_x = forms.FloatField(
- label=_("Estimated error for X"), required=False
- )
- y = forms.FloatField(label=_("Y"), required=False)
- estimated_error_y = forms.FloatField(
- label=_("Estimated error for Y"), required=False
- )
- z = forms.FloatField(label=_("Z"), required=False)
- estimated_error_z = forms.FloatField(
- label=_("Estimated error for Z"), required=False
- )
- spatial_reference_system = forms.ChoiceField(
- label=_("Spatial Reference System"), required=False, choices=[]
- )
-
TYPES = [
FieldType("unit", models.Unit),
FieldType("excavation_technic", models.ExcavationTechnicType, is_multiple=True),
@@ -370,18 +353,6 @@ class RecordFormGeneral(CustomForm, ManageOldType):
FieldType("spatial_reference_system", SpatialReferenceSystem),
]
- PROFILE_FILTER = {
- "mapping": [
- "x",
- "y",
- "z",
- "estimated_error_x",
- "estimated_error_y",
- "estimated_error_z",
- "spatial_reference_system",
- ],
- }
-
def __init__(self, *args, **kwargs):
# TODO: simplify
operation = None
diff --git a/archaeological_finds/forms.py b/archaeological_finds/forms.py
index 5a6e066ea..6b97e19b8 100644
--- a/archaeological_finds/forms.py
+++ b/archaeological_finds/forms.py
@@ -251,8 +251,8 @@ class BasicFindForm(CustomForm, ManageOldType):
"functional_area",
"find_number",
"min_number_of_individuals",
- "inscription",
"decoration",
+ "inscription",
"manufacturing_place",
"communicabilitie",
"comment",
@@ -475,6 +475,7 @@ class FindForm(BasicFindForm):
"find_number",
"min_number_of_individuals",
"inscription",
+ "decoration",
"manufacturing_place",
"communicabilitie",
"comment",
@@ -519,22 +520,7 @@ class FindForm(BasicFindForm):
label=_("Batch/object"), choices=[], required=False
)
- HEADERS["get_first_base_find__x"] = FormHeader(_("Coordinates"))
- get_first_base_find__x = forms.FloatField(label=_("X"), required=False)
- get_first_base_find__estimated_error_x = forms.FloatField(
- label=_("Estimated error for X"), required=False
- )
- get_first_base_find__y = forms.FloatField(label=_("Y"), required=False)
- get_first_base_find__estimated_error_y = forms.FloatField(
- label=_("Estimated error for Y"), required=False
- )
- get_first_base_find__z = forms.FloatField(label=_("Z"), required=False)
- get_first_base_find__estimated_error_z = forms.FloatField(
- label=_("Estimated error for Z"), required=False
- )
- get_first_base_find__spatial_reference_system = forms.ChoiceField(
- label=_("Spatial Reference System"), required=False, choices=[]
- )
+ HEADERS["get_first_base_find__topographic_localisation"] = FormHeader(_("Topography"))
get_first_base_find__topographic_localisation = forms.CharField(
label=_("Point of topographic reference"), required=False, max_length=120
)
@@ -545,20 +531,6 @@ class FindForm(BasicFindForm):
"get_first_base_find__spatial_reference_system", SpatialReferenceSystem
),
]
- PROFILE_FILTER = {
- "mapping": [
- "get_first_base_find__x",
- "get_first_base_find__y",
- "get_first_base_find__z",
- "get_first_base_find__estimated_error_x",
- "get_first_base_find__estimated_error_y",
- "get_first_base_find__estimated_error_z",
- "get_first_base_find__spatial_reference_system",
- ],
- #'warehouse': [
- # 'collection'
- # ]
- }
def clean(self):
self.cleaned_data = super(FindForm, self).clean()
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py
index b4822e496..06ee160d0 100644
--- a/archaeological_operations/forms.py
+++ b/archaeological_operations/forms.py
@@ -1206,30 +1206,7 @@ class ArchaeologicalSiteForm(ManageOldType):
label=_("Cultural attributions"), choices=[],
widget=widgets.Select2Multiple,
required=False)
- HEADERS['x'] = FormHeader(_("Coordinates"))
- x = forms.FloatField(label=_("X"), required=False)
- estimated_error_x = forms.FloatField(label=_("Estimated error for X"),
- required=False)
- y = forms.FloatField(label=_("Y"), required=False)
- estimated_error_y = forms.FloatField(label=_("Estimated error for Y"),
- required=False)
- z = forms.FloatField(label=_("Z"), required=False)
- estimated_error_z = forms.FloatField(label=_("Estimated error for Z"),
- required=False)
- spatial_reference_system = forms.ChoiceField(
- label=_("Spatial Reference System"), required=False, choices=[])
-
- PROFILE_FILTER = {
- 'mapping': [
- 'x',
- 'y',
- 'z',
- 'estimated_error_x',
- 'estimated_error_y',
- 'estimated_error_z',
- 'spatial_reference_system'
- ],
- }
+
TYPES = [
FieldType('periods', models.Period, True),
FieldType('remains', models.RemainType, True),
@@ -1454,30 +1431,6 @@ class SiteForm(CustomForm, ManageOldType):
widget=forms.Textarea, required=False
)
- HEADERS['x'] = FormHeader(_("Coordinates"))
- x = forms.FloatField(label=_("X"), required=False)
- estimated_error_x = forms.FloatField(label=_("Estimated error for X"),
- required=False)
- y = forms.FloatField(label=_("Y"), required=False)
- estimated_error_y = forms.FloatField(label=_("Estimated error for Y"),
- required=False)
- z = forms.FloatField(label=_("Z"), required=False)
- estimated_error_z = forms.FloatField(label=_("Estimated error for Z"),
- required=False)
- spatial_reference_system = forms.ChoiceField(
- label=_("Spatial Reference System"), required=False, choices=[])
-
- PROFILE_FILTER = {
- 'mapping': [
- 'x',
- 'y',
- 'z',
- 'estimated_error_x',
- 'estimated_error_y',
- 'estimated_error_z',
- 'spatial_reference_system'
- ],
- }
TYPES = [
FieldType('period', models.Period, True),
FieldType('remain', models.RemainType, True),
diff --git a/archaeological_warehouse/forms.py b/archaeological_warehouse/forms.py
index e942878a7..828d651f1 100644
--- a/archaeological_warehouse/forms.py
+++ b/archaeological_warehouse/forms.py
@@ -246,12 +246,6 @@ class WarehouseForm(CustomForm, ManageOldType, forms.Form):
mobile_phone = forms.CharField(
label=_("Mobile phone"), max_length=18, required=False
)
- HEADERS["x"] = FormHeader(_("Coordinates"))
- x = forms.FloatField(label=_("X"), required=False)
- y = forms.FloatField(label=_("Y"), required=False)
- spatial_reference_system = forms.ChoiceField(
- label=_("Spatial Reference System"), required=False, choices=[]
- )
TYPES = [
FieldType("warehouse_type", models.WarehouseType),
diff --git a/ishtar_common/version.py b/ishtar_common/version.py
index f7f9d0b79..ebc5bf7c1 100644
--- a/ishtar_common/version.py
+++ b/ishtar_common/version.py
@@ -1,5 +1,5 @@
-# 4.0.25
-VERSION = (4, 0, 25)
+# 4.0.26
+VERSION = (4, 0, 26)
def get_version():