aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rwxr-xr-xtemplates/web/base/about/iphone.html52
-rw-r--r--templates/web/base/admin/report_edit.html2
-rw-r--r--templates/web/base/admin/response_templates_select.html (renamed from templates/web/zurich/admin/response_templates_select.html)2
-rw-r--r--templates/web/base/admin/template_edit.html50
-rw-r--r--templates/web/base/admin/templates.html (renamed from templates/web/zurich/admin/templates.html)4
-rw-r--r--templates/web/base/admin/templates_index.html11
-rw-r--r--templates/web/base/admin/user-form.html4
-rw-r--r--templates/web/base/admin/users.html2
-rw-r--r--templates/web/base/report/_council_sent_info.html4
-rw-r--r--templates/web/base/report/display_tools.html4
-rw-r--r--templates/web/base/report/new/extra_name.html2
-rw-r--r--templates/web/base/report/new/form_user_loggedin.html4
-rw-r--r--templates/web/base/report/new/form_user_loggedout_by_email.html4
-rw-r--r--templates/web/base/report/new/form_user_loggedout_password.html2
-rw-r--r--templates/web/base/report/update-form.html2
-rw-r--r--templates/web/base/report/update/form_name.html3
-rw-r--r--templates/web/base/report/update/form_update.html3
-rw-r--r--templates/web/base/report/update/form_user_loggedout_by_email.html2
-rw-r--r--templates/web/base/report/update/form_user_loggedout_password.html2
-rw-r--r--templates/web/bromley/report/display.html10
-rw-r--r--templates/web/bromley/report/new/fill_in_details_form.html14
-rw-r--r--templates/web/fixamingata/report/new/form_user_loggedout.html6
-rw-r--r--templates/web/fixmystreet.com/about/posters.html2
-rw-r--r--templates/web/fixmystreet.com/report/new/extra_name.html2
-rw-r--r--templates/web/oxfordshire/header.html2
-rw-r--r--templates/web/oxfordshire/report/_main_sent_info.html5
-rw-r--r--templates/web/seesomething/report/new/fill_in_details_form.html2
-rw-r--r--templates/web/zurich/footer.html5
-rw-r--r--templates/web/zurich/report/new/fill_in_details_form.html6
29 files changed, 114 insertions, 99 deletions
diff --git a/templates/web/base/about/iphone.html b/templates/web/base/about/iphone.html
deleted file mode 100755
index 8f7992713..000000000
--- a/templates/web/base/about/iphone.html
+++ /dev/null
@@ -1,52 +0,0 @@
-[% INCLUDE header.html
- title = 'FixMyStreet for iPhone screenshots'
-%]
-
-<h1>iPhone simulator simulator</h1>
-
-[%
- SET screens = [
- [ "iphone-1start.png", 'Click the image to progress through the flow of using the iPhone FixMyStreet application.
- <br>When launched, the user&rsquo;s location automatically gets fetched&hellip;' ],
- [ "iphone-2locfound.png", 'They want to take a photo.' ],
- [ "iphone-pickpicture1.png", 'The simulator doesn&rsquo;t have a camera, so we&rsquo;re taken to the photo albums. Let&rsquo;s pick Hawaii.' ],
- [ "iphone-pickpicture2.png", 'That red clouds photo looks nice.' ],
- [ "iphone-pickpicture3.png", 'After any moving or scaling we want, we select the photo.' ],
- [ "iphone-3picture.png", 'Okay, now we need to edit the summary of the report.' ],
- [ "iphone-editsummary.png", 'Enter some text.' ],
- [ "iphone-editsummary2.png", 'And done.' ],
- [ "iphone-4subject.png", 'I haven&rsquo;t entered all my details yet, so that&rsquo;s next.' ],
- [ "iphone-5details.png", 'Your details are remembered so you only have to enter them once.' ],
- [ "iphone-6emailkeyboard.png", 'The iPhone has different keyboards, this is the email one.' ],
- [ "iphone-5details.png", 'Right, we need to enter a name.' ],
- [ "iphone-editname.png", 'Slightly different keyboard to the email one.' ],
- [ "iphone-detailsdone.png", 'Okay, details entered.' ],
- [ "iphone-allready.png", 'That&rsquo;s everything, hit Report!' ],
- [ "iphone-7uploading.png", 'Uploading&hellip;' ],
- [ "iphone-8response.png", 'The simulator always thinks it&rsquo;s in the US, which FixMyStreet won&rsquo;t like very much.' ],
- [ "iphone-allready.png", 'Ah well, let&rsquo;s read the About page instead' ],
- [ "iphone-9about.png", 'Donate? :)' ],
-];
-%]
-
-<script type="text/javascript">
-document.write('<style type="text/css">.vv { display: none; }</style>');
-function show(a) {
- if (a==[% screens.size %]) b = 1;
- else b = a+1;
- document.getElementById('d' + a).style.display='none';
- document.getElementById('d' + b).style.display='block';
-}
-</script>
-
-[% FOR screen IN screens %]
-
- <div id='d[% loop.count %]'[% " class='vv'" IF NOT loop.first %]>
- <p>[% screen.1 %]</p>
- <p align='center'><a onclick='show([% loop.count %]);return false' href='#d[% loop.count + 1 %]'><img src='[% screen.0 %]' width=414 border=0 height=770></a></p>
- </div>
-
-[% END %]
-
-[% INCLUDE footer.html %]
-
diff --git a/templates/web/base/admin/report_edit.html b/templates/web/base/admin/report_edit.html
index 48a02593b..96e59d1c4 100644
--- a/templates/web/base/admin/report_edit.html
+++ b/templates/web/base/admin/report_edit.html
@@ -81,7 +81,7 @@ class="admin-offsite-link">[% problem.latitude %], [% problem.longitude %]</a>
([% problem.send_method_used %])
[% END %]
[% IF problem.state == 'confirmed' AND problem.whensent %]
- <input onclick="return confirm('[% loc('You really want to resend?') %]')" type="submit" name="resend" value="[% loc('Resend report') %]">
+ <input data-confirm="[% loc('Are you sure?') %]" type="submit" name="resend" value="[% loc('Resend report') %]">
[% ELSIF NOT problem.whensent %]
<input type="submit" name="mark_sent" value="[% loc('Mark as sent') %]">
[% END %]
diff --git a/templates/web/zurich/admin/response_templates_select.html b/templates/web/base/admin/response_templates_select.html
index 853956a0d..664d1d20a 100644
--- a/templates/web/zurich/admin/response_templates_select.html
+++ b/templates/web/base/admin/response_templates_select.html
@@ -1,6 +1,6 @@
<div class="response_templates_select">
<select id="templates_for_[% for %]" class="js-template-name" data-for="[% for %]">
- <option value="">[% loc('Choose a template') %]</option>
+ <option value="">[% loc('--Choose a template--') %]</option>
[% FOR t IN problem.response_templates %]
<option value="[% t.text | html %]"> [% t.title | html %] </option>
[% END %]
diff --git a/templates/web/base/admin/template_edit.html b/templates/web/base/admin/template_edit.html
new file mode 100644
index 000000000..54058a04c
--- /dev/null
+++ b/templates/web/base/admin/template_edit.html
@@ -0,0 +1,50 @@
+[% INCLUDE 'admin/header.html' title=tprintf(loc('Response Template for %s'), body.name) -%]
+[% rt = response_template %]
+
+[% UNLESS rt.id %]<h3>[% loc('New template') %]</h3>[% END %]
+
+<form method="post"
+ action="[% c.uri_for('templates', body.id, rt.id || 'new' ) %]"
+ enctype="application/x-www-form-urlencoded"
+ accept-charset="utf-8"
+ class="validate">
+
+ <p>
+ <strong>[% loc('Title:') %] </strong>
+ <input type="text" name="title" class="required" size="30" value="[% rt.title| html %]">
+ </p>
+ <p>
+ <strong>[% loc('Text:') %] </strong>
+ <textarea name="text" class="required">[% rt.text |html %]</textarea>
+ </p>
+ <p>
+ <label>
+ <strong>[% loc('Auto-response:') %]</strong>
+ <input type="checkbox" name="auto_response" [% 'checked' IF rt.auto_response %] />
+ </label>
+ </p>
+ <p>
+ <strong>[% loc('Categories:') %]</strong>
+ <ul>
+ [% FOR contact IN contacts %]
+ <li>
+ <label>
+ <input type="checkbox" name="contacts[[% contact.id %]]" [% 'checked' IF contact.active %]/>
+ [% contact.category %]
+ </label>
+ </li>
+ [% END %]
+ </ul>
+ </p>
+ <p>
+ <input type="hidden" name="token" value="[% csrf_token %]" >
+ <input type="submit" name="Edit templates" value="[% rt.id ? loc('Save changes') : loc('Create template') %]" >
+ </p>
+ [% IF rt.id %]
+ <p>
+ <input class="delete" type="submit" name="delete_template" value="[% loc('Delete template') %]">
+ </p>
+ [% END %]
+</form>
+
+[% INCLUDE 'admin/footer.html' %]
diff --git a/templates/web/zurich/admin/templates.html b/templates/web/base/admin/templates.html
index d3b334022..25cd181aa 100644
--- a/templates/web/zurich/admin/templates.html
+++ b/templates/web/base/admin/templates.html
@@ -1,6 +1,8 @@
[% INCLUDE 'admin/header.html' title=tprintf(loc('Response Templates for %s'), body.name) -%]
-<h2> [% tprintf(loc('Response Templates for %s'), body.name) %] </h2>
+[% IF c.cobrand.moniker == 'zurich' %]
+ <h2> [% tprintf(loc('Response Templates for %s'), body.name) %] </h2>
+[% END %]
<table>
<thead>
diff --git a/templates/web/base/admin/templates_index.html b/templates/web/base/admin/templates_index.html
new file mode 100644
index 000000000..1f45b84de
--- /dev/null
+++ b/templates/web/base/admin/templates_index.html
@@ -0,0 +1,11 @@
+[% INCLUDE 'admin/header.html' title=loc('Response Templates') -%]
+
+<ul>
+ [% FOR body IN bodies %]
+ <li>
+ <a href="/admin/templates/[% body.id %]">[% body.name %]</a>
+ </li>
+ [% END %]
+</ul>
+
+[% INCLUDE 'admin/footer.html' %]
diff --git a/templates/web/base/admin/user-form.html b/templates/web/base/admin/user-form.html
index c22480011..b05f15355 100644
--- a/templates/web/base/admin/user-form.html
+++ b/templates/web/base/admin/user-form.html
@@ -49,7 +49,7 @@
[% loc("Staff users have permission to log in to the admin.") %]
</p>
</div>
- [% loc('Staff:') %] <input type="checkbox" id="body" name="body" value="[% c.user.from_body.id %]" [% user.from_body.id == c.user.from_body.id ? ' checked' : '' %] [% 'disabled' UNLESS c.user.has_permission_to('user_assign_body', c.user.from_body.id) %]>
+ [% loc('Staff:') %] <input type="checkbox" id="body" name="body" value="[% c.user.from_body.id %]" [% user.from_body.id == c.user.from_body.id ? ' checked' : '' %] [% 'disabled' UNLESS c.user.is_superuser OR c.user.has_body_permission_to('user_assign_body') %]>
</li>
[% END %]
@@ -116,7 +116,7 @@
[% FOREACH permission IN group.value %]
<li>
<label>
- <input type="checkbox" id="perms_[% permission.key %]" name="permissions[[% permission.key %]]" [% "checked" IF user.has_permission_to(permission.key, user.from_body.id) %]>
+ <input type="checkbox" id="perms_[% permission.key %]" name="permissions[[% permission.key %]]" [% "checked" IF user.has_body_permission_to(permission.key) %]>
[% permission.value %]
</label>
</li>
diff --git a/templates/web/base/admin/users.html b/templates/web/base/admin/users.html
index 19a3de03c..dfff77ee6 100644
--- a/templates/web/base/admin/users.html
+++ b/templates/web/base/admin/users.html
@@ -25,7 +25,7 @@
<td>[% PROCESS value_or_nbsp value=user.name %]</td>
<td><a href="[% c.uri_for( 'reports', search => user.email ) %]">[% PROCESS value_or_nbsp value=user.email %]</a></td>
<td>[% PROCESS value_or_nbsp value=user.from_body.name %]
- [% IF user.from_body AND user.has_permission_to('moderate', user.from_body.id) %] * [% END %]
+ [% IF user.has_body_permission_to('moderate') %] * [% END %]
</td>
[% IF c.cobrand.moniker != 'zurich' %]
<td>[% user.flagged == 2 ? loc('(Email in abuse table)') : user.flagged ? loc('Yes') : '&nbsp;' %]</td>
diff --git a/templates/web/base/report/_council_sent_info.html b/templates/web/base/report/_council_sent_info.html
index affc73414..dca74f994 100644
--- a/templates/web/base/report/_council_sent_info.html
+++ b/templates/web/base/report/_council_sent_info.html
@@ -1,6 +1,6 @@
-[% IF problem.whensent || problem.can_display_external_id %]
+[% SET duration_clause = problem.duration_string(c) %]
+[% IF duration_clause || problem.can_display_external_id %]
<p class="council_sent_info">
- [% SET duration_clause = problem.duration_string(c) IF problem.whensent %]
[%- IF problem.can_display_external_id %]
[%- IF duration_clause %]
[%- external_ref_clause = tprintf(loc('Council ref:&nbsp;%s'), problem.external_id) %]
diff --git a/templates/web/base/report/display_tools.html b/templates/web/base/report/display_tools.html
index 590f81593..052ffb8a5 100644
--- a/templates/web/base/report/display_tools.html
+++ b/templates/web/base/report/display_tools.html
@@ -1,9 +1,9 @@
<div class="shadow-wrap">
<ul id="key-tools">
- [% IF c.user_exists AND c.cobrand.users_can_hide AND c.user.belongs_to_body( c.cobrand.council_id ) %]
+ [% IF c.user_exists AND c.cobrand.users_can_hide AND c.user.belongs_to_body( problem.bodies_str ) %]
<li><form method="post" action="/report/delete/[% problem.id %]" id="remove-from-site-form">
<input type="hidden" name="token" value="[% csrf_token %]">
- <input type="submit" id="key-tool-report-abuse" class="abuse" value="Remove from site">
+ <input type="submit" id="key-tool-report-abuse" class="abuse" data-confirm="[% loc('Are you sure?') %]" value="[% loc('Remove from site') %]">
</form></li>
[% ELSIF c.cobrand.moniker != 'zurich' %]
<li><a rel="nofollow" id="key-tool-report-abuse" class="abuse" href="[% c.uri_for( '/contact', { id => problem.id } ) %]">[% loc('Report abuse' ) %]</a></li>
diff --git a/templates/web/base/report/new/extra_name.html b/templates/web/base/report/new/extra_name.html
index dede1000c..2838645af 100644
--- a/templates/web/base/report/new/extra_name.html
+++ b/templates/web/base/report/new/extra_name.html
@@ -6,7 +6,7 @@
[% title = '' %]
[% IF fms_extra_title %][% title = fms_extra_title | upper %]
[% ELSIF c.user && c.user.title %][% title = c.user.title | upper %][% END %]
-<select class="form-focus-trigger required" id="form_fms_extra_title"
+<select class="form-focus-trigger required js-form-name" id="form_fms_extra_title"
name="fms_extra_title">
<option></option>
<option value="MR"[% ' selected' IF title == 'MR' %]>Mr</option>
diff --git a/templates/web/base/report/new/form_user_loggedin.html b/templates/web/base/report/new/form_user_loggedin.html
index 1f941a6d1..add4fdbd3 100644
--- a/templates/web/base/report/new/form_user_loggedin.html
+++ b/templates/web/base/report/new/form_user_loggedin.html
@@ -46,7 +46,7 @@
[% IF field_errors.name %]
<p class='form-error'>[% field_errors.name %]</p>
[% END %]
- <input type="text" class="validName" value="[% report.name | html %]" name="name" id="form_name">
+ <input type="text" class="validName js-form-name" value="[% report.name | html %]" name="name" id="form_name">
[%# if there is nothing in the name field then set check box as default on form %]
<div class="checkbox-group">
@@ -62,6 +62,6 @@
</div>
<div class="form-txt-submit-box">
- <input class="green-btn" type="submit" id="submit_register" name="submit_register" value="[% loc('Submit') %]">
+ <input class="green-btn js-submit_register" type="submit" name="submit_register" value="[% loc('Submit') %]">
</div>
</div>
diff --git a/templates/web/base/report/new/form_user_loggedout_by_email.html b/templates/web/base/report/new/form_user_loggedout_by_email.html
index 1ad07c540..0b2f3859e 100644
--- a/templates/web/base/report/new/form_user_loggedout_by_email.html
+++ b/templates/web/base/report/new/form_user_loggedout_by_email.html
@@ -14,7 +14,7 @@
<p class='form-error'>[% field_errors.name %]</p>
[% END %]
- <input type="text" class="form-focus-trigger validName" value="[% report.name | html %]" name="name" id="form_name" placeholder="[% loc('Your name') %]">
+ <input type="text" class="form-focus-trigger validName js-form-name" value="[% report.name | html %]" name="name" id="form_name" placeholder="[% loc('Your name') %]">
[%# if there is nothing in the name field then set check box as default on form %]
<div class="checkbox-group">
@@ -36,6 +36,6 @@
<div class="form-txt-submit-box form-focus-hidden">
<input type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]">
- <input class="green-btn" type="submit" id="submit_register" name="submit_register" value="[% loc('Submit') %]">
+ <input class="green-btn js-submit_register" type="submit" name="submit_register" value="[% loc('Submit') %]">
</div>
</div>
diff --git a/templates/web/base/report/new/form_user_loggedout_password.html b/templates/web/base/report/new/form_user_loggedout_password.html
index c9d65e43e..0f234aeba 100644
--- a/templates/web/base/report/new/form_user_loggedout_password.html
+++ b/templates/web/base/report/new/form_user_loggedout_password.html
@@ -8,7 +8,7 @@
[% END %]
<div class="form-txt-submit-box">
<input type="password" name="password_sign_in" id="password_sign_in" placeholder="[% loc('Your password') %]" value="">
- <input class="green-btn" type="submit" id="submit_sign_in" name="submit_sign_in" value="[% loc('Submit') %]">
+ <input class="green-btn js-submit_sign_in" type="submit" name="submit_sign_in" value="[% loc('Submit') %]">
</div>
<div class="checkbox-group">
diff --git a/templates/web/base/report/update-form.html b/templates/web/base/report/update-form.html
index 97e0df779..49d011c0e 100644
--- a/templates/web/base/report/update-form.html
+++ b/templates/web/base/report/update-form.html
@@ -22,7 +22,7 @@
[% END %]
[% IF c.user_exists %]
[% INCLUDE 'report/update/form_name.html' %]
- <div class="clearfix"><input class="final-submit green-btn" type="submit" id="update_post" value="[% loc('Post') %]"></div>
+ <div class="clearfix"><input class="final-submit green-btn js-submit_register" type="submit" name="submit_register" value="[% loc('Post') %]"></div>
[% ELSIF oauth_need_email %]
[% INCLUDE 'report/update/form_user_loggedout_email.html' required = 1 %]
<div id="form_sign_in">
diff --git a/templates/web/base/report/update/form_name.html b/templates/web/base/report/update/form_name.html
index e65ab1790..ef8efd296 100644
--- a/templates/web/base/report/update/form_name.html
+++ b/templates/web/base/report/update/form_name.html
@@ -25,8 +25,7 @@
<p class='form-error'>[% field_errors.name %]</p>
[% END %]
-<input type="text"
- [%- IF c.cobrand.moniker.match('fixmystreet|bromley') AND problem.bodies_str == '2482' %]class="validName" [% END -%]
+<input type="text" class="validName js-form-name"
name="name" id="form_name" value="[% update.name || c.user.name | html %]" placeholder="[% loc('Your name') %]">
<div class="checkbox-group">
diff --git a/templates/web/base/report/update/form_update.html b/templates/web/base/report/update/form_update.html
index 007bd68d8..ef87d9de0 100644
--- a/templates/web/base/report/update/form_update.html
+++ b/templates/web/base/report/update/form_update.html
@@ -25,6 +25,9 @@
[% END %]
<label for="form_update">[% loc( 'Update' ) %]</label>
+[% IF c.user && c.user.belongs_to_body( problem.bodies_str ) %]
+ [% INCLUDE 'admin/response_templates_select.html' for='form_update' %]
+[% END %]
[% IF field_errors.update %]
<div class='form-error'>[% field_errors.update %]</div>
[% END %]
diff --git a/templates/web/base/report/update/form_user_loggedout_by_email.html b/templates/web/base/report/update/form_user_loggedout_by_email.html
index 672f76ed9..aae37502b 100644
--- a/templates/web/base/report/update/form_user_loggedout_by_email.html
+++ b/templates/web/base/report/update/form_user_loggedout_by_email.html
@@ -11,7 +11,7 @@
<div class="form-txt-submit-box">
<input type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]">
- <input class="green-btn" type="submit" name="submit_register" id="submit_register" value="[% loc('Post') %]">
+ <input class="green-btn js-submit_register" type="submit" name="submit_register" value="[% loc('Post') %]">
</div>
</div>
diff --git a/templates/web/base/report/update/form_user_loggedout_password.html b/templates/web/base/report/update/form_user_loggedout_password.html
index 103df1098..593ccf3de 100644
--- a/templates/web/base/report/update/form_user_loggedout_password.html
+++ b/templates/web/base/report/update/form_user_loggedout_password.html
@@ -7,7 +7,7 @@
[% END %]
<div class="form-txt-submit-box">
<input type="password" name="password_sign_in" id="password_sign_in" value="" placeholder="[% loc('Your password') %]">
- <input class="green-btn" type="submit" name="submit_sign_in" id="submit_sign_in" value="[% loc('Post') %]">
+ <input class="green-btn js-submit_sign_in" type="submit" name="submit_sign_in" value="[% loc('Post') %]">
</div>
<div class="checkbox-group">
diff --git a/templates/web/bromley/report/display.html b/templates/web/bromley/report/display.html
index f30824385..1aa78ad13 100644
--- a/templates/web/bromley/report/display.html
+++ b/templates/web/bromley/report/display.html
@@ -100,7 +100,7 @@
[% INCLUDE name %]
- <input class="final-submit green-btn" type="submit" id="update_post" value="[% loc('Post') %]">
+ <input class="final-submit green-btn js-submit_register" type="submit" name="submit_register" value="[% loc('Post') %]">
[% ELSE %]
@@ -130,7 +130,7 @@
<div class="form-txt-submit-box">
<input type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]">
- <input class="green-btn" type="submit" name="submit_register" id="submit_register" value="[% loc('Post') %]">
+ <input class="green-btn js-submit_register" type="submit" name="submit_register" value="[% loc('Post') %]">
</div>
</div>
<div id="form_sign_in_yes" class="form-box">
@@ -142,7 +142,7 @@
[% END %]
<div class="form-txt-submit-box">
<input type="password" name="password_sign_in" id="password_sign_in" value="" placeholder="[% loc('Your password') %]">
- <input class="green-btn" type="submit" name="submit_sign_in" id="submit_sign_in" value="[% loc('Post') %]">
+ <input class="green-btn js-submit_sign_in" type="submit" name="submit_sign_in" value="[% loc('Post') %]">
</div>
<div class="checkbox-group">
@@ -174,13 +174,13 @@
[% IF field_errors.first_name %]
<p class='form-error'>[% field_errors.first_name %]</p>
[% END %]
- <input type="text" value="[% names.first || first_name | html %]" name="first_name" id="form_first_name" placeholder="[% loc('Your first name') %]">
+ <input class="js-form-name" type="text" value="[% names.first || first_name | html %]" name="first_name" id="form_first_name" placeholder="[% loc('Your first name') %]">
<label for="form_last_name">[% loc('Last Name') %]</label>
[% IF field_errors.last_name %]
<p class='form-error'>[% field_errors.last_name %]</p>
[% END %]
- <input type="text" value="[% names.last || last_name | html %]" name="last_name" id="form_last_name" placeholder="[% loc('Your last name') %]">
+ <input class="js-form-name" type="text" value="[% names.last || last_name | html %]" name="last_name" id="form_last_name" placeholder="[% loc('Your last name') %]">
<div class="checkbox-group">
<input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF update AND NOT update.anonymous %]>
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 96f23d1fb..bce8220dd 100644
--- a/templates/web/bromley/report/new/fill_in_details_form.html
+++ b/templates/web/bromley/report/new/fill_in_details_form.html
@@ -96,13 +96,13 @@
[% IF field_errors.first_name %]
<p class='form-error'>[% field_errors.first_name %]</p>
[% END %]
- <input type="text" value="[% ( first_name || names.first ) | html %]" name="first_name" id="form_first_name" placeholder="[% loc('Your first name') %]">
+ <input class="js-form-name" type="text" value="[% ( first_name || names.first ) | html %]" name="first_name" id="form_first_name" placeholder="[% loc('Your first name') %]">
<label for="form_last_name">[% loc('Last Name') %]</label>
[% IF field_errors.last_name %]
<p class='form-error'>[% field_errors.last_name %]</p>
[% END %]
- <input type="text" value="[% ( last_name || names.last ) | html %]" name="last_name" id="form_last_name" placeholder="[% loc('Your last name') %]">
+ <input class="js-form-name" type="text" value="[% ( last_name || names.last ) | html %]" name="last_name" id="form_last_name" placeholder="[% loc('Your last name') %]">
[%# if there is nothing in the name field then set check box as default on form %]
@@ -119,7 +119,7 @@
</div>
<div class="form-txt-submit-box">
- <input class="green-btn" type="submit" id="submit_register" name="submit_register" value="[% loc('Submit') %]">
+ <input class="green-btn js-submit_register" type="submit" name="submit_register" value="[% loc('Submit') %]">
</div>
</div>
[% ELSE %]
@@ -143,13 +143,13 @@
[% IF field_errors.first_name %]
<p class='form-error'>[% field_errors.first_name %]</p>
[% END %]
- <input type="text" class="form-focus-trigger" value="[% first_name | html %]" name="first_name" id="form_first_name" placeholder="[% loc('Your first name') %]">
+ <input type="text" class="form-focus-trigger js-form-name" value="[% first_name | html %]" name="first_name" id="form_first_name" placeholder="[% loc('Your first name') %]">
<label for="form_last_name">[% loc('Last Name') %]</label>
[% IF field_errors.last_name %]
<p class='form-error'>[% field_errors.last_name %]</p>
[% END %]
- <input type="text" class="form-focus-trigger" value="[% last_name | html %]" name="last_name" id="form_last_name" placeholder="[% loc('Your last name') %]">
+ <input type="text" class="form-focus-trigger js-form-name" value="[% last_name | html %]" name="last_name" id="form_last_name" placeholder="[% loc('Your last name') %]">
[%# if there is nothing in the name field then set check box as default on form %]
<div class="checkbox-group">
@@ -172,7 +172,7 @@
<div class="form-txt-submit-box form-focus-hidden">
<input type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]">
- <input class="green-btn" type="submit" id="submit_register" name="submit_register" value="[% loc('Submit') %]">
+ <input class="green-btn js-submit_register" type="submit" name="submit_register" value="[% loc('Submit') %]">
</div>
</div>
@@ -186,7 +186,7 @@
<p class='form-error'>[% field_errors.password %]</p>
[% END %]
<input type="password" name="password_sign_in" id="password_sign_in" placeholder="[% loc('Your password') %]" value="">
- <input class="green-btn" type="submit" id="submit_sign_in" name="submit_sign_in" value="[% loc('Submit') %]">
+ <input class="green-btn js-submit_sign_in" type="submit" name="submit_sign_in" value="[% loc('Submit') %]">
</div>
<div class="checkbox-group">
diff --git a/templates/web/fixamingata/report/new/form_user_loggedout.html b/templates/web/fixamingata/report/new/form_user_loggedout.html
index 36e7d95f4..c391ce75f 100644
--- a/templates/web/fixamingata/report/new/form_user_loggedout.html
+++ b/templates/web/fixamingata/report/new/form_user_loggedout.html
@@ -18,7 +18,7 @@
<p class='form-error'>[% field_errors.name %]</p>
[% END %]
- <input type="text" class="form-focus-trigger validName" value="[% report.name | html %]" name="name" id="form_name" placeholder="[% loc('Your name') %]">
+ <input type="text" class="form-focus-trigger validName js-form-name" value="[% report.name | html %]" name="name" id="form_name" placeholder="[% loc('Your name') %]">
[%# if there is nothing in the name field then set check box as default on form %]
<div class="checkbox-group">
@@ -41,7 +41,7 @@
<div class="form-txt-submit-box">
<input type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]">
- <input class="green-btn" type="submit" id="submit_register" name="submit_register" value="[% loc('Submit') %]">
+ <input class="green-btn js-submit_register" type="submit" name="submit_register" value="[% loc('Submit') %]">
</div>
</div>
<div id="form_sign_in_yes" class="form-box">
@@ -54,7 +54,7 @@
<p class='form-error'>[% field_errors.password %]</p>
[% END %]
<input type="password" name="password_sign_in" id="password_sign_in" placeholder="[% loc('Your password') %]" value="">
- <input class="green-btn" type="submit" id="submit_sign_in" name="submit_sign_in" value="[% loc('Submit') %]">
+ <input class="green-btn js-submit_sign_in" type="submit" name="submit_sign_in" value="[% loc('Submit') %]">
</div>
<div class="checkbox-group">
diff --git a/templates/web/fixmystreet.com/about/posters.html b/templates/web/fixmystreet.com/about/posters.html
index 8a53cf1e2..1a9a4400c 100644
--- a/templates/web/fixmystreet.com/about/posters.html
+++ b/templates/web/fixmystreet.com/about/posters.html
@@ -85,7 +85,7 @@
<p class="badge-preview">[% badge %]</p>
<p>Copy and paste the text below to add this badge to your site:</p>
-<textarea class="badge-code" onclick="this.select()">[% badge | html %]</textarea>
+<textarea class="badge-code js-click-select">[% badge | html %]</textarea>
<p><small>(thanks to Lincolnshire Council for the image)</small></p>
<h2 id="print">Printed Materials</h2>
diff --git a/templates/web/fixmystreet.com/report/new/extra_name.html b/templates/web/fixmystreet.com/report/new/extra_name.html
index 4663c025d..80ab1837a 100644
--- a/templates/web/fixmystreet.com/report/new/extra_name.html
+++ b/templates/web/fixmystreet.com/report/new/extra_name.html
@@ -30,7 +30,7 @@ shared with the council or displayed publicly.</em>
[% title = '' %]
[% IF fms_extra_title %][% title = fms_extra_title | upper %]
[% ELSIF c.user && c.user.title %][% title = c.user.title | upper %][% END %]
-<select class="form-focus-trigger required" id="form_fms_extra_title"
+<select class="form-focus-trigger required js-form-name" id="form_fms_extra_title"
name="fms_extra_title">
<option></option>
<option value="MR"[% ' selected' IF title == 'MR' %]>Mr</option>
diff --git a/templates/web/oxfordshire/header.html b/templates/web/oxfordshire/header.html
index e347c8677..d5884272b 100644
--- a/templates/web/oxfordshire/header.html
+++ b/templates/web/oxfordshire/header.html
@@ -42,7 +42,7 @@
<[% IF c.req.uri.path == '/my' OR ( c.req.uri.path == '/auth' AND c.req.params.r == 'my' ) %]span[% ELSE %]a href="/my"[% END
%]>[% c.user_exists ? loc("Your account") : loc("Sign in") %]</[% ( c.req.uri.path == '/my' OR ( c.req.uri.path == '/auth' AND c.req.params.r == 'my' ) ) ? 'span' : 'a' %]>
</li>
- [% IF c.user_exists AND c.user.has_permission_to('planned_reports', c.user.from_body.id) %]
+ [% IF c.user_exists AND c.user.has_body_permission_to('planned_reports') %]
<li>
<[% IF c.req.uri.path == '/my/planned' %]span[% ELSE %]a href="/my/planned"[% END
%]>[% loc('Planned reports') %]</[% c.req.uri.path == '/my/planned' ? 'span' : 'a' %]>
diff --git a/templates/web/oxfordshire/report/_main_sent_info.html b/templates/web/oxfordshire/report/_main_sent_info.html
index c955a5fae..9865153d3 100644
--- a/templates/web/oxfordshire/report/_main_sent_info.html
+++ b/templates/web/oxfordshire/report/_main_sent_info.html
@@ -1,3 +1,4 @@
-[% IF problem.whensent %]
- <p class="council_sent_info">[% problem.duration_string(c) %]</p>
+[% SET duration_clause = problem.duration_string(c) %]
+[% IF duration_clause %]
+ <p class="council_sent_info">[% duration_clause %]</p>
[% END %]
diff --git a/templates/web/seesomething/report/new/fill_in_details_form.html b/templates/web/seesomething/report/new/fill_in_details_form.html
index 728b27e41..b527e8109 100644
--- a/templates/web/seesomething/report/new/fill_in_details_form.html
+++ b/templates/web/seesomething/report/new/fill_in_details_form.html
@@ -76,7 +76,7 @@
<p class='form-error'>[% field_errors.name %]</p>
[% END %]
- <input type="text" class="form-focus-trigger validName" value="[% report.name | html %]" name="name" id="form_name" placeholder="[% loc('Your name') %]">
+ <input type="text" class="form-focus-trigger validName js-form-name" value="[% report.name | html %]" name="name" id="form_name" placeholder="[% loc('Your name') %]">
<label for="form_email">[% loc('Your email (optional)') %]</label>
[% IF field_errors.email %]
diff --git a/templates/web/zurich/footer.html b/templates/web/zurich/footer.html
index 98c24964e..d299284d6 100644
--- a/templates/web/zurich/footer.html
+++ b/templates/web/zurich/footer.html
@@ -14,8 +14,9 @@
</p>
[% END %]
<ul class="nav-menu nav-menu--main mob-only">
- <li><[% IF c.req.uri.path == '/' %]a onclick="$('html, body').animate({scrollTop:0}, 500); return false;" href="#site-header"[% ELSE %]a href="/"[% END %]
- >[% loc("Report a problem") %]</[% c.req.uri.path == '/' ? 'a' : 'a' %]></li>[%
+ <li><[% IF c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END %]
+ class="report-a-problem-btn"
+ >[% loc("Report a problem") %]</[% c.req.uri.path == '/' ? 'span' : 'a' %]></li>[%
%]<li><[% IF c.req.uri.path == '/reports' %]span[% ELSE %]a href="/reports"[% END
%]>[% loc("All reports") %]</[% c.req.uri.path == '/reports' ? 'span' : 'a' %]></li>[%
%]<li><[% IF c.req.uri.path == '/faq' %]span[% ELSE %]a href="/faq"[% END
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 21acab609..20641b7a6 100644
--- a/templates/web/zurich/report/new/fill_in_details_form.html
+++ b/templates/web/zurich/report/new/fill_in_details_form.html
@@ -60,7 +60,7 @@
[% IF field_errors.name %]
<p class='form-error'>[% field_errors.name %]</p>
[% END %]
- <input type="text" value="[% report.name | html %]" name="name" id="form_name" placeholder="[% loc('Your name') %]">
+ <input class="js-form-name" type="text" value="[% report.name | html %]" name="name" id="form_name" placeholder="[% loc('Your name') %]">
<label for="form_phone">[% loc('Phone number') %]</label>
[% IF field_errors.phone %]
@@ -69,8 +69,8 @@
<input type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone" placeholder="[% loc('Your phone number') %]" required>
<div class="form-txt-submit-box">
- [%# ID of submit_sign_in so name can be option, name of submit_register so it doesn't try and sign us in %]
- <p><input class="green-btn" type="submit" id="submit_sign_in" name="submit_register" value="[% loc('Submit') %]">
+ [%# class of submit_sign_in so name can be optional, name of submit_register so it doesn't try and sign us in %]
+ <p><input class="green-btn js-submit_sign_in" type="submit" name="submit_register" value="[% loc('Submit') %]">
</div>
</div>