From 1d049ac1cac1aa74610e298f5d074527dabdbb5c Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 6 Feb 2025 17:56:14 +0100 Subject: ✨ Town, area searches for person, organisations, archaeological files, context records, warehouses and containers (refs #6095) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ishtar_common/forms_common.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'ishtar_common/forms_common.py') 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), ] -- cgit v1.2.3