From c0ec323e72e070f4c1ecd26c1728e0bbef92524a Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 15 May 2014 17:24:25 +0200 Subject: Created by search (refs #1590) --- archaeological_operations/forms.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'archaeological_operations') diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index 11055ccfb..4473d7858 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -228,6 +228,13 @@ class OperationSelect(TableSelect): widget=widgets.JQueryDate) parcel = ParcelField(label=_("Parcel (section/number)")) end_date = forms.NullBooleanField(label=_(u"Is open?")) + history_creator = forms.IntegerField( + label=_(u"Created by"), + widget=widgets.JQueryAutoComplete( + reverse_lazy('autocomplete-person', + args=['0', 'user']), + associated_model=Person), + validators=[valid_id(Person)]) def __init__(self, *args, **kwargs): super(OperationSelect, self).__init__(*args, **kwargs) @@ -648,6 +655,13 @@ class AdministrativeActOpeSelect(TableSelect): max_length=15) act_type = forms.ChoiceField(label=_("Act type"), choices=[]) operation__towns = get_town_field() + history_creator = forms.IntegerField( + label=_(u"Created by"), + widget=widgets.JQueryAutoComplete( + reverse_lazy('autocomplete-person', + args=['0', 'user']), + associated_model=Person), + validators=[valid_id(Person)]) def __init__(self, *args, **kwargs): super(AdministrativeActOpeSelect, self).__init__(*args, **kwargs) -- cgit v1.2.3