aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2016-01-20 15:35:31 +0000
committerMatthew Somerville <matthew@mysociety.org>2016-01-20 15:41:36 +0000
commit47d534a2ac59335474be97fbb9fa9fc39f0464c7 (patch)
tree62aa3d9b09bc1c2e79d1bad8472661d5f5c86c98 /templates
parent9232c62b050f5b9371b3c74dfe57e87ad186b9c9 (diff)
Make sure data variable is defined before use.
e.g. if you had skipped the map there is no fixmystreet variable on the resulting page, so we need to create it and check it.
Diffstat (limited to 'templates')
-rw-r--r--templates/web/base/questionnaire/index.html1
-rw-r--r--templates/web/base/report/new/fill_in_details_form.html1
-rw-r--r--templates/web/base/report/update-form.html1
-rw-r--r--templates/web/bromley/report/display.html1
-rw-r--r--templates/web/bromley/report/new/fill_in_details_form.html1
-rw-r--r--templates/web/eastsussex/report/update-form.html1
-rw-r--r--templates/web/zurich/report/new/fill_in_details_form.html1
7 files changed, 7 insertions, 0 deletions
diff --git a/templates/web/base/questionnaire/index.html b/templates/web/base/questionnaire/index.html
index 82f0534f4..2c7761d5d 100644
--- a/templates/web/base/questionnaire/index.html
+++ b/templates/web/base/questionnaire/index.html
@@ -81,6 +81,7 @@
<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>
diff --git a/templates/web/base/report/new/fill_in_details_form.html b/templates/web/base/report/new/fill_in_details_form.html
index ae5586127..9c42f4696 100644
--- a/templates/web/base/report/new/fill_in_details_form.html
+++ b/templates/web/base/report/new/fill_in_details_form.html
@@ -60,6 +60,7 @@
<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>
diff --git a/templates/web/base/report/update-form.html b/templates/web/base/report/update-form.html
index 8c812cd08..adf1130bf 100644
--- a/templates/web/base/report/update-form.html
+++ b/templates/web/base/report/update-form.html
@@ -27,6 +27,7 @@
<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>
diff --git a/templates/web/bromley/report/display.html b/templates/web/bromley/report/display.html
index c9b0e9847..569275841 100644
--- a/templates/web/bromley/report/display.html
+++ b/templates/web/bromley/report/display.html
@@ -71,6 +71,7 @@
<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>
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 09e695278..2f853b506 100644
--- a/templates/web/bromley/report/new/fill_in_details_form.html
+++ b/templates/web/bromley/report/new/fill_in_details_form.html
@@ -59,6 +59,7 @@
<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>
diff --git a/templates/web/eastsussex/report/update-form.html b/templates/web/eastsussex/report/update-form.html
index 55d79a930..8c15db904 100644
--- a/templates/web/eastsussex/report/update-form.html
+++ b/templates/web/eastsussex/report/update-form.html
@@ -71,6 +71,7 @@
<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>
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 7a487f902..1e036c087 100644
--- a/templates/web/zurich/report/new/fill_in_details_form.html
+++ b/templates/web/zurich/report/new/fill_in_details_form.html
@@ -53,6 +53,7 @@
<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>