diff options
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 |
commit | 05eeada23bd7065bf750e88c4c3125676e9ace92 (patch) | |
tree | cb99bb453ae23db575810471c660dda06a98bd77 /archaeological_context_records/forms.py | |
parent | 96dab3e5402589d9537df776bbcd7df816ae54f2 (diff) | |
download | Ishtar-05eeada23bd7065bf750e88c4c3125676e9ace92.tar.bz2 Ishtar-05eeada23bd7065bf750e88c4c3125676e9ace92.zip |
Allow no resizing of images (by explicit parameter in settings)
Diffstat (limited to 'archaeological_context_records/forms.py')
-rw-r--r-- | archaeological_context_records/forms.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/archaeological_context_records/forms.py b/archaeological_context_records/forms.py index e776f2ec7..61460ab3b 100644 --- a/archaeological_context_records/forms.py +++ b/archaeological_context_records/forms.py @@ -40,7 +40,8 @@ from archaeological_operations.widgets import OAWidget from ishtar_common.forms import FinalForm, FormSet, \ reverse_lazy, get_form_selection, TableSelect, ManageOldType, CustomForm,\ FieldType, IshtarForm -from ishtar_common.forms_common import get_town_field, SourceSelect +from ishtar_common.forms_common import get_town_field, SourceSelect, \ + get_image_help from archaeological_operations.forms import OperationSelect, ParcelField,\ RecordRelationsForm as OpeRecordRelationsForm, RecordRelationsFormSetBase @@ -181,11 +182,7 @@ class RecordFormGeneral(CustomForm, ManageOldType): label=_(u"Location"), widget=forms.Textarea, required=False, validators=[validators.MaxLengthValidator(200)]) 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()) TYPES = [ |