summaryrefslogtreecommitdiff
path: root/archaeological_warehouse/forms.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-02-27 15:47:32 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-02-27 15:47:32 +0100
commitd7e1978d8f5358652080f789303f59c3ddf07047 (patch)
treecb99bb453ae23db575810471c660dda06a98bd77 /archaeological_warehouse/forms.py
parente8880be9e7bd2183766178148083c85c3ee9d9a4 (diff)
downloadIshtar-d7e1978d8f5358652080f789303f59c3ddf07047.tar.bz2
Ishtar-d7e1978d8f5358652080f789303f59c3ddf07047.zip
Allow no resizing of images (by explicit parameter in settings)
Diffstat (limited to 'archaeological_warehouse/forms.py')
-rw-r--r--archaeological_warehouse/forms.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/archaeological_warehouse/forms.py b/archaeological_warehouse/forms.py
index 5ac907deb..fc8ba056e 100644
--- a/archaeological_warehouse/forms.py
+++ b/archaeological_warehouse/forms.py
@@ -33,6 +33,7 @@ from bootstrap_datepicker.widgets import DatePicker
from ishtar_common.forms import name_validator, reverse_lazy, \
get_form_selection, TableSelect, ManageOldType, FinalForm, FormSet, \
CustomForm, FieldType
+from ishtar_common.forms_common import get_image_help
from archaeological_finds.forms import FindMultipleFormSelection, \
SelectFindBasketForm
@@ -188,11 +189,7 @@ class ContainerForm(CustomForm, ManageOldType, forms.Form):
associated_model=models.Warehouse, new=True),
validators=[valid_id(models.Warehouse)])
image = forms.ImageField(
- label=_(u"Image"), help_text=mark_safe(
- _(u"<p>Heavy images are resized to: %(width)dx%(height)d "
- u"(ratio is preserved).</p>") % {
- 'width': settings.IMAGE_MAX_SIZE[0],
- 'height': settings.IMAGE_MAX_SIZE[1]}),
+ label=_(u"Image"), help_text=mark_safe(get_image_help()),
max_length=255, required=False, widget=widgets.ImageFileInput())
comment = forms.CharField(label=_(u"Comment"),
widget=forms.Textarea, required=False)