allow svg, but not tiff
authorJan Szejko <janek37@gmail.com>
Wed, 1 Mar 2017 11:16:22 +0000 (12:16 +0100)
committerJan Szejko <janek37@gmail.com>
Wed, 1 Mar 2017 12:54:04 +0000 (13:54 +0100)
apps/catalogue/forms.py
apps/wiki/forms.py
apps/wiki/locale/pl/LC_MESSAGES/djangojs.mo
apps/wiki/locale/pl/LC_MESSAGES/djangojs.po
apps/wiki/static/wiki/editor
lib/librarian

index cbb1ad9..5a8e4b2 100644 (file)
@@ -32,7 +32,7 @@ class DocumentCreateForm(forms.Form):
 
     def clean_cover(self):
         cover = self.cleaned_data['cover']
-        if cover and cover.name.rsplit('.', 1)[-1].lower() not in ('jpg', 'jpeg', 'png', 'gif', 'tif', 'tiff'):
+        if cover and cover.name.rsplit('.', 1)[-1].lower() not in ('jpg', 'jpeg', 'png', 'gif', 'svg'):
             raise forms.ValidationError(_('The cover should be an image file (jpg/png/gif)'))
         return file
 
index 6db1903..ac219b1 100644 (file)
@@ -78,8 +78,8 @@ class DocumentTextSaveForm(forms.Form):
         cover_url = doc.meta.get_one(DCNS('relation.coverimage.url'))
         if cover_url:
             ext = cover_url.rsplit('.', 1)[-1].lower()
-            if ext not in ('jpg', 'jpeg', 'png', 'gif', 'tif', 'tiff'):
-                raise ValidationError('Invalid cover image format, should be an image file (jpg, png, gif). '
+            if ext not in ('jpg', 'jpeg', 'png', 'gif', 'svg'):
+                raise ValidationError('Invalid cover image format, should be an image file (jpg, png, gif, svg). '
                                       'Change it in Metadata.')
         return text
 
index d68493a..9516c1f 100644 (file)
Binary files a/apps/wiki/locale/pl/LC_MESSAGES/djangojs.mo and b/apps/wiki/locale/pl/LC_MESSAGES/djangojs.mo differ
index 6143b51..d175792 100644 (file)
@@ -473,10 +473,10 @@ msgstr "Metadane dokumentu"
 
 #: static/wiki/editor/src/editor/plugins/core/metadataEditor/action.js:33
 msgid ""
-"The cover needs to be an image file: jpg, png, gif. Use another URL or clear "
+"The cover needs to be an image file: jpg, png, gif, svg. Use another URL or clear "
 "the cover field."
 msgstr ""
-"Okładka musi być plikiem graficznym: jpg, png, gif. Użyj innego adresu lub "
+"Okładka musi być plikiem graficznym: jpg, png, gif, svg. Użyj innego adresu lub "
 "wyczyść pole okładki."
 
 #: static/wiki/editor/src/editor/plugins/core/metadataEditor/view.js:28
index e32eab0..667a010 160000 (submodule)
@@ -1 +1 @@
-Subproject commit e32eab0deee844e3df8dfdfd784da674260c2351
+Subproject commit 667a0106a4beba6eb4dfde0398b2223adf0ebac9
index 30a74b4..8287173 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 30a74b436b8a81adbdbeea5a9b2f99dfc2e4949f
+Subproject commit 8287173da88bfaa3a8b90a39768198dceba2e25f