diff options
Diffstat (limited to 'archaeological_operations/forms.py')
| -rw-r--r-- | archaeological_operations/forms.py | 10 | 
1 files changed, 8 insertions, 2 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index 294e3163c..d696f44dc 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -418,6 +418,9 @@ class OperationSelect(TableSelect):      if settings.COUNTRY == 'fr':          code_patriarche = forms.IntegerField(label="Code PATRIARCHE")      towns = get_town_field() +    if settings.ISHTAR_DPTS: +        towns__numero_insee__startswith = forms.ChoiceField( +            label="Department", choices=[])      operation_type = forms.ChoiceField(label=_(u"Operation type"),                                         choices=[])      scientist = forms.IntegerField( @@ -484,6 +487,10 @@ class OperationSelect(TableSelect):          self.fields['periods'].help_text = models.Period.get_help()          self.fields['record_quality'].choices = \              [('', '--')] + list(models.QUALITY) +        if settings.ISHTAR_DPTS: +            k = 'towns__numero_insee__startswith' +            self.fields[k].choices = [ +                ('', '--')] + list(settings.ISHTAR_DPTS)          self.fields['relation_types'].choices = models.RelationType.get_types(              empty_first=False) @@ -1076,8 +1083,7 @@ class AdministrativeActOpeSelect(TableSelect):          if settings.ISHTAR_DPTS:              k = 'operation__towns__numero_insee__startswith'              self.fields[k].choices = [ -                ('', '--')] + [(str(dpt), str(dpt)) -                               for dpt in settings.ISHTAR_DPTS] +                ('', '--')] + list(settings.ISHTAR_DPTS)  class AdministrativeActOpeFormSelection(forms.Form):  | 
