summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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
commit3f6567507978281761005dc12951511e0c81a9ae (patch)
tree1c40ba8c11f81f98af26bc81b50b6df8399d340f
parentbf6d5a3a862617fcc68ce20f41535bac612104f7 (diff)
downloadIshtar-3f6567507978281761005dc12951511e0c81a9ae.tar.bz2
Ishtar-3f6567507978281761005dc12951511e0c81a9ae.zip
Operation: add search by person in charge (refs #1185)
-rw-r--r--archaeological_operations/forms.py8
-rw-r--r--archaeological_operations/views.py1
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