diff options
author | Matthew Somerville <matthew@mysociety.org> | 2016-02-10 10:08:33 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2016-02-10 10:08:33 +0000 |
commit | f39f0f4f02a035cb208c4ce208cf4b0f01e48e52 (patch) | |
tree | e8486f21fc2e75b91cf79861eb57cbf56a7d9773 /templates | |
parent | ce25130c2a9789ad832848db1098f36065045673 (diff) |
Show remembered uploaded photos when Back used.
The uploaded_files solution in cbdfcad6, to show already uploaded files
stored in upload_fileid, worked if you submitted the form to the server
and had it returned, but did not show remembered photos if you used the
browser's Back button to return to the form from another page.
Instead, always read the data from upload_fileid, which works whichever
way you have come to the page. Fixes #1332.
Diffstat (limited to 'templates')
7 files changed, 0 insertions, 28 deletions
diff --git a/templates/web/base/questionnaire/index.html b/templates/web/base/questionnaire/index.html index c8b6907a1..5a5efee30 100644 --- a/templates/web/base/questionnaire/index.html +++ b/templates/web/base/questionnaire/index.html @@ -80,10 +80,6 @@ <div id="form_photos"> [% IF upload_fileid %] - <script> - var fixmystreet = fixmystreet || {}; - fixmystreet.uploaded_files = "[% upload_fileid %]".split(','); - </script> <p>[% loc('You have already attached photos to this update. Note that you can attach a maximum of 3 to this update (if you try to upload more, the oldest will be removed).') %]</p> [% FOREACH id IN upload_fileid.split(',') %] <img align="right" src="/photo/[% id %].temp.jpeg" alt=""> diff --git a/templates/web/base/report/new/form_report.html b/templates/web/base/report/new/form_report.html index a236b6a1f..d76d69ec0 100644 --- a/templates/web/base/report/new/form_report.html +++ b/templates/web/base/report/new/form_report.html @@ -29,10 +29,6 @@ <div id="form_photos"> [% IF upload_fileid %] - <script> - var fixmystreet = fixmystreet || {}; - fixmystreet.uploaded_files = "[% upload_fileid %]".split(','); - </script> <p>[% loc('You have already attached photos to this report. Note that you can attach a maximum of 3 to this report (if you try to upload more, the oldest will be removed).') %]</p> [% FOREACH id IN upload_fileid.split(',') %] <img align="right" src="/photo/[% id %].temp.jpeg" alt=""> diff --git a/templates/web/base/report/update/form_update.html b/templates/web/base/report/update/form_update.html index 3a46694cf..40260886c 100644 --- a/templates/web/base/report/update/form_update.html +++ b/templates/web/base/report/update/form_update.html @@ -11,10 +11,6 @@ <div id="form_photos"> [% IF upload_fileid %] - <script> - var fixmystreet = fixmystreet || {}; - fixmystreet.uploaded_files = "[% upload_fileid %]".split(','); - </script> <p>[% loc('You have already attached photos to this update. Note that you can attach a maximum of 3 to this update (if you try to upload more, the oldest will be removed).') %]</p> [% FOREACH id IN upload_fileid.split(',') %] <img align="right" src="/photo/[% id %].temp.jpeg" alt=""> diff --git a/templates/web/bromley/report/display.html b/templates/web/bromley/report/display.html index 569275841..88a6fbddc 100644 --- a/templates/web/bromley/report/display.html +++ b/templates/web/bromley/report/display.html @@ -70,10 +70,6 @@ <div id="form_photos"> [% IF upload_fileid %] - <script> - var fixmystreet = fixmystreet || {}; - fixmystreet.uploaded_files = "[% upload_fileid %]".split(','); - </script> <p>[% loc('You have already attached photos to this update. Note that you can attach a maximum of 3 to this update (if you try to upload more, the oldest will be removed).') %]</p> [% FOREACH id IN upload_fileid.split(',') %] <img align="right" src="/photo/[% id %].temp.jpeg" alt=""> diff --git a/templates/web/bromley/report/new/fill_in_details_form.html b/templates/web/bromley/report/new/fill_in_details_form.html index 2f853b506..c953f53c7 100644 --- a/templates/web/bromley/report/new/fill_in_details_form.html +++ b/templates/web/bromley/report/new/fill_in_details_form.html @@ -58,10 +58,6 @@ <div id="form_photos"> [% IF upload_fileid %] - <script> - var fixmystreet = fixmystreet || {}; - fixmystreet.uploaded_files = "[% upload_fileid %]".split(','); - </script> <p>[% loc('You have already attached photos to this report. Note that you can attach a maximum of 3 to this report (if you try to upload more, the oldest will be removed).') %]</p> [% FOREACH id IN upload_fileid.split(',') %] <img align="right" src="/photo/[% id %].temp.jpeg" alt=""> diff --git a/templates/web/eastsussex/report/update-form.html b/templates/web/eastsussex/report/update-form.html index 8c15db904..c2e445f22 100644 --- a/templates/web/eastsussex/report/update-form.html +++ b/templates/web/eastsussex/report/update-form.html @@ -70,10 +70,6 @@ <div id="form_photos"> [% IF upload_fileid %] - <script> - var fixmystreet = fixmystreet || {}; - fixmystreet.uploaded_files = "[% upload_fileid %]".split(','); - </script> <p>[% loc('You have already attached photos to this update. Note that you can attach a maximum of 3 to this update (if you try to upload more, the oldest will be removed).') %]</p> [% FOREACH id IN upload_fileid.split(',') %] <img align="right" src="/photo/[% id %].temp.jpeg" alt=""> diff --git a/templates/web/zurich/report/new/fill_in_details_form.html b/templates/web/zurich/report/new/fill_in_details_form.html index 1e036c087..d24474084 100644 --- a/templates/web/zurich/report/new/fill_in_details_form.html +++ b/templates/web/zurich/report/new/fill_in_details_form.html @@ -52,10 +52,6 @@ <div id="form_photos"> [% IF upload_fileid %] - <script> - var fixmystreet = fixmystreet || {}; - fixmystreet.uploaded_files = "[% upload_fileid %]".split(','); - </script> <p>[% loc('You have already attached photos to this report. Note that you can attach a maximum of 3 to this report (if you try to upload more, the oldest will be removed).') %]</p> [% FOREACH id IN upload_fileid.split(',') %] <img align="right" src="/photo/[% id %].temp.jpeg" alt=""> |