diff options
| author | Struan Donald <struan@exo.org.uk> | 2013-09-16 12:33:18 +0100 |
|---|---|---|
| committer | Struan Donald <struan@exo.org.uk> | 2013-09-16 12:33:18 +0100 |
| commit | 8e1f1769622dba30f8e156649d50e19ad44c27d4 (patch) | |
| tree | c8f10e47a78ccb5c9a4018210c587f201ba95c83 /templates | |
| parent | 247652f45c990d108765948d25cfa741bdc598f3 (diff) | |
Change photo page title if report has a photo
Also update it when adding a photo to give an indication that adding the
photo was succesful. This is to remove any confusion about whether the
photo on the page has been added.
Fixes #130
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/photo.html | 13 | ||||
| -rw-r--r-- | templates/strings.js | 1 |
2 files changed, 13 insertions, 1 deletions
diff --git a/templates/photo.html b/templates/photo.html index 0f3036d..100be7a 100644 --- a/templates/photo.html +++ b/templates/photo.html @@ -7,7 +7,18 @@ <% } %> </div> <div data-role="content"> - <h2>[% loc('Add a Photo') %] <em>[% loc('(optional)') %]</em></h2> + <% var photoClass = 'nodisplay', nophotoClass = 'nodisplay'; + if ( file != '' ) { + photoClass = ''; + } else { + nophotoClass = ''; + } %> + <h2 id="nophoto_title" class="<% print( nophotoClass ); %>"> + [% loc('Add a Photo') %] <em>[% loc('(optional)') %]</em> + </h2> + <h2 id="photo_title" class="<% print( photoClass ); %>"> + [% loc('Photo for report') %] + </h2> <div class="photo-wrapper"> <div class="photo"> <% if ( file == '' ) { %> diff --git a/templates/strings.js b/templates/strings.js index 661a01a..d5bbc54 100644 --- a/templates/strings.js +++ b/templates/strings.js @@ -42,6 +42,7 @@ invalid_email: '[% loc('Invalid email') %]', invalid_report: '[% loc('Invalid report') %]', photo_failed: '[% loc('There was a problem taking your photo.') %]', + photo_added: '[% loc('Photo added') %]', photo_loading: '[% loc('Uploading images may take some time, please be patient') %]', upload_aborted: '[% loc('There was a problem uploading your report.') %]', try_again: '[% loc('Try Again') %]', |
