summaryrefslogtreecommitdiff
path: root/archaeological_operations/forms.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2016-09-05 20:14:01 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2016-09-05 20:14:01 +0200
commit8c33886e7f24deb1623e82e0792af9923899f7ad (patch)
tree101144fad0e35a101edac31910ccea67c88a3963 /archaeological_operations/forms.py
parent2ff9087dd0a1c93be556a1267519ce1c9accc732 (diff)
parent7f8be42cf5cea041bede638d355a8de0d0f97dbf (diff)
downloadIshtar-8c33886e7f24deb1623e82e0792af9923899f7ad.tar.bz2
Ishtar-8c33886e7f24deb1623e82e0792af9923899f7ad.zip
Merge branch 'v0.9' into wheezy
Diffstat (limited to 'archaeological_operations/forms.py')
-rw-r--r--archaeological_operations/forms.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py
index 247dcc20a..7bac80b48 100644
--- a/archaeological_operations/forms.py
+++ b/archaeological_operations/forms.py
@@ -714,6 +714,7 @@ class DashboardForm(forms.Form):
class OperationFormGeneral(ManageOldType, forms.Form):
form_label = _(u"General")
base_model = 'archaeological_site'
+ file_upload = True
associated_models = {'scientist': Person,
'in_charge': Person,
'cira_rapporteur': Person,
@@ -802,6 +803,13 @@ class OperationFormGeneral(ManageOldType, forms.Form):
required=False)
virtual_operation = forms.BooleanField(required=False,
label=_(u"Virtual operation"))
+ 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]}),
+ required=False, widget=widgets.ImageFileInput())
def __init__(self, *args, **kwargs):
super(OperationFormGeneral, self).__init__(*args, **kwargs)