diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-04-04 12:59:26 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-04-04 12:59:49 +0200 |
commit | f7bf3b773787d336319518786f396cbf0342e567 (patch) | |
tree | 1c40ba8c11f81f98af26bc81b50b6df8399d340f | |
parent | c693630090f670ca33981dcdf0b135fdd7432972 (diff) | |
download | Ishtar-f7bf3b773787d336319518786f396cbf0342e567.tar.bz2 Ishtar-f7bf3b773787d336319518786f396cbf0342e567.zip |
Operation: add search by person in charge (refs #1185)
-rw-r--r-- | archaeological_operations/forms.py | 8 | ||||
-rw-r--r-- | archaeological_operations/views.py | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index f2a81a85d..5501857ba 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2010-2012 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2010-2013 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -103,6 +103,12 @@ class OperationSelect(forms.Form): towns = get_town_field() operation_type = forms.ChoiceField(label=_(u"Operation type"), choices=[]) + in_charge = forms.IntegerField( + widget=widgets.JQueryAutoComplete(reverse_lazy('autocomplete-person', + args=["_".join( + [unicode(PersonType.objects.get(txt_idx='head_scientist').pk), + unicode(PersonType.objects.get(txt_idx='sra_agent').pk)])]), + associated_model=Person, new=True), label=_(u"In charge")) remains = forms.ChoiceField(label=_(u"Remains"), choices=models.RemainType.get_types()) year = forms.IntegerField(label=_("Year")) diff --git a/archaeological_operations/views.py b/archaeological_operations/views.py index e12b8edd6..4650e4764 100644 --- a/archaeological_operations/views.py +++ b/archaeological_operations/views.py @@ -118,7 +118,6 @@ get_administrativeactop = get_item(models.AdministrativeAct, 'operation__towns':'operation__towns__pk', 'act_type__intented_to':'act_type__intented_to'}) - def dashboard_operation(request, *args, **kwargs): """ Operation dashboard |