aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--templates/web/base/report/form/user_loggedout.html (renamed from templates/web/base/report/new/form_user_loggedout.html)8
-rw-r--r--templates/web/base/report/form/user_loggedout_by_email.html (renamed from templates/web/base/report/new/form_user_loggedout_by_email.html)27
-rw-r--r--templates/web/base/report/form/user_loggedout_by_email_heading.html13
-rw-r--r--templates/web/base/report/form/user_loggedout_email.html (renamed from templates/web/base/report/update/form_user_loggedout_email.html)7
-rw-r--r--templates/web/base/report/form/user_loggedout_password.html (renamed from templates/web/base/report/new/form_user_loggedout_password.html)0
-rw-r--r--templates/web/base/report/form/user_name.html11
-rw-r--r--templates/web/base/report/new/form_report.html2
-rw-r--r--templates/web/base/report/new/form_user.html4
-rw-r--r--templates/web/base/report/new/form_user_loggedin.html2
-rw-r--r--templates/web/base/report/new/form_user_loggedout_email.html17
-rw-r--r--templates/web/base/report/new/form_user_name.html10
-rw-r--r--templates/web/base/report/new/login_success_form.html2
-rw-r--r--templates/web/base/report/new/oauth_email_form.html7
-rw-r--r--templates/web/base/report/update-form.html9
-rw-r--r--templates/web/base/report/update/form_user_loggedin.html3
-rw-r--r--templates/web/base/report/update/form_user_loggedout.html34
-rw-r--r--templates/web/base/report/update/form_user_loggedout_by_email.html36
-rw-r--r--templates/web/base/report/update/form_user_loggedout_password.html18
-rw-r--r--templates/web/base/report/update/form_user_name.html7
-rw-r--r--templates/web/bromley/report/form/user_loggedout.html11
-rw-r--r--templates/web/bromley/report/form/user_loggedout_by_email_heading.html1
-rw-r--r--templates/web/bromley/report/form/user_loggedout_email.html (renamed from templates/web/bromley/report/update/form_user_loggedout_email.html)4
-rw-r--r--templates/web/bromley/report/form/user_loggedout_password.html (renamed from templates/web/bromley/report/new/form_user_loggedout_password.html)0
-rw-r--r--templates/web/bromley/report/form/user_name.html (renamed from templates/web/bromley/report/update/form_user_name.html)0
-rw-r--r--templates/web/bromley/report/new/form_user.html2
-rw-r--r--templates/web/bromley/report/new/form_user_loggedout.html7
-rw-r--r--templates/web/bromley/report/new/form_user_loggedout_by_email.html40
-rw-r--r--templates/web/bromley/report/new/form_user_name.html12
-rw-r--r--templates/web/bromley/report/update-form.html9
-rw-r--r--templates/web/bromley/report/update/form_user_loggedout.html7
-rw-r--r--templates/web/bromley/report/update/form_user_loggedout_by_email.html31
-rw-r--r--templates/web/fixamingata/report/form/user_loggedout.html6
-rw-r--r--templates/web/fixamingata/report/form/user_loggedout_by_email_heading.html1
-rw-r--r--templates/web/fixamingata/report/form/user_loggedout_password.html (renamed from templates/web/bromley/report/update/form_user_loggedout_password.html)6
-rw-r--r--templates/web/fixamingata/report/new/form_user_loggedout.html70
-rw-r--r--web/cobrands/oxfordshire/assets.js3
36 files changed, 93 insertions, 334 deletions
diff --git a/templates/web/base/report/new/form_user_loggedout.html b/templates/web/base/report/form/user_loggedout.html
index d7bbbf588..b5e5d2970 100644
--- a/templates/web/base/report/new/form_user_loggedout.html
+++ b/templates/web/base/report/form/user_loggedout.html
@@ -16,15 +16,15 @@
</div>
[% END %]
<div id="js-social-email-hide">
- [% PROCESS 'report/new/form_user_loggedout_email.html' required = 0 %]
+ [% PROCESS 'report/form/user_loggedout_email.html' required=0 %]
[% ELSE %]
- [% PROCESS 'report/new/form_user_loggedout_email.html' required = 1 %]
+ [% PROCESS 'report/form/user_loggedout_email.html' required=1 %]
[% END %]
<div id="form_sign_in">
<h2>[% tprintf(loc("Do you have a %s password?", "%s is the site name"), site_name) %]</h2>
- [% PROCESS 'report/new/form_user_loggedout_password.html' %]
- [% PROCESS 'report/new/form_user_loggedout_by_email.html' %]
+ [% PROCESS 'report/form/user_loggedout_password.html' %]
+ [% PROCESS 'report/form/user_loggedout_by_email.html' %]
</div>
[% IF c.cobrand.social_auth_enabled %]
diff --git a/templates/web/base/report/new/form_user_loggedout_by_email.html b/templates/web/base/report/form/user_loggedout_by_email.html
index 135372bb7..f23a06186 100644
--- a/templates/web/base/report/new/form_user_loggedout_by_email.html
+++ b/templates/web/base/report/form/user_loggedout_by_email.html
@@ -1,15 +1,17 @@
<div id="form_sign_in_no" class="form-box">
- [% IF c.config.SMS_AUTHENTICATION %]
- <h5>[% loc('<strong>No</strong> Let me confirm my report by email/text') %]</h5>
- [% ELSE %]
- <h5>[% loc('<strong>No</strong> Let me confirm my report by email') %]</h5>
- [% END %]
+ [% PROCESS 'report/form/user_loggedout_by_email_heading.html' %]
[% INCLUDE 'report/new/extra_name.html' %]
- [% PROCESS 'user/_anonymity.html' anonymous = report.anonymous %]
- [% INCLUDE 'report/new/form_user_name.html' %]
+ [% PROCESS 'user/_anonymity.html' anonymous = object.anonymous %]
+ [% INCLUDE 'report/form/user_name.html' %]
[% INCLUDE 'report/_show_name_label.html' %]
+ [% IF type == 'update' %]
+ <div class="checkbox-group">
+ <input type="checkbox" name="add_alert" id="form_add_alert" value="1"[% ' checked' IF add_alert %]>
+ <label class="inline" for="form_add_alert">[% loc( 'Alert me to future updates' ) %]</label>
+ </div>
+ [% ELSE %]
[% UNLESS c.cobrand.call_hook('disable_phone_number_entry') %]
<div id="js-hide-if-username-phone">
<label for="form_phone">[% loc('Phone number (optional)') %]</label>
@@ -25,13 +27,24 @@
<input class="form-control" type="text" value="[% email | html %]" name="email" id="form_email">
</div>
[% END %]
+ [% END %]
+
+ [% IF c.cobrand.moniker == 'fixamingata' %]
+ <div class="general-notes">
+ <p>Vi visar inte din e-postadress eller ditt telefonnummer publikt.</p>
+ </div>
+ [% END %]
<label for="password_register">[% loc('Password (optional)') %]</label>
[% IF field_errors.password_register %]
<p class='form-error'>[% field_errors.password_register %]</p>
[% END %]
<div class="general-notes" id="password_register_hint">
+ [% IF c.cobrand.moniker == 'bromley' %]
+ <p>[% loc('Providing a password is optional, but doing so will allow you to more easily report future problems, leave updates and manage your reports.') %]</p>
+ [% ELSE %]
<p>[% loc('Providing a password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.') %]</p>
+ [% END %]
</div>
<div class="form-txt-submit-box">
diff --git a/templates/web/base/report/form/user_loggedout_by_email_heading.html b/templates/web/base/report/form/user_loggedout_by_email_heading.html
new file mode 100644
index 000000000..178d54dfe
--- /dev/null
+++ b/templates/web/base/report/form/user_loggedout_by_email_heading.html
@@ -0,0 +1,13 @@
+[% IF c.config.SMS_AUTHENTICATION %]
+ [% IF type == 'update' %]
+ <h5>[% loc('<strong>No</strong> Let me confirm my update by email/text') %]</h5>
+ [% ELSE %]
+ <h5>[% loc('<strong>No</strong> Let me confirm my report by email/text') %]</h5>
+ [% END %]
+[% ELSE %]
+ [% IF type == 'update' %]
+ <h5>[% loc('<strong>No</strong> Let me confirm my update by email') %]</h5>
+ [% ELSE %]
+ <h5>[% loc('<strong>No</strong> Let me confirm my report by email') %]</h5>
+ [% END %]
+[% END %]
diff --git a/templates/web/base/report/update/form_user_loggedout_email.html b/templates/web/base/report/form/user_loggedout_email.html
index f4228969b..d2ff4a820 100644
--- a/templates/web/base/report/update/form_user_loggedout_email.html
+++ b/templates/web/base/report/form/user_loggedout_email.html
@@ -1,17 +1,18 @@
[% IF c.config.SMS_AUTHENTICATION %]
[% SET username_label = loc('Your email or mobile') %]
[% SET username_type = 'text' %]
- [% SET username_value = update.user.username %]
+ [% SET username_value = object.user.username %]
[% ELSE %]
[% SET username_label = loc('Your email') %]
[% SET username_type = 'email' %]
- [% SET username_value = update.user.email %]
+ [% SET username_value = object.user.email %]
[% END %]
<label for="form_username">[% username_label %]</label>
[% IF field_errors.username %]
<p class='form-error'>[% field_errors.username %]</p>
[% END %]
-<input type="[% username_type %]" name="username" id="form_username" value="[% username_value | html %]"
+<input type="[% username_type %]" name="username" id="form_username"
+ value="[% username_value | html %]"
[% IF required %]required[% END %]
class="form-control required">
diff --git a/templates/web/base/report/new/form_user_loggedout_password.html b/templates/web/base/report/form/user_loggedout_password.html
index 0d4759e51..0d4759e51 100644
--- a/templates/web/base/report/new/form_user_loggedout_password.html
+++ b/templates/web/base/report/form/user_loggedout_password.html
diff --git a/templates/web/base/report/form/user_name.html b/templates/web/base/report/form/user_name.html
new file mode 100644
index 000000000..c7b0bf7fa
--- /dev/null
+++ b/templates/web/base/report/form/user_name.html
@@ -0,0 +1,11 @@
+<label for="form_name">[% loc('Name') %]
+[% TRY %]
+ [% INCLUDE 'report/form/after_name.html' %]
+ [% CATCH file %]
+[% END %]
+</label>
+[% IF field_errors.name %]
+ <p class='form-error'>[% field_errors.name %]</p>
+[% END %]
+<input type="text" class="form-control [% valid_class OR 'validName' %] js-form-name [% extra_class %]"
+ value="[% object.name || c.user.name | html %]" name="name" id="form_name">
diff --git a/templates/web/base/report/new/form_report.html b/templates/web/base/report/new/form_report.html
index 24c3ff4d1..87956c9cf 100644
--- a/templates/web/base/report/new/form_report.html
+++ b/templates/web/base/report/new/form_report.html
@@ -6,7 +6,7 @@
[% PROCESS "report/new/category_wrapper.html" %]
[% TRY %][% PROCESS 'report/new/after_category.html' %][% CATCH file %][% END %]
-<div id="post_category_details_form">
+<div class="js-hide-if-invalid-category">
[% TRY %][% PROCESS 'report/new/_form_labels.html' %][% CATCH file %][% END %]
<h2 class="form-section-heading">[% loc( 'Public details' ) %]</h2>
diff --git a/templates/web/base/report/new/form_user.html b/templates/web/base/report/new/form_user.html
index 3e0af10a3..92fc9af42 100644
--- a/templates/web/base/report/new/form_user.html
+++ b/templates/web/base/report/new/form_user.html
@@ -1,4 +1,4 @@
-<div id="private_form">
+<div class="js-hide-if-invalid-category">
<h2 class="form-section-heading form-section-heading--private">[% loc('Private details') %]</h2>
<p class="form-section-description" id="js-councils_text_private">
[% IF js %]
@@ -12,6 +12,6 @@
[% IF c.user_exists %]
[% PROCESS "report/new/form_user_loggedin.html" %]
[% ELSE %]
- [% PROCESS "report/new/form_user_loggedout.html" %]
+ [% PROCESS "report/form/user_loggedout.html" type='report' object=report %]
[% END %]
</div>
diff --git a/templates/web/base/report/new/form_user_loggedin.html b/templates/web/base/report/new/form_user_loggedin.html
index f8e34a313..779bb8e34 100644
--- a/templates/web/base/report/new/form_user_loggedin.html
+++ b/templates/web/base/report/new/form_user_loggedin.html
@@ -45,7 +45,7 @@
[% INCLUDE 'report/new/extra_name.html' %]
[% PROCESS 'user/_anonymity.html' anonymous = report.anonymous %]
- [% INCLUDE 'report/new/form_user_name.html' %]
+ [% INCLUDE 'report/form/user_name.html' object=report %]
[% INCLUDE 'report/_show_name_label.html' %]
[% IF NOT c.user.phone_verified AND NOT c.cobrand.call_hook('disable_phone_number_entry') %]
diff --git a/templates/web/base/report/new/form_user_loggedout_email.html b/templates/web/base/report/new/form_user_loggedout_email.html
deleted file mode 100644
index 734eb6f35..000000000
--- a/templates/web/base/report/new/form_user_loggedout_email.html
+++ /dev/null
@@ -1,17 +0,0 @@
-[% IF c.config.SMS_AUTHENTICATION %]
- [% SET username_label = loc('Your email or mobile') %]
- [% SET username_type = 'text' %]
- [% SET username_value = report.user.username %]
-[% ELSE %]
- [% SET username_label = loc('Your email') %]
- [% SET username_type = 'email' %]
- [% SET username_value = report.user.email %]
-[% END %]
-
-<label for="form_username">[% username_label %]</label>
-[% IF field_errors.username %]
- <p class='form-error'>[% field_errors.username %]</p>
-[% END %]
-<input type="[% username_type %]" value="[% username_value | html %]" name="username" id="form_username"
- [% IF required %]required[% END %]
- class="form-control required">
diff --git a/templates/web/base/report/new/form_user_name.html b/templates/web/base/report/new/form_user_name.html
deleted file mode 100644
index 1f745eadb..000000000
--- a/templates/web/base/report/new/form_user_name.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<label for="form_name">[% loc('Name') %]
-[% TRY %]
- [% INCLUDE 'report/new/after_name.html' %]
- [% CATCH file %]
-[% END %]
-</label>
-[% IF field_errors.name %]
- <p class='form-error'>[% field_errors.name %]</p>
-[% END %]
-<input type="text" class="form-control validName js-form-name [% extra_class %]" value="[% report.name | html %]" name="name" id="form_name">
diff --git a/templates/web/base/report/new/login_success_form.html b/templates/web/base/report/new/login_success_form.html
index 2eade7c7d..ca0c9105a 100644
--- a/templates/web/base/report/new/login_success_form.html
+++ b/templates/web/base/report/new/login_success_form.html
@@ -11,7 +11,7 @@
[% IF c.user_exists %]
[% PROCESS "report/new/form_user_loggedin.html" %]
[% ELSE %]
- [% PROCESS "report/new/form_user_loggedout.html" %]
+ [% PROCESS "report/form/user_loggedout.html" type='report' object=report %]
[% END %]
[% PROCESS 'report/new/form_report.html' %]
</div>
diff --git a/templates/web/base/report/new/oauth_email_form.html b/templates/web/base/report/new/oauth_email_form.html
index 2c9b1a3ca..394a4b743 100644
--- a/templates/web/base/report/new/oauth_email_form.html
+++ b/templates/web/base/report/new/oauth_email_form.html
@@ -11,13 +11,10 @@
<fieldset>
<div id="problem_form">
- [% PROCESS 'report/new/form_user_loggedout_email.html' required=1 %]
+ [% PROCESS 'report/form/user_loggedout_email.html' type='report' object=report required=1 %]
<div id="form_sign_in">
- <h3>[% loc("Now to submit your report&hellip;") %]</h3>
- <h2>[% tprintf(loc("Do you have a %s password?", "%s is the site name"), site_name) %]</h2>
- [% PROCESS 'report/new/form_user_loggedout_by_email.html' %]
- [% PROCESS 'report/new/form_user_loggedout_password.html' %]
+ [% PROCESS 'report/form/user_loggedout_by_email.html' object=report type='report' %]
</div>
<input type="hidden" name="oauth_need_email" value="1">
diff --git a/templates/web/base/report/update-form.html b/templates/web/base/report/update-form.html
index 65262cd30..6817a0792 100644
--- a/templates/web/base/report/update-form.html
+++ b/templates/web/base/report/update-form.html
@@ -27,16 +27,13 @@
[% IF c.user_exists %]
[% PROCESS "report/update/form_user_loggedin.html" %]
[% ELSIF oauth_need_email %]
- [% INCLUDE 'report/update/form_user_loggedout_email.html' required = 1 %]
+ [% PROCESS 'report/form/user_loggedout_email.html' type='update' object=update required=1 %]
<div id="form_sign_in">
- <h3>[% loc("Now to submit your update&hellip;") %]</h3>
- <h2>[% tprintf(loc("Do you have a %s password?", "%s is the site name"), site_name) %]</h2>
- [% INCLUDE 'report/update/form_user_loggedout_by_email.html' %]
- [% INCLUDE 'report/update/form_user_loggedout_password.html' %]
+ [% PROCESS 'report/form/user_loggedout_by_email.html' object=update type='update' valid_class='validNameU' %]
<input type="hidden" name="oauth_need_email" value="1">
</div>
[% ELSE %]
- [% INCLUDE 'report/update/form_user_loggedout.html' %]
+ [% PROCESS "report/form/user_loggedout.html" type='update' object=update %]
[% END %]
[% IF login_success OR oauth_need_email %]
[% INCLUDE 'report/update/form_update.html' %]
diff --git a/templates/web/base/report/update/form_user_loggedin.html b/templates/web/base/report/update/form_user_loggedin.html
index 928cabbe9..aa25b2d80 100644
--- a/templates/web/base/report/update/form_user_loggedin.html
+++ b/templates/web/base/report/update/form_user_loggedin.html
@@ -24,7 +24,8 @@
<input class="form-control" name="username" id="form_username" type="text" value="[% c.user.email | html %]">
[% END %]
-[% INCLUDE 'report/update/form_user_name.html' %]
+[% PROCESS 'report/form/user_name.html' object=update valid_class='validNameU' %]
+
[% INCLUDE 'report/_show_name_label.html' %]
<div class="checkbox-group">
diff --git a/templates/web/base/report/update/form_user_loggedout.html b/templates/web/base/report/update/form_user_loggedout.html
deleted file mode 100644
index 19295b94c..000000000
--- a/templates/web/base/report/update/form_user_loggedout.html
+++ /dev/null
@@ -1,34 +0,0 @@
-[% IF c.cobrand.social_auth_enabled %]
- <h3>[% loc("Now to submit your update&hellip;") %]</h3>
- [% IF c.config.FACEBOOK_APP_ID %]
- <div class="form-box">
- <button name="facebook_sign_in" id="facebook_sign_in" value="facebook_sign_in" class="btn btn--block btn--social btn--facebook">
- <img alt="" src="/i/facebook-icon-32.png" width="17" height="32">
- [% loc('Log in with Facebook') %]
- </button>
- </div>
- [% END %]
- [% IF c.config.TWITTER_KEY %]
- <div class="form-box">
- <button name="twitter_sign_in" id="twitter_sign_in" value="twitter_sign_in" class="btn btn--block btn--social btn--twitter">
- <img alt="" src="/i/twitter-icon-32.png" width="17" height="32">
- [% loc('Log in with Twitter') %]
- </button>
- </div>
- [% END %]
- <div id="js-social-email-hide">
- [% INCLUDE 'report/update/form_user_loggedout_email.html' required=0 %]
-[% ELSE %]
- [% INCLUDE 'report/update/form_user_loggedout_email.html' required=1 %]
- <h3>[% loc("Now to submit your update&hellip;") %]</h3>
-[% END %]
-
-<div id="form_sign_in">
- <h2>[% tprintf(loc("Do you have a %s password?", "%s is the site name"), site_name) %]</h2>
- [% INCLUDE 'report/update/form_user_loggedout_password.html' %]
- [% INCLUDE 'report/update/form_user_loggedout_by_email.html' %]
-</div>
-
-[% IF c.cobrand.social_auth_enabled %]
- </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
deleted file mode 100644
index d97a6affb..000000000
--- a/templates/web/base/report/update/form_user_loggedout_by_email.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<div id="form_sign_in_no" class="form-box">
- [% IF c.config.SMS_AUTHENTICATION %]
- <h5>[% loc('<strong>No</strong> Let me confirm my update by email/text') %]</h5>
- [% ELSE %]
- <h5>[% loc('<strong>No</strong> Let me confirm my update by email') %]</h5>
- [% END %]
-
- [% INCLUDE 'report/new/extra_name.html' %]
- [% PROCESS 'user/_anonymity.html' anonymous = update.anonymous %]
- [% INCLUDE 'report/update/form_user_name.html' %]
- [% INCLUDE 'report/_show_name_label.html' %]
-
- <div class="checkbox-group">
- <input type="checkbox" name="add_alert" id="form_add_alert" value="1"[% ' checked' IF add_alert %]>
- <label class="inline" for="form_add_alert">[% loc( 'Alert me to future updates' ) %]</label>
- </div>
-
- <label for="password_register">[% loc('Password (optional)') %]</label>
- [% IF field_errors.password_register %]
- <p class='form-error'>[% field_errors.password_register %]</p>
- [% END %]
-
- <div class="general-notes" id="password_register_hint">
- <p>[% loc('Providing a password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.') %]</p>
- </div>
-
- <div class="form-txt-submit-box">
- <input type="password" class="form-control js-password-validate" name="password_register" id="password_register" value="" aria-describedby="password_register_hint">
- <input class="green-btn js-submit_register" type="submit" name="submit_register" value="[% loc('Post') %]">
- </div>
-
- <div class="general-notes">
- <p>[% tprintf(loc('Your password should include %d or more characters.'), c.cobrand.password_minimum_length) %]</p>
- </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
deleted file mode 100644
index a359946fe..000000000
--- a/templates/web/base/report/update/form_user_loggedout_password.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<div id="form_sign_in_yes" class="form-box">
- <h5>[% loc('<strong>Yes</strong> I have a password') %]</h5>
-
- <label for="password_sign_in">[% loc('Your password') %]</label>
- [% IF field_errors.password %]
- <p class='form-error'>[% field_errors.password %]</p>
- [% END %]
- <div class="form-txt-submit-box">
- <input type="password" class="form-control" name="password_sign_in" id="password_sign_in" value="">
- <input class="green-btn js-submit_sign_in" type="submit" name="submit_sign_in" value="[% loc('Post') %]">
- </div>
-
- <div class="general-notes">
- <p><strong>[% loc('Forgotten your password?') %]</strong>
- [% loc('Confirm by email instead, providing a new password at that point. When you confirm, your password will be updated.') %]</p>
- </div>
-
-</div>
diff --git a/templates/web/base/report/update/form_user_name.html b/templates/web/base/report/update/form_user_name.html
deleted file mode 100644
index 577f8de69..000000000
--- a/templates/web/base/report/update/form_user_name.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<label for="form_name">[% loc('Your name') %]</label>
-[% IF field_errors.name %]
- <p class='form-error'>[% field_errors.name %]</p>
-[% END %]
-
-<input type="text" class="form-control validNameU js-form-name"
- name="name" id="form_name" value="[% update.name || c.user.name | html %]">
diff --git a/templates/web/bromley/report/form/user_loggedout.html b/templates/web/bromley/report/form/user_loggedout.html
new file mode 100644
index 000000000..ceb6d0cf9
--- /dev/null
+++ b/templates/web/bromley/report/form/user_loggedout.html
@@ -0,0 +1,11 @@
+[% PROCESS 'report/form/user_loggedout_email.html' required=1 %]
+
+<div id="form_sign_in">
+ [% IF type == 'update' %]
+ <p>To submit your update you now need to confirm it either by email or by using a FixMyStreet password.</p>
+ [% ELSE %]
+ <p>To submit your report you now need to confirm it either by email or by using a FixMyStreet password.</p>
+ [% END %]
+ [% PROCESS 'report/form/user_loggedout_by_email.html' %]
+ [% PROCESS 'report/form/user_loggedout_password.html' %]
+</div>
diff --git a/templates/web/bromley/report/form/user_loggedout_by_email_heading.html b/templates/web/bromley/report/form/user_loggedout_by_email_heading.html
new file mode 100644
index 000000000..e88cf404a
--- /dev/null
+++ b/templates/web/bromley/report/form/user_loggedout_by_email_heading.html
@@ -0,0 +1 @@
+<h5>Confirm my report by email</h5>
diff --git a/templates/web/bromley/report/update/form_user_loggedout_email.html b/templates/web/bromley/report/form/user_loggedout_email.html
index f088bd63d..4315807ba 100644
--- a/templates/web/bromley/report/update/form_user_loggedout_email.html
+++ b/templates/web/bromley/report/form/user_loggedout_email.html
@@ -1,8 +1,10 @@
<label for="form_username">[% loc('Email' ) %]
+ [% IF type == 'update' %]
<span class="muted">([% loc('We never show your email') %])</span>
+ [% END %]
</label>
[% IF field_errors.username %]
<p class='form-error'>[% field_errors.username %]</p>
[% END %]
-<input class="form-control" type="email" name="username" id="form_username" value="[% update.user.email | html %]" required>
+<input class="form-control" type="email" name="username" id="form_username" value="[% object.user.email | html %]" required>
diff --git a/templates/web/bromley/report/new/form_user_loggedout_password.html b/templates/web/bromley/report/form/user_loggedout_password.html
index def5a51b7..def5a51b7 100644
--- a/templates/web/bromley/report/new/form_user_loggedout_password.html
+++ b/templates/web/bromley/report/form/user_loggedout_password.html
diff --git a/templates/web/bromley/report/update/form_user_name.html b/templates/web/bromley/report/form/user_name.html
index 93b103cc9..93b103cc9 100644
--- a/templates/web/bromley/report/update/form_user_name.html
+++ b/templates/web/bromley/report/form/user_name.html
diff --git a/templates/web/bromley/report/new/form_user.html b/templates/web/bromley/report/new/form_user.html
index 20f522dcd..e48b390bf 100644
--- a/templates/web/bromley/report/new/form_user.html
+++ b/templates/web/bromley/report/new/form_user.html
@@ -18,5 +18,5 @@
[% IF c.user_exists %]
[% PROCESS "report/new/form_user_loggedin.html" %]
[% ELSE %]
- [% PROCESS "report/new/form_user_loggedout.html" %]
+ [% PROCESS "report/form/user_loggedout.html" type='report' object=report %]
[% END %]
diff --git a/templates/web/bromley/report/new/form_user_loggedout.html b/templates/web/bromley/report/new/form_user_loggedout.html
deleted file mode 100644
index 8d46e7b60..000000000
--- a/templates/web/bromley/report/new/form_user_loggedout.html
+++ /dev/null
@@ -1,7 +0,0 @@
-[% PROCESS 'report/new/form_user_loggedout_email.html' required = 1 %]
-
-<div id="form_sign_in">
- <p>To submit your report you now need to confirm it either by email or by using a FixMyStreet password.</p>
- [% PROCESS 'report/new/form_user_loggedout_by_email.html' %]
- [% PROCESS 'report/new/form_user_loggedout_password.html' %]
-</div>
diff --git a/templates/web/bromley/report/new/form_user_loggedout_by_email.html b/templates/web/bromley/report/new/form_user_loggedout_by_email.html
deleted file mode 100644
index e9ebee7f7..000000000
--- a/templates/web/bromley/report/new/form_user_loggedout_by_email.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<div id="form_sign_in_no" class="form-box">
- <h5>Confirm my report by email</h5>
-
- [% INCLUDE 'report/new/extra_name.html' %]
- [% PROCESS 'user/_anonymity.html' anonymous = report.anonymous %]
- [% INCLUDE 'report/new/form_user_name.html' %]
- [% INCLUDE 'report/_show_name_label.html' %]
-
- [% UNLESS c.cobrand.call_hook('disable_phone_number_entry') %]
- <div id="js-hide-if-username-phone">
- <label for="form_phone">[% loc('Phone number (optional)') %]</label>
- [% IF field_errors.phone %]
- <p class='form-error'>[% field_errors.phone %]</p>
- [% END %]
- <input class="form-control" type="text" value="[% report.user.phone_display | html %]" name="phone" id="form_phone">
- </div>
- [% END %]
- <div id="js-hide-if-username-email">
- <label for="form_email">[% loc('Email address (optional)') %]</label>
- <input class="form-control" type="text" value="[% report.user.email | html %]" name="email" id="form_email">
- </div>
-
- <label for="password_register">[% loc('Password (optional)') %]</label>
- [% IF field_errors.password_register %]
- <p class='form-error'>[% field_errors.password_register %]</p>
- [% END %]
- <div class="general-notes" id="password_register_hint">
- <p>[% loc('Providing a password is optional, but doing so will allow you to more easily report future problems, leave updates and manage your reports.') %]</p>
- </div>
-
- <div class="form-txt-submit-box">
- <input class="form-control js-password-validate" type="password" name="password_register" id="password_register" value="" aria-describedby="password_register_hint">
- <input class="green-btn js-submit_register" type="submit" name="submit_register" value="[% loc('Submit') %]">
- </div>
-
- <div class="general-notes">
- <p>[% tprintf(loc('Your password should include %d or more characters.'), c.cobrand.password_minimum_length) %]</p>
- </div>
-
-</div>
diff --git a/templates/web/bromley/report/new/form_user_name.html b/templates/web/bromley/report/new/form_user_name.html
deleted file mode 100644
index 26dd235f3..000000000
--- a/templates/web/bromley/report/new/form_user_name.html
+++ /dev/null
@@ -1,12 +0,0 @@
-[% names = c.user.split_name %]
-<label for="form_first_name">[% loc('First Name') %]</label>
-[% IF field_errors.first_name %]
- <p class='form-error'>[% field_errors.first_name %]</p>
-[% END %]
-<input class="form-control js-form-name [% extra_class %]" type="text" value="[% ( first_name || names.first ) | html %]" name="first_name" id="form_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 class="form-control js-form-name [% extra_class %]" type="text" value="[% ( last_name || names.last ) | html %]" name="last_name" id="form_last_name">
diff --git a/templates/web/bromley/report/update-form.html b/templates/web/bromley/report/update-form.html
index 0222ec2a4..aeabfdfbd 100644
--- a/templates/web/bromley/report/update-form.html
+++ b/templates/web/bromley/report/update-form.html
@@ -17,16 +17,13 @@
[% IF c.user_exists %]
[% PROCESS 'report/update/form_user_loggedin.html' %]
[% ELSIF oauth_need_email %]
- [% INCLUDE 'report/update/form_user_loggedout_email.html' required = 1 %]
+ [% PROCESS 'report/form/user_loggedout_email.html' type='update' object=update required=1 %]
<div id="form_sign_in">
- <h3>[% loc("Now to submit your update&hellip;") %]</h3>
- <h2>[% tprintf(loc("Do you have a %s password?", "%s is the site name"), site_name) %]</h2>
- [% INCLUDE 'report/update/form_user_loggedout_by_email.html' %]
- [% INCLUDE 'report/update/form_user_loggedout_password.html' %]
+ [% PROCESS 'report/form/user_loggedout_by_email.html' object=update type='update' valid_class='validNameU' %]
<input type="hidden" name="oauth_need_email" value="1">
</div>
[% ELSE %]
- [% INCLUDE 'report/update/form_user_loggedout.html' %]
+ [% PROCESS "report/form/user_loggedout.html" type='update' object=update %]
[% END %]
<p>Your information will only be used in accordance with our <a href="/faq#privacy">privacy policy</a>.</p>
diff --git a/templates/web/bromley/report/update/form_user_loggedout.html b/templates/web/bromley/report/update/form_user_loggedout.html
deleted file mode 100644
index f19238934..000000000
--- a/templates/web/bromley/report/update/form_user_loggedout.html
+++ /dev/null
@@ -1,7 +0,0 @@
-[% INCLUDE 'report/update/form_user_loggedout_email.html' required=1 %]
-
-<div id="form_sign_in">
- <p>To submit your update you now need to confirm it either by email or by using a FixMyStreet password.</p>
- [% INCLUDE 'report/update/form_user_loggedout_by_email.html' %]
- [% INCLUDE 'report/update/form_user_loggedout_password.html' %]
-</div>
diff --git a/templates/web/bromley/report/update/form_user_loggedout_by_email.html b/templates/web/bromley/report/update/form_user_loggedout_by_email.html
deleted file mode 100644
index e19013f3b..000000000
--- a/templates/web/bromley/report/update/form_user_loggedout_by_email.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<div id="form_sign_in_no" class="form-box">
- <h5>Confirm my report by email</h5>
-
- [% INCLUDE 'report/new/extra_name.html' %]
- [% PROCESS 'user/_anonymity.html' anonymous = update.anonymous %]
- [% INCLUDE 'report/update/form_user_name.html' %]
- [% INCLUDE 'report/_show_name_label.html' %]
-
- <div class="checkbox-group">
- <input type="checkbox" name="add_alert" id="form_add_alert" value="1"[% ' checked' IF add_alert %]>
- <label class="inline" for="form_add_alert">[% loc( 'Alert me to future updates' ) %]</label>
- </div>
-
- <label for="password_register">[% loc('Password (optional)') %]</label>
- [% IF field_errors.password_register %]
- <p class='form-error'>[% field_errors.password_register %]</p>
- [% END %]
- <div class="general-notes" id="password_register_hint">
- <p>[% loc('Providing a password is optional, but doing so will allow you to more easily report future problems, leave updates and manage your reports.') %]</p>
- </div>
-
- <div class="form-txt-submit-box">
- <input class="form-control js-password-validate" type="password" name="password_register" id="password_register" value="" aria-describedby="password_register_hint">
- <input class="green-btn js-submit_register" type="submit" name="submit_register" value="[% loc('Post') %]">
- </div>
-
- <div class="general-notes">
- <p>[% tprintf(loc('Your password should include %d or more characters.'), c.cobrand.password_minimum_length) %]</p>
- </div>
-
-</div>
diff --git a/templates/web/fixamingata/report/form/user_loggedout.html b/templates/web/fixamingata/report/form/user_loggedout.html
new file mode 100644
index 000000000..7744739f3
--- /dev/null
+++ b/templates/web/fixamingata/report/form/user_loggedout.html
@@ -0,0 +1,6 @@
+ [% PROCESS 'report/form/user_loggedout_email.html' required=1 %]
+
+<div id="form_sign_in">
+ [% PROCESS 'report/form/user_loggedout_by_email.html' %]
+ [% PROCESS 'report/form/user_loggedout_password.html' %]
+</div>
diff --git a/templates/web/fixamingata/report/form/user_loggedout_by_email_heading.html b/templates/web/fixamingata/report/form/user_loggedout_by_email_heading.html
new file mode 100644
index 000000000..6dd8a3c93
--- /dev/null
+++ b/templates/web/fixamingata/report/form/user_loggedout_by_email_heading.html
@@ -0,0 +1 @@
+<h5>Om du inte har ett lösenord fyller du i ditt namn och eventuellt telefonnummer och nytt lösenord (valfria) här. När du skickar din rapport får du epost med en länk som du måste klicka på för att bekräfta rapporten. Om du redan har ett lösenord fyller du i detta längre ner på sidan och behöver då inte bekräfta rapporten.</h5>
diff --git a/templates/web/bromley/report/update/form_user_loggedout_password.html b/templates/web/fixamingata/report/form/user_loggedout_password.html
index adad6165f..be0f97ef3 100644
--- a/templates/web/bromley/report/update/form_user_loggedout_password.html
+++ b/templates/web/fixamingata/report/form/user_loggedout_password.html
@@ -1,13 +1,11 @@
<div id="form_sign_in_yes" class="form-box">
- <h5>Confirm my report with my FixMyStreet password</h5>
-
- <label for="password_sign_in">[% loc('Your password') %]</label>
+ <label for="password_sign_in">Jag har ett lösenord sedan tidigare:</label>
[% IF field_errors.password %]
<p class='form-error'>[% field_errors.password %]</p>
[% END %]
<div class="form-txt-submit-box">
<input class="form-control" type="password" name="password_sign_in" id="password_sign_in" value="">
- <input class="green-btn js-submit_sign_in" type="submit" name="submit_sign_in" value="[% loc('Post') %]">
+ <input class="green-btn js-submit_sign_in" type="submit" name="submit_sign_in" value="[% loc('Submit') %]">
</div>
</div>
diff --git a/templates/web/fixamingata/report/new/form_user_loggedout.html b/templates/web/fixamingata/report/new/form_user_loggedout.html
deleted file mode 100644
index 838b21bdb..000000000
--- a/templates/web/fixamingata/report/new/form_user_loggedout.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<label for="form_username">[% loc('Your email') %]</label>
-[% IF field_errors.username %]
- <p class='form-error'>[% field_errors.username %]</p>
-[% END %]
-<input type="email" class="form-control" value="[% report.user.email | html %]" name="username" id="form_username" required>
-
-<div id="form_sign_in">
- <h3>[% loc("Now to submit your report&hellip;") %]</h3>
-
- <div id="form_sign_in_no" class="form-box">
- <h5>Om du inte har ett lösenord fyller du i ditt namn och eventuellt telefonnummer och nytt lösenord (valfria) här. När du skickar din rapport får du epost med en länk som du måste klicka på för att bekräfta rapporten. Om du redan har ett lösenord fyller du i detta längre ner på sidan och behöver då inte bekräfta rapporten.</h5>
-
- [% INCLUDE 'report/new/extra_name.html' %]
-
- [% name_public = report.anonymous==0 OR (c.cobrand.default_show_name AND report.anonymous=='') %]
- <label for="form_name">[% loc('Name') %]</label>
- [% IF field_errors.name %]
- <p class='form-error'>[% field_errors.name %]</p>
- [% END %]
-
- <input type="text" class="form-control 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">
- <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF name_public %]>
- <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label>
- </div>
-
- <label for="form_phone">[% loc('Phone number (optional)') %]</label>
- <input type="text" class="form-control" value="[% report.user.phone_display | html %]" name="phone" id="form_phone">
-
- <div class="general-notes">
- <p>Vi visar inte din e-postadress eller ditt telefonnummer publikt.</p>
- </div>
-
- <label for="password_register">[% loc('Password (optional)') %]</label>
- [% IF field_errors.password_register %]
- <p class='form-error'>[% field_errors.password_register %]</p>
- [% END %]
-
- <div class="general-notes" id="password_register_hint">
- <p>[% loc('Providing a password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.') %]</p>
- </div>
-
- <div class="form-txt-submit-box">
- <input type="password" class="form-control js-password-validate" name="password_register" id="password_register" aria-describedby="password_register_hint" value="">
- <input class="green-btn js-submit_register" type="submit" name="submit_register" value="[% loc('Submit') %]">
- </div>
-
- <div class="general-notes">
- <p>[% tprintf(loc('Your password should include %d or more characters.'), c.cobrand.password_minimum_length) %]</p>
- </div>
-
- </div>
-
- <div id="form_sign_in_yes" class="form-box">
-
- <h5>Jag har ett lösenord sedan tidigare:</h5>
-
- <label class="hidden-js n" for="password_sign_in">[% loc('Yes I have a password') %]</label>
- <div class="form-txt-submit-box">
- [% IF field_errors.password %]
- <p class='form-error'>[% field_errors.password %]</p>
- [% END %]
- <input type="password" class="form-control" name="password_sign_in" id="password_sign_in" value="">
- <input class="green-btn js-submit_sign_in" type="submit" name="submit_sign_in" value="[% loc('Submit') %]">
- </div>
- </div>
-
-</div>
diff --git a/web/cobrands/oxfordshire/assets.js b/web/cobrands/oxfordshire/assets.js
index 46357b061..28cffc04c 100644
--- a/web/cobrands/oxfordshire/assets.js
+++ b/web/cobrands/oxfordshire/assets.js
@@ -1,7 +1,6 @@
(function(){
function disable_form(disable) {
- $('#post_category_details_form').toggle(!disable);
- $('#private_form').toggle(!disable);
+ $('.js-hide-if-invalid-category').toggle(!disable);
}
function check_rights_of_way() {