diff options
Diffstat (limited to 'ishtar/furnitures/forms.py')
| -rw-r--r-- | ishtar/furnitures/forms.py | 9 | 
1 files changed, 6 insertions, 3 deletions
diff --git a/ishtar/furnitures/forms.py b/ishtar/furnitures/forms.py index 367e97cb1..7f9347197 100644 --- a/ishtar/furnitures/forms.py +++ b/ishtar/furnitures/forms.py @@ -68,7 +68,9 @@ class FileWizard(Wizard):  class FileForm1(forms.Form):      in_charge = forms.IntegerField(label=_("Person in charge"), -              widget=widgets.JQueryAutoComplete(reverse_lazy('autocomplete-person'))) +         widget=widgets.JQueryAutoComplete(reverse_lazy('autocomplete-person'), +                                           associated_model=models.Person), +         validators=[models.Person.valid_id])      year = forms.IntegerField(label=_("Year"),                                initial=lambda:datetime.datetime.now().year)      internal_reference = forms.CharField(label=_(u"Internal reference"), @@ -76,8 +78,9 @@ class FileForm1(forms.Form):      creation_date = forms.DateField(label=_(u"Creation date"),                                       initial=datetime.datetime.now)      file_type = forms.ChoiceField(label=_("File type"), -                    choices=models.FileType.objects.filter(available=True)) -    comment = forms.CharField(label=_(u"Comment"), widget=forms.Textarea) +                                  choices=models.FileType.get_types()) +    comment = forms.CharField(label=_(u"Comment"), widget=forms.Textarea, +                              required=False)  class FileForm2(forms.Form):  | 
