summaryrefslogtreecommitdiff
path: root/archaeological_operations/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_operations/forms.py')
-rw-r--r--archaeological_operations/forms.py30
1 files changed, 29 insertions, 1 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py
index b093b383c..f964375c7 100644
--- a/archaeological_operations/forms.py
+++ b/archaeological_operations/forms.py
@@ -40,7 +40,7 @@ from bootstrap_datepicker.widgets import DateField
from ishtar_common import widgets
from ishtar_common.forms import FinalForm, FormSet, get_now, \
reverse_lazy, TableSelect, get_data_from_formset, \
- ManageOldType, IshtarForm, CustomForm, FieldType, HistorySelect
+ ManageOldType, IshtarForm, CustomForm, FieldType, FormHeader, HistorySelect
from ishtar_common.forms_common import TownFormSet, get_town_field, TownForm
from ishtar_common.models import valid_id, Person, Town, \
DocumentTemplate, Organization, get_current_profile, \
@@ -741,6 +741,7 @@ class DashboardForm(IshtarForm):
class OperationFormGeneral(CustomForm, ManageOldType):
+ HEADERS = {}
form_label = _(u"General")
form_admin_name = _(u"Operation - 010 - General")
form_slug = "operation-010-general"
@@ -856,6 +857,19 @@ class OperationFormGeneral(CustomForm, ManageOldType):
virtual_operation = forms.BooleanField(required=False,
label=_(u"Virtual operation"))
+ 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=[])
+
FILE_FIELDS = [
'report_delivery_date',
'report_processing',
@@ -1154,6 +1168,7 @@ class PeriodForm(CustomForm, ManageOldType, forms.Form):
class ArchaeologicalSiteForm(ManageOldType):
+ HEADERS = {}
reference = forms.CharField(label=_(u"Reference"), max_length=200)
name = forms.CharField(label=_(u"Name"), max_length=200, required=False)
periods = forms.MultipleChoiceField(
@@ -1162,6 +1177,19 @@ class ArchaeologicalSiteForm(ManageOldType):
remains = forms.MultipleChoiceField(
label=_("Remains"), choices=[], widget=widgets.Select2Multiple,
required=False)
+ 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('periods', models.Period, True),