diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-09-04 20:05:24 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-09-04 20:05:24 +0200 |
commit | 1f16014274a2ad16fcd635fc9b506ef429a33677 (patch) | |
tree | d7e4c7b4121f09210b398aa4d6bc3830e6e1858e /archaeological_finds | |
parent | 4aa9cda8b8bd1c9f51e467541a97d30669130243 (diff) | |
download | Ishtar-1f16014274a2ad16fcd635fc9b506ef429a33677.tar.bz2 Ishtar-1f16014274a2ad16fcd635fc9b506ef429a33677.zip |
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
Diffstat (limited to 'archaeological_finds')
-rw-r--r-- | archaeological_finds/forms.py | 3 |
1 files changed, 2 insertions, 1 deletions
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).</p>") % { '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) |