aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-04-26 13:05:29 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-04-26 13:05:29 +0100
commit3806b6b39ace2d38c264615eb95370a303ede34c (patch)
tree4da84289e6053c1e7059d67f71a0ba1511c16637 /templates
parent56dca800a946f8cef66e9839590c5a9f37cad12f (diff)
parent41a5f14388e92fa9dbbb5dc3a72d9ad83291eeb4 (diff)
Merge branch 'collideoscope-anew'
Diffstat (limited to 'templates')
-rw-r--r--templates/web/base/around/index.html2
-rw-r--r--templates/web/base/report/new/category_extras.html3
-rw-r--r--templates/web/base/report/new/councils_text_all.html3
-rw-r--r--templates/web/base/report/new/form_report.html11
-rw-r--r--templates/web/base/report/new/form_title.html7
-rw-r--r--templates/web/base/report/update/form_state_checkbox.html17
-rw-r--r--templates/web/base/report/update/form_update.html18
-rw-r--r--templates/web/fixamingata/report/new/top_message_none.html6
8 files changed, 36 insertions, 31 deletions
diff --git a/templates/web/base/around/index.html b/templates/web/base/around/index.html
index 8f6af6225..df49bff8d 100644
--- a/templates/web/base/around/index.html
+++ b/templates/web/base/around/index.html
@@ -1,5 +1,5 @@
[% pre_container_extra = INCLUDE 'around/postcode_form.html' %]
-[% SET bodyclass = 'frontpage fullwidthpage' ~%]
+[% SET bodyclass = 'frontpage fullwidthpage aroundpage' ~%]
[% INCLUDE 'header.html', title = loc('Reporting a problem') %]
[%
diff --git a/templates/web/base/report/new/category_extras.html b/templates/web/base/report/new/category_extras.html
index e2926901c..f787b9c52 100644
--- a/templates/web/base/report/new/category_extras.html
+++ b/templates/web/base/report/new/category_extras.html
@@ -1,4 +1,5 @@
-[% DEFAULT list_of_names = bodies_to_list_names %]
+[% SET default_list = [] %][% FOR b IN bodies_to_list.values %][% default_list.push(b.name) %][% END %]
+[% DEFAULT list_of_names = default_list %]
<div id="category_meta">
[%- IF unresponsive.$category %]
diff --git a/templates/web/base/report/new/councils_text_all.html b/templates/web/base/report/new/councils_text_all.html
index 9a11eaae6..3ea641cbf 100644
--- a/templates/web/base/report/new/councils_text_all.html
+++ b/templates/web/base/report/new/councils_text_all.html
@@ -1,4 +1,5 @@
-[% DEFAULT list_of_names = bodies_to_list_names %]
+[% SET default_list = [] %][% FOR b IN bodies_to_list.values %][% default_list.push(b.name) %][% END %]
+[% DEFAULT list_of_names = default_list %]
<p>
[%
diff --git a/templates/web/base/report/new/form_report.html b/templates/web/base/report/new/form_report.html
index 3c7012348..d6efac423 100644
--- a/templates/web/base/report/new/form_report.html
+++ b/templates/web/base/report/new/form_report.html
@@ -17,13 +17,7 @@
[% END %]
</div>
- [% DEFAULT form_title = loc('Summarise the problem') %]
- <label for="form_title">[% form_title %]</label>
-[% IF field_errors.title %]
- <p class='form-error'>[% field_errors.title %]</p>
-[% END %]
- [% DEFAULT form_title_placeholder = loc('10 inch pothole on Example St, near post box') %]
- <input class="form-control" type="text" value="[% report.title | html %]" name="title" id="form_title" placeholder="[% form_title_placeholder %]" required>
+ [% INCLUDE 'report/new/form_title.html' %]
[% TRY %][% PROCESS 'report/new/after_title.html' %][% CATCH file %][% END %]
@@ -54,7 +48,8 @@
[% TRY %][% PROCESS 'report/new/after_photo.html' %][% CATCH file %][% END %]
- <label for="form_detail">[% loc('Explain what’s wrong') %]</label>
+ [% DEFAULT form_detail_label = loc('Explain what’s wrong') %]
+ <label for="form_detail">[% form_detail_label %]</label>
[% IF field_errors.detail %]
<p class='form-error'>[% field_errors.detail %]</p>
[% END %]
diff --git a/templates/web/base/report/new/form_title.html b/templates/web/base/report/new/form_title.html
new file mode 100644
index 000000000..88996fd3f
--- /dev/null
+++ b/templates/web/base/report/new/form_title.html
@@ -0,0 +1,7 @@
+[% DEFAULT form_title = loc('Summarise the problem') %]
+<label for="form_title">[% form_title %]</label>
+[% IF field_errors.title %]
+ <p class='form-error'>[% field_errors.title %]</p>
+[% END %]
+[% DEFAULT form_title_placeholder = loc('10 inch pothole on Example St, near post box') %]
+<input class="form-control" type="text" value="[% report.title | html %]" name="title" id="form_title" placeholder="[% form_title_placeholder %]" required>
diff --git a/templates/web/base/report/update/form_state_checkbox.html b/templates/web/base/report/update/form_state_checkbox.html
new file mode 100644
index 000000000..5316affb9
--- /dev/null
+++ b/templates/web/base/report/update/form_state_checkbox.html
@@ -0,0 +1,17 @@
+[% IF (problem.is_fixed OR problem.is_closed) AND ((c.user_exists AND c.user.id == problem.user_id) OR alert_to_reporter) %]
+
+ <input type="checkbox" name="reopen" id="form_reopen" value="1"[% ' checked' IF (update.mark_open || c.req.params.reopen) %]>
+ [% IF problem.is_closed %]
+ <label class="inline" for="form_reopen">[% loc('This problem is still ongoing') %]</label>
+ [% ELSE %]
+ <label class="inline" for="form_reopen">[% loc('This problem has not been fixed') %]</label>
+ [% END %]
+
+[% ELSIF !problem.is_fixed AND has_fixed_state %]
+
+ <div class="checkbox-group">
+ <input type="checkbox" name="fixed" id="form_fixed" value="1"[% ' checked' IF update.mark_fixed %]>
+ <label class="inline" for="form_fixed">[% loc('This problem has been fixed') %]</label>
+ </div>
+
+[% END %]
diff --git a/templates/web/base/report/update/form_update.html b/templates/web/base/report/update/form_update.html
index 5a1b3b602..06104c9e9 100644
--- a/templates/web/base/report/update/form_update.html
+++ b/templates/web/base/report/update/form_update.html
@@ -39,21 +39,5 @@
<label for="state">[% loc( 'State' ) %]</label>
[% INCLUDE 'report/inspect/state_groups_select.html' %]
[% ELSE %]
- [% IF (problem.is_fixed OR problem.is_closed) AND ((c.user_exists AND c.user.id == problem.user_id) OR alert_to_reporter) %]
-
- <input type="checkbox" name="reopen" id="form_reopen" value="1"[% ' checked' IF (update.mark_open || c.req.params.reopen) %]>
- [% IF problem.is_closed %]
- <label class="inline" for="form_reopen">[% loc('This problem is still ongoing') %]</label>
- [% ELSE %]
- <label class="inline" for="form_reopen">[% loc('This problem has not been fixed') %]</label>
- [% END %]
-
- [% ELSIF !problem.is_fixed AND has_fixed_state %]
-
- <div class="checkbox-group">
- <input type="checkbox" name="fixed" id="form_fixed" value="1"[% ' checked' IF update.mark_fixed %]>
- <label class="inline" for="form_fixed">[% loc('This problem has been fixed') %]</label>
- </div>
-
- [% END %]
+ [% INCLUDE report/update/form_state_checkbox.html %]
[% END %]
diff --git a/templates/web/fixamingata/report/new/top_message_none.html b/templates/web/fixamingata/report/new/top_message_none.html
index 9a9141b33..641c08f47 100644
--- a/templates/web/fixamingata/report/new/top_message_none.html
+++ b/templates/web/fixamingata/report/new/top_message_none.html
@@ -1,15 +1,15 @@
<p>
-[% IF bodies_to_list_names.size == 1 %]
+[% IF bodies_to_list.size == 1 %]
[%
tprintf(
"%s har valt att inte ta emot rapporter från FixaMinGata, utan hänvisar fel- &amp; synpunktsrapportering till <a href='%s'>kommunens egen webbplats</a>.",
- bodies_to_list_names.first, bodies_to_list_urls.first);
+ bodies_to_list.values.first.name, bodies_to_list.values.first.external_url);
%]
[% END %]
[%
loc("If you submit a problem here the problem will <strong>not</strong> be reported to the council.");
%]
-[% IF bodies_to_list_names.size != 1 %]
+[% IF bodies_to_list.size != 1 %]
[%
tprintf(
loc("You can help us by finding a contact email address for local problems for %s and emailing it to us at <a href='mailto:%s'>%s</a>."),