aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-01-27 16:44:39 +0000
committerMatthew Somerville <matthew@mysociety.org>2020-01-30 15:57:51 +0000
commit26478eb507c00d4fa0066fd75e69f3be3dcafbd0 (patch)
treee5106eecceb8601640db5cd35d1aab521dd88f4b
parent0cabb0b53615ade70e217e44804a9c2ca74867f1 (diff)
Use nicer default photo upload message.
-rw-r--r--CHANGELOG.md1
-rw-r--r--templates/web/base/js/translation_strings.html3
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js6
-rw-r--r--web/cobrands/tfl/js.js1
4 files changed, 8 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5e69a106f..8c7675f81 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -23,6 +23,7 @@
- Add XSL to RSS feeds so they look nicer in browsers.
- Add per-report OpenGraph images. #2394
- Display GPS marker on /around map. #2359
+ - Use nicer default photo upload message. #2358
- Admin improvements:
- Add new roles system, to group permissions and apply to users. #2483
- Contact form emails now include user admin links.
diff --git a/templates/web/base/js/translation_strings.html b/templates/web/base/js/translation_strings.html
index 5ccd9863e..d6e7051b5 100644
--- a/templates/web/base/js/translation_strings.html
+++ b/templates/web/base/js/translation_strings.html
@@ -74,7 +74,8 @@ fixmystreet.password_minimum_length = [% c.cobrand.password_minimum_length %];
hide_pins: '[% loc('Hide pins') | replace("'", "\\'") %]',
upload_max_files_exceeded: '[% loc ('Sorry! You’ve hit the limit of images that can be attached to one report.') | replace("'", "\\'") %]',
- upload_default_message: '[% loc ('Drag and drop photos here or <u>click to upload</u>') | replace("'", "\\'") %]',
+ upload_default_message: '[% loc('Drag photos here or <u>browse photos</u>') | replace("'", "\\'") %]',
+ upload_default_message_mobile: '[% loc('<u>Take or choose existing photo</u>') | replace("'", "\\'") %]',
upload_cancel_confirmation: '[% loc ('Are you sure you want to cancel this upload?') | replace("'", "\\'") %]',
upload_invalid_file_type: '[% loc ('Please upload an image only') | replace("'", "\\'") %]',
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index 68b12c323..ceee52160 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -684,6 +684,10 @@ $.extend(fixmystreet.set_up, {
$originalInput.hide();
$dropzone.insertAfter($originalInput);
+ var default_message = translation_strings.upload_default_message;
+ if ($("html").hasClass("mobile")) {
+ default_message = translation_strings.upload_default_message_mobile;
+ }
var photodrop = new Dropzone($dropzone[0], {
url: '/photo/upload',
paramName: 'photo',
@@ -695,7 +699,7 @@ $.extend(fixmystreet.set_up, {
resizeHeight: 2048,
resizeQuality: 0.6,
acceptedFiles: 'image/jpeg,image/pjpeg,image/gif,image/tiff,image/png',
- dictDefaultMessage: translation_strings.upload_default_message,
+ dictDefaultMessage: default_message,
dictCancelUploadConfirmation: translation_strings.upload_cancel_confirmation,
dictInvalidFileType: translation_strings.upload_invalid_file_type,
dictMaxFilesExceeded: translation_strings.upload_max_files_exceeded,
diff --git a/web/cobrands/tfl/js.js b/web/cobrands/tfl/js.js
index a217d3984..248162597 100644
--- a/web/cobrands/tfl/js.js
+++ b/web/cobrands/tfl/js.js
@@ -1,7 +1,6 @@
(function(){
translation_strings.name.validName = 'Please enter your full name, Transport for London needs this information – if you do not wish your name to be shown on the site, untick the box below';
-translation_strings.upload_default_message = 'Drag photo here to upload or <u>browse files</u>';
translation_strings.incident_date = { date: 'Enter a date in the format dd/mm/yyyy' };
translation_strings.time = 'Enter a time in the format hh:mm';