diff options
Diffstat (limited to 'archaeological_operations/forms.py')
| -rw-r--r-- | archaeological_operations/forms.py | 15 | 
1 files changed, 3 insertions, 12 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index 866700871..63b350f28 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -524,9 +524,8 @@ class OperationSelect(TableSelect):      start_after = DateField(label=_(u"Started after"))      end_before = DateField(label=_(u"Ended before"))      end_after = DateField(label=_(u"Ended after")) -    relation_types = forms.MultipleChoiceField( -        label=_(u"Search within relations"), choices=[], -        widget=forms.CheckboxSelectMultiple) +    relation_types = forms.ChoiceField( +        label=_(u"Search within relations"), choices=[])      comment = forms.CharField(label=_(u"Comment"), max_length=500)      abstract = forms.CharField(label=_(u"Abstract (full text search)"))      scientific_documentation_comment = forms.CharField( @@ -594,15 +593,7 @@ class OperationSelect(TableSelect):              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) - -    def get_input_ids(self): -        ids = super(OperationSelect, self).get_input_ids() -        ids.pop(ids.index('relation_types')) -        for idx, c in enumerate(self.fields['relation_types'].choices): -            ids.append('relation_types_{}'.format(idx)) -        return ids +        self.fields['relation_types'].choices = models.RelationType.get_types()  class OperationFormSelection(IshtarForm):  | 
