summaryrefslogtreecommitdiff
path: root/archaeological_context_records/forms.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-01-22 16:44:40 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-04-24 19:38:56 +0200
commit5b892b087eddf9f4132422259879584c82d1d678 (patch)
tree5b24e0c2251385e2237c5fed80d7354dceba2943 /archaeological_context_records/forms.py
parentf985a5442260b8aadc78946c606538a55ff063da (diff)
downloadIshtar-5b892b087eddf9f4132422259879584c82d1d678.tar.bz2
Ishtar-5b892b087eddf9f4132422259879584c82d1d678.zip
Manage X, Y, Z fields for context records, operations and sites
Diffstat (limited to 'archaeological_context_records/forms.py')
-rw-r--r--archaeological_context_records/forms.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/archaeological_context_records/forms.py b/archaeological_context_records/forms.py
index ae25e0abe..7566dcc71 100644
--- a/archaeological_context_records/forms.py
+++ b/archaeological_context_records/forms.py
@@ -33,7 +33,7 @@ from archaeological_context_records import models
from ishtar_common.forms import FinalForm, FormSet, \
reverse_lazy, get_form_selection, TableSelect, ManageOldType, CustomForm, \
- FieldType, CustomFormSearch, IshtarForm, HistorySelect
+ FieldType, CustomFormSearch, IshtarForm, FormHeader, HistorySelect
from ishtar_common.forms_common import get_town_field
from archaeological_operations.forms import OperationSelect, ParcelField, \
RecordRelationsForm as OpeRecordRelationsForm, RecordRelationsFormSetBase
@@ -135,6 +135,7 @@ class RecordFormSelection(CustomFormSearch):
class RecordFormGeneral(CustomForm, ManageOldType):
+ HEADERS = {}
form_label = _("General")
form_admin_name = _(u"Context record - 020 - General")
form_slug = "contextrecord-020-general"
@@ -182,6 +183,19 @@ class RecordFormGeneral(CustomForm, ManageOldType):
label=_(u"Location"), widget=forms.Textarea,
required=False, validators=[validators.MaxLengthValidator(200)])
+ HEADERS['x'] = FormHeader(_(u"Coordinates"))
+ x = forms.FloatField(label=_(u"X"), required=False)
+ estimated_error_x = forms.FloatField(label=_(u"Estimated error for X"),
+ required=False)
+ y = forms.FloatField(label=_(u"Y"), required=False)
+ estimated_error_y = forms.FloatField(label=_(u"Estimated error for Y"),
+ required=False)
+ z = forms.FloatField(label=_(u"Z"), required=False)
+ estimated_error_z = forms.FloatField(label=_(u"Estimated error for Z"),
+ required=False)
+ spatial_reference_system = forms.ChoiceField(
+ label=_(u"Spatial Reference System"), required=False, choices=[])
+
TYPES = [
FieldType('unit', models.Unit),
FieldType('excavation_technic', models.ExcavationTechnicType),