From 057f6d81d5dee5ba8eba2fd959553cf57657990d Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 4 Sep 2013 20:05:24 +0200 Subject: Improve Image field management (refs #1365) * add a custom widget to allow display via prettyPhoto on forms * disable resizing when the image is deleted * fix "has image" search request to manage empty and null field for images * fix deletion of files by the wizard * fix initialization of instancied form for files and images --- archaeological_finds/forms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'archaeological_finds') diff --git a/archaeological_finds/forms.py b/archaeological_finds/forms.py index b72210946..26d180b04 100644 --- a/archaeological_finds/forms.py +++ b/archaeological_finds/forms.py @@ -45,6 +45,7 @@ from ishtar_common.forms_common import get_town_field, \ SourceForm, SourceSelect, SourceDeletionForm, AuthorFormset from archaeological_context_records.forms import RecordFormSelection + class FindForm(forms.Form): file_upload = True form_label = _("Find") @@ -65,7 +66,7 @@ class FindForm(forms.Form): u"(ratio is preserved).

") % { 'width':settings.IMAGE_MAX_SIZE[0], 'height':settings.IMAGE_MAX_SIZE[1]}), - required=False) + required=False, widget=widgets.ImageFileInput()) def __init__(self, *args, **kwargs): super(FindForm, self).__init__(*args, **kwargs) -- cgit v1.2.3