diff options
author | Cefin <kevon@tuta.io> | 2021-10-06 12:51:42 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-10-25 12:06:03 +0200 |
commit | f15dcb6dcd52badcb870bb66f5496845ce5c2e28 (patch) | |
tree | 650f75599c0458a920be85be4b76ed9b37c0f26f /archaeological_warehouse/forms.py | |
parent | 4c319f30de531de4203051a6d3f5c720bfcae130 (diff) | |
download | Ishtar-f15dcb6dcd52badcb870bb66f5496845ce5c2e28.tar.bz2 Ishtar-f15dcb6dcd52badcb870bb66f5496845ce5c2e28.zip |
adding person in charge field for search
Diffstat (limited to 'archaeological_warehouse/forms.py')
-rw-r--r-- | archaeological_warehouse/forms.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/archaeological_warehouse/forms.py b/archaeological_warehouse/forms.py index 6638140d6..a5b8bb50c 100644 --- a/archaeological_warehouse/forms.py +++ b/archaeological_warehouse/forms.py @@ -143,6 +143,13 @@ class WarehouseSelect(CustomForm, TableSelect): name = forms.CharField(label=_("Name")) warehouse_type = forms.ChoiceField(label=_("Warehouse type"), choices=[]) town = get_town_field(label=_("Town")) + person_in_charge = forms.IntegerField( + label=_("Person in charge"), + widget=widgets.JQueryAutoComplete( + reverse_lazy("autocomplete-person"), associated_model=Person + ), + validators=[valid_id(Person)], + ) def __init__(self, *args, **kwargs): super(WarehouseSelect, self).__init__(*args, **kwargs) |