summaryrefslogtreecommitdiff
path: root/ishtar_common/forms_common.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2025-02-06 17:56:14 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2025-02-19 14:45:57 +0100
commit1d049ac1cac1aa74610e298f5d074527dabdbb5c (patch)
tree445d97245a46afef7ac79b7782318ed50aa46976 /ishtar_common/forms_common.py
parent32b4271ea9e7540a7613429563fffde20e57690d (diff)
downloadIshtar-1d049ac1cac1aa74610e298f5d074527dabdbb5c.tar.bz2
Ishtar-1d049ac1cac1aa74610e298f5d074527dabdbb5c.zip
✨ Town, area searches for person, organisations, archaeological files, context records, warehouses and containers (refs #6095)
Diffstat (limited to 'ishtar_common/forms_common.py')
-rw-r--r--ishtar_common/forms_common.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/ishtar_common/forms_common.py b/ishtar_common/forms_common.py
index 187941bb6..1858c7246 100644
--- a/ishtar_common/forms_common.py
+++ b/ishtar_common/forms_common.py
@@ -836,10 +836,14 @@ class OrganizationSelect(CustomForm, TableSelect):
name = forms.CharField(label=_("Name"), max_length=300)
organization_type = forms.ChoiceField(label=_("Type"), choices=[])
precise_town_id = get_town_field()
+ area = forms.ChoiceField(label=_("Area"), choices=[])
museum_museofile_id = forms.CharField(label=_("Museofile ID"), required=False)
+ TYPES = [
+ FieldType('area', models.Area),
+ ]
def __init__(self, *args, **kwargs):
- super(OrganizationSelect, self).__init__(*args, **kwargs)
+ super().__init__(*args, **kwargs)
self.fields["organization_type"].choices = models.OrganizationType.get_types()
@@ -1038,9 +1042,12 @@ class PersonSelect(CustomForm, TableSelect):
),
validators=[models.valid_id(models.Organization)],
)
+ precise_town_id = get_town_field(required=False)
+ area = forms.ChoiceField(label=_("Area"), choices=[])
TYPES = [
FieldType("person_types", models.PersonType),
FieldType("title", models.TitleType),
+ FieldType('area', models.Area),
]