summaryrefslogtreecommitdiff
path: root/archaeological_files/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_files/forms.py')
-rw-r--r--archaeological_files/forms.py18
1 files changed, 6 insertions, 12 deletions
diff --git a/archaeological_files/forms.py b/archaeological_files/forms.py
index 6c18d675c..46b755ab6 100644
--- a/archaeological_files/forms.py
+++ b/archaeological_files/forms.py
@@ -29,26 +29,18 @@ from django.conf import settings
from django.core import validators
from django.db.models import Q
from django.forms.formsets import formset_factory
-from django.utils.functional import lazy
from django.utils.safestring import mark_safe
from ishtar_common.utils import ugettext_lazy as _
from ishtar_common.models import (
- Person,
+ Area,
Organization,
+ organization_type_pks_lazy,
+ Person,
+ person_type_pk_lazy,
Town,
valid_id,
valid_ids,
- person_type_pks_lazy,
- person_type_pk_lazy,
- organization_type_pks_lazy,
- organization_type_pk_lazy,
- get_sra_agent_label,
- get_sra_agent_head_scientist_label,
- get_orga_general_contractor_label,
- get_general_contractor_label,
- get_orga_planning_service_label,
- get_responsible_planning_service_label,
)
from ishtar_common.models_common import Department
from archaeological_operations.models import ActType, AdministrativeAct, OperationType
@@ -93,6 +85,7 @@ class FileSelect(DocumentItemSelect):
numeric_reference = forms.IntegerField(label=_("Numeric reference"))
internal_reference = forms.CharField(max_length=200, label=_("Other reference"))
towns = get_town_field()
+ area = forms.ChoiceField(label=_("Area"), choices=[])
parcel = forms.CharField(label=_("Parcel"))
if settings.ISHTAR_DPTS:
towns__numero_insee__startswith = forms.ChoiceField(
@@ -162,6 +155,7 @@ class FileSelect(DocumentItemSelect):
FieldType("monitoring_justification", models.MonitoringJustificationType),
FieldType("permit_type", models.PermitType),
FieldType("file_type", models.FileType),
+ FieldType('area', Area),
]
def __init__(self, *args, **kwargs):