From f7bf3b773787d336319518786f396cbf0342e567 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 4 Apr 2013 12:59:26 +0200 Subject: Operation: add search by person in charge (refs #1185) --- archaeological_operations/forms.py | 8 +++++++- 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 +# Copyright (C) 2010-2013 Étienne Loks # 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 -- cgit v1.2.3