diff options
Diffstat (limited to 'archaeological_operations/forms.py')
| -rw-r--r-- | archaeological_operations/forms.py | 7 | 
1 files changed, 5 insertions, 2 deletions
| diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index 61be371d1..47fe746f5 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -997,8 +997,10 @@ OperationFormModifGeneral.associated_models = \  OperationFormModifGeneral.associated_models['associated_file'] = File -class CollaboratorForm(forms.Form): +class CollaboratorForm(CustomForm, forms.Form):      form_label = _(u"Collaborators") +    form_admin_name = _(u"Operation - Collaborators") +    form_slug = "operation-collaborators"      base_models = ['collaborator']      associated_models = {'collaborator': Person, }      collaborator = widgets.Select2MultipleField( @@ -1006,7 +1008,8 @@ class CollaboratorForm(forms.Form):      def __init__(self, *args, **kwargs):          super(CollaboratorForm, self).__init__(*args, **kwargs) -        self.fields['collaborator'].widget.attrs['full-width'] = True +        if 'collaborator' in self.fields: +            self.fields['collaborator'].widget.attrs['full-width'] = True  class OperationFormPreventive(forms.Form): | 
