From: Jan Szejko Date: Wed, 1 Mar 2017 11:16:22 +0000 (+0100) Subject: allow svg, but not tiff X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/2a6f98f4c11892c606ac1e77771f8ebf67039cb2 allow svg, but not tiff --- diff --git a/apps/catalogue/forms.py b/apps/catalogue/forms.py index cbb1ad9d..5a8e4b2f 100644 --- a/apps/catalogue/forms.py +++ b/apps/catalogue/forms.py @@ -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 diff --git a/apps/wiki/forms.py b/apps/wiki/forms.py index 6db1903d..ac219b17 100644 --- a/apps/wiki/forms.py +++ b/apps/wiki/forms.py @@ -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 diff --git a/apps/wiki/locale/pl/LC_MESSAGES/djangojs.mo b/apps/wiki/locale/pl/LC_MESSAGES/djangojs.mo index d68493a8..9516c1fa 100644 Binary files a/apps/wiki/locale/pl/LC_MESSAGES/djangojs.mo and b/apps/wiki/locale/pl/LC_MESSAGES/djangojs.mo differ diff --git a/apps/wiki/locale/pl/LC_MESSAGES/djangojs.po b/apps/wiki/locale/pl/LC_MESSAGES/djangojs.po index 6143b51c..d175792e 100644 --- a/apps/wiki/locale/pl/LC_MESSAGES/djangojs.po +++ b/apps/wiki/locale/pl/LC_MESSAGES/djangojs.po @@ -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 diff --git a/apps/wiki/static/wiki/editor b/apps/wiki/static/wiki/editor index e32eab0d..667a0106 160000 --- a/apps/wiki/static/wiki/editor +++ b/apps/wiki/static/wiki/editor @@ -1 +1 @@ -Subproject commit e32eab0deee844e3df8dfdfd784da674260c2351 +Subproject commit 667a0106a4beba6eb4dfde0398b2223adf0ebac9 diff --git a/lib/librarian b/lib/librarian index 30a74b43..8287173d 160000 --- a/lib/librarian +++ b/lib/librarian @@ -1 +1 @@ -Subproject commit 30a74b436b8a81adbdbeea5a9b2f99dfc2e4949f +Subproject commit 8287173da88bfaa3a8b90a39768198dceba2e25f