aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/js/strings.js1
-rw-r--r--src/js/views/photo.js4
-rw-r--r--src/templates/en/photo.html13
3 files changed, 17 insertions, 1 deletions
diff --git a/src/js/strings.js b/src/js/strings.js
index a421279..905b2c3 100644
--- a/src/js/strings.js
+++ b/src/js/strings.js
@@ -42,6 +42,7 @@
invalid_email: 'Invalid email',
invalid_report: 'Invalid report',
photo_failed: 'There was a problem taking your photo.',
+ photo_added: 'Photo added',
photo_loading: 'Uploading images may take some time, please be patient',
upload_aborted: 'There was a problem uploading your report.',
try_again: 'Try Again',
diff --git a/src/js/views/photo.js b/src/js/views/photo.js
index aa9c9ee..a6bbb47 100644
--- a/src/js/views/photo.js
+++ b/src/js/views/photo.js
@@ -60,6 +60,8 @@
var that = this;
move.done( function( file ) {
+ $('#nophoto_title').hide();
+ $('#photo_title').html(FMS.strings.photo_added).show();
$('#photo').attr('src', file.toURL()).addClass('small').removeClass('placeholder');
that.model.set('file', file.toURL());
FMS.saveCurrentDraft();
@@ -91,6 +93,8 @@
var del = FMS.files.deleteURI( this.model.get('file') );
del.done( function() {
+ $('#photo_title').hide();
+ $('#nophoto_title').show();
$('#id_del_photo_button').hide();
that.model.set('file', '');
FMS.saveCurrentDraft(true);
diff --git a/src/templates/en/photo.html b/src/templates/en/photo.html
index 460f38f..aa44e9e 100644
--- a/src/templates/en/photo.html
+++ b/src/templates/en/photo.html
@@ -7,7 +7,18 @@
<% } %>
</div>
<div data-role="content">
- <h2>Add a Photo <em>(optional)</em></h2>
+ <% var photoClass = 'nodisplay', nophotoClass = 'nodisplay';
+ if ( file != '' ) {
+ photoClass = '';
+ } else {
+ nophotoClass = '';
+ } %>
+ <h2 id="nophoto_title" class="<% print( nophotoClass ); %>">
+ Add a Photo <em>(optional)</em>
+ </h2>
+ <h2 id="photo_title" class="<% print( photoClass ); %>">
+ Photo for report
+ </h2>
<div class="photo-wrapper">
<div class="photo">
<% if ( file == '' ) { %>