diff options
Diffstat (limited to 'archaeological_operations/forms.py')
| -rw-r--r-- | archaeological_operations/forms.py | 9 | 
1 files changed, 7 insertions, 2 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index dc9513977..11055ccfb 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -189,6 +189,8 @@ SRA_AGENT, created =PersonType.objects.get_or_create(txt_idx='sra_agent')  HEAD_SCIENTIST, created = PersonType.objects.get_or_create(                                      txt_idx='head_scientist') +OPERATOR, created  = OrganizationType.objects.get_or_create(txt_idx='operator') +  class OperationSelect(TableSelect):      year = forms.IntegerField(label=_("Year"))      operation_code = forms.IntegerField(label=_(u"Numeric reference")) @@ -209,6 +211,11 @@ class OperationSelect(TableSelect):            args=["_".join(           [unicode(PersonType.objects.get(txt_idx='sra_agent').pk)])]),          associated_model=Person), label=_(u"In charge")) +    operator = forms.IntegerField(label=_("Operator"), +        widget=widgets.JQueryAutoComplete(reverse_lazy( +                'autocomplete-organization', args=[OPERATOR.pk]), +        associated_model=Organization), +        validators=[valid_id(Organization)])      remains = forms.ChoiceField(label=_(u"Remains"), choices=[])      periods = forms.ChoiceField(label=_(u"Periods"), choices=[])      start_before = forms.DateField(label=_(u"Started before"), @@ -287,8 +294,6 @@ class OperationFormFileChoice(forms.Form):                                             associated_model=File),           validators=[valid_id(File)], required=False) -OPERATOR, created  = OrganizationType.objects.get_or_create(txt_idx='operator') -  class OperationFormGeneral(forms.Form):      form_label = _(u"General")      base_model = 'archaeological_site'  | 
