diff options
author | Étienne Loks <etienne.loks@proxience.com> | 2014-03-27 22:36:17 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@proxience.com> | 2014-03-27 22:36:17 +0100 |
commit | abfcf1fa9d97186e37536527b4b7c266a36706e0 (patch) | |
tree | fe68ebb5cff2e3407cfb72084234c0c0f2d79974 /archaeological_operations/forms.py | |
parent | 113fed25e11b74ca236b033a873461daf6b88795 (diff) | |
download | Ishtar-abfcf1fa9d97186e37536527b4b7c266a36706e0.tar.bz2 Ishtar-abfcf1fa9d97186e37536527b4b7c266a36706e0.zip |
Add operators to archaeological operations (refs #1678)
Diffstat (limited to 'archaeological_operations/forms.py')
-rw-r--r-- | archaeological_operations/forms.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index 892ca36d6..bca08230f 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -34,7 +34,7 @@ from django.utils.translation import ugettext_lazy as _, pgettext_lazy from django.utils.safestring import mark_safe from ishtar_common.models import valid_id, PersonType, Person, Town, \ - DocumentTemplate + DocumentTemplate, Organization from archaeological_files.models import File import models @@ -281,6 +281,7 @@ class OperationFormGeneral(forms.Form): associated_models = {'scientist':Person, 'in_charge':Person, 'cira_rapporteur':Person, + 'operator':Organization, 'associated_file':File, 'operation_type':models.OperationType, 'archaeological_site':models.ArchaeologicalSite} @@ -293,6 +294,11 @@ class OperationFormGeneral(forms.Form): unicode(PersonType.objects.get(txt_idx='sra_agent').pk)])]), associated_model=Person, new=True), validators=[valid_id(Person)], required=False) + operator = forms.IntegerField(label=_("Operator"), + widget=widgets.JQueryAutoComplete(reverse_lazy( + 'autocomplete-organization',), + associated_model=Organization, new=True), + validators=[valid_id(Organization)], required=False) in_charge = forms.IntegerField(label=_("In charge"), widget=widgets.JQueryAutoComplete(reverse_lazy('autocomplete-person', args=["_".join( |