diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-09-27 11:09:04 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-09-27 11:09:31 +0200 |
commit | ccac2c5da06d2cf6cc0c7c9aee56cbb4cda9a319 (patch) | |
tree | f83404ae38319af6981b79b068957074ceed5644 /ishtar_common/forms_common.py | |
parent | be5cb3e7679732fc4d93583c18af3a1df87e52d9 (diff) | |
download | Ishtar-ccac2c5da06d2cf6cc0c7c9aee56cbb4cda9a319.tar.bz2 Ishtar-ccac2c5da06d2cf6cc0c7c9aee56cbb4cda9a319.zip |
Organization: add columns to table - add town search criteria (refs #5447)
Diffstat (limited to 'ishtar_common/forms_common.py')
-rw-r--r-- | ishtar_common/forms_common.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ishtar_common/forms_common.py b/ishtar_common/forms_common.py index 7f8394768..6f0d01427 100644 --- a/ishtar_common/forms_common.py +++ b/ishtar_common/forms_common.py @@ -112,7 +112,9 @@ def get_advanced_town_field(label=_("Town"), required=True): ) -def get_person_field(label=_("Person"), required=True, person_types=[]): +def get_person_field(label=_("Person"), required=True, person_types=None): + if not person_types: + person_types = [] # !FIXME hard_link, reverse_lazy doen't seem to work with formsets widget = None url = "/" + settings.URL_PATH + "autocomplete-person" @@ -467,6 +469,7 @@ class OrganizationSelect(CustomForm, TableSelect): ) name = forms.CharField(label=_("Name"), max_length=300) organization_type = forms.ChoiceField(label=_("Type"), choices=[]) + precise_town = get_town_field() def __init__(self, *args, **kwargs): super(OrganizationSelect, self).__init__(*args, **kwargs) |