aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/web/base/auth/2faform.html1
-rw-r--r--templates/web/base/report/form/private_details.html21
-rw-r--r--templates/web/base/report/form/user.html25
-rw-r--r--templates/web/base/report/form/user_loggedout.html10
-rw-r--r--templates/web/base/report/form/user_loggedout_by_email.html72
-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/new/form_user_loggedout_email.html)11
-rw-r--r--templates/web/base/report/form/user_loggedout_password.html36
-rw-r--r--templates/web/base/report/form/user_name.html13
-rw-r--r--templates/web/base/report/new/category.html4
-rw-r--r--templates/web/base/report/new/category_wrapper.html2
-rw-r--r--templates/web/base/report/new/councils_text_private.html4
-rw-r--r--templates/web/base/report/new/extra_name.html2
-rw-r--r--templates/web/base/report/new/fill_in_details_form.html12
-rw-r--r--templates/web/base/report/new/form_report.html4
-rw-r--r--templates/web/base/report/new/form_user.html29
-rw-r--r--templates/web/base/report/new/form_user_loggedin.html13
-rw-r--r--templates/web/base/report/new/form_user_loggedout.html32
-rw-r--r--templates/web/base/report/new/form_user_loggedout_by_email.html44
-rw-r--r--templates/web/base/report/new/form_user_loggedout_password.html24
-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.html22
-rw-r--r--templates/web/base/report/update/form_user.html21
-rw-r--r--templates/web/base/report/update/form_user_loggedin.html (renamed from templates/web/base/report/update/form_name.html)13
-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.html28
-rw-r--r--templates/web/base/report/update/form_user_loggedout_password.html23
-rw-r--r--templates/web/bromley/report/form/private_details.html18
-rw-r--r--templates/web/bromley/report/form/user_loggedout_email.html (renamed from templates/web/base/report/update/form_user_loggedout_email.html)13
-rw-r--r--templates/web/bromley/report/form/user_name.html19
-rw-r--r--templates/web/bromley/report/new/form_user.html22
-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_loggedout_password.html18
-rw-r--r--templates/web/bromley/report/new/form_user_name.html12
-rw-r--r--templates/web/bromley/report/update-form.html22
-rw-r--r--templates/web/bromley/report/update/form_name.html29
-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.html23
-rw-r--r--templates/web/bromley/report/update/form_user_loggedout_email.html8
-rw-r--r--templates/web/bromley/report/update/form_user_loggedout_password.html18
-rw-r--r--templates/web/fixamingata/report/new/form_user_loggedout.html75
-rw-r--r--templates/web/zurich/report/new/fill_in_details_form.html4
45 files changed, 330 insertions, 537 deletions
diff --git a/templates/web/base/auth/2faform.html b/templates/web/base/auth/2faform.html
index 360883d49..bd6a7bd18 100644
--- a/templates/web/base/auth/2faform.html
+++ b/templates/web/base/auth/2faform.html
@@ -12,7 +12,6 @@
<input type="hidden" name="username" value="[% c.get_param('username') | html %]">
<input type="hidden" name="password_sign_in" value="[% c.get_param('password_sign_in') | html %]">
<input type="hidden" name="r" value="[% c.get_param('r') | html %]">
- <input type="hidden" name="remember_me" value="[% c.get_param('remember_me') | html %]">
<input type="hidden" name="token" value="[% token | html %]">
<label for="2fa_code">[% loc('Code') %]</label>
diff --git a/templates/web/base/report/form/private_details.html b/templates/web/base/report/form/private_details.html
new file mode 100644
index 000000000..7184d7e25
--- /dev/null
+++ b/templates/web/base/report/form/private_details.html
@@ -0,0 +1,21 @@
+<!-- private_details.html -->
+<h2 class="form-section-heading form-section-heading--private">[% loc('Tell us about you') %]</h2>
+
+[% UNLESS c.user_exists %]
+<p class="hidden-nojs js-new-report-sign-in-hidden">
+ <a id="js-new-report-show-sign-in" href="#">[% loc('Or sign in with password to prefill this information.') %]</a>
+</p>
+[% END %]
+
+[% IF type == 'report' %]
+<p class="form-section-description js-new-report-sign-in-hidden" id="js-councils_text_private">
+ [% IF js %]
+ [% loc('These details will be sent to the council, but will never be shown online without your permission.') %]
+ (<a href="/privacy">[% loc('See our privacy policy') %]</a>.)
+ [% ELSE %]
+ [% PROCESS 'report/new/councils_text_private.html' %]
+ [% END %]
+</p>
+[% END %]
+
+<!-- /private_details.html -->
diff --git a/templates/web/base/report/form/user.html b/templates/web/base/report/form/user.html
new file mode 100644
index 000000000..9e5eaf3af
--- /dev/null
+++ b/templates/web/base/report/form/user.html
@@ -0,0 +1,25 @@
+<!-- report/form/user.html -->
+<div class="js-new-report-user-hidden form-section-preview form-section-preview--next
+ [%~ ' hidden-nojs' IF c.user_exists OR NOT c.cobrand.social_auth_enabled %]">
+ <h2 class="form-section-heading form-section-heading--private hidden-nojs">
+ [% loc('Next:') %] [% loc('Tell us about you') %]
+ </h2>
+[% IF c.user_exists OR NOT c.cobrand.social_auth_enabled %]
+ <button id="js-new-report-user-show" class="btn btn--block hidden-nojs">[% loc('Continue') %]</button>
+[% ELSE %]
+ [% IF c.config.FACEBOOK_APP_ID %]
+ <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>
+ [% END %]
+ [% IF c.config.TWITTER_KEY %]
+ <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>
+ [% END %]
+ <button id="js-new-report-user-show" class="btn btn--block hidden-nojs">[% loc('Log in with email') %]</button>
+[% END %]
+</div>
+<!-- /report/form/user.html -->
diff --git a/templates/web/base/report/form/user_loggedout.html b/templates/web/base/report/form/user_loggedout.html
new file mode 100644
index 000000000..c9c3fabad
--- /dev/null
+++ b/templates/web/base/report/form/user_loggedout.html
@@ -0,0 +1,10 @@
+<!-- user_loggedout.html -->
+
+<div id="form_sign_in">
+ [% PROCESS 'report/form/private_details.html' %]
+ <h2 class="hidden-js">[% tprintf(loc("Do you have a %s password?", "%s is the site name"), site_name) %]</h2>
+ [% PROCESS 'report/form/user_loggedout_password.html' %]
+ [% PROCESS 'report/form/user_loggedout_by_email.html' %]
+</div>
+
+<!-- /user_loggedout.html -->
diff --git a/templates/web/base/report/form/user_loggedout_by_email.html b/templates/web/base/report/form/user_loggedout_by_email.html
new file mode 100644
index 000000000..4ae3db868
--- /dev/null
+++ b/templates/web/base/report/form/user_loggedout_by_email.html
@@ -0,0 +1,72 @@
+<!-- user_loggedout_by_email.html -->
+<div id="form_sign_in_no" class="form-box js-new-report-sign-in-hidden">
+ [% PROCESS 'report/form/user_loggedout_by_email_heading.html' %]
+
+ [% INCLUDE 'report/new/extra_name.html' %]
+ [% PROCESS 'user/_anonymity.html' anonymous = object.anonymous %]
+ [% INCLUDE 'report/form/user_name.html' %]
+ [% INCLUDE 'report/_show_name_label.html' %]
+
+ [% IF type != 'update' %]
+ [% IF NOT c.cobrand.call_hook('disable_phone_number_entry') AND NOT c.config.SMS_AUTHENTICATION %]
+ <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="[% phone | html %]" name="phone" id="form_phone">
+ </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 %]
+
+ [% IF c.cobrand.social_auth_enabled AND NOT email_required %]
+ [% PROCESS 'report/form/user_loggedout_email.html' name='username_register' required=0 %]
+ [% ELSE %]
+ [% PROCESS 'report/form/user_loggedout_email.html' name='username_register' required=1 %]
+ [% END %]
+
+ [% IF type != 'update' AND c.config.SMS_AUTHENTICATION %]
+ [% UNLESS c.cobrand.call_hook('disable_phone_number_entry') %]
+ <div id="js-hide-if-username-phone" class="hidden-js">
+ <label for="form_phone">[% loc('Phone number (optional)') %]</label>
+ <input class="form-control" type="text" value="[% phone | html %]" name="phone" id="form_phone">
+ </div>
+ [% END %]
+ <div id="js-hide-if-username-email" class="hidden-js">
+ <label for="form_email">[% loc('Email address (optional)') %]</label>
+ <input class="form-control" type="text" value="[% email | html %]" name="email" id="form_email">
+ </div>
+ [% END %]
+
+ [% 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>
+ [% END %]
+
+ <label class="hidden-js hidden-nojs js-new-report-forgotten-shown" for="password_register">[% loc('New password:') %]</label>
+ <label for="password_register" class="js-new-report-forgotten-hidden">[% loc('Password (optional)') %]</label>
+ [% IF field_errors.password_register %]
+ <p class='form-error'>[% field_errors.password_register %]</p>
+ [% END %]
+ <div class="general-notes js-new-report-forgotten-hidden" 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.') %] [% tprintf(loc('Your password should include %d or more characters.'), c.cobrand.password_minimum_length) %]</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.') %] [% tprintf(loc('Your password should include %d or more characters.'), c.cobrand.password_minimum_length) %]</p>
+ [% END %]
+ </div>
+
+ <input class="form-control js-password-validate" type="password" name="password_register" id="password_register" aria-describedby="password_register_hint" value="">
+
+ <input class="btn btn--primary btn--block btn--final js-submit_register" type="submit" name="submit_register" value="[% loc('Submit') %]">
+
+</div>
+<!-- /user_loggedout_by_email.html -->
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..6aa90c2fd
--- /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 class="hidden-js">[% loc('<strong>No</strong> Let me confirm my update by email/text') %]</h5>
+ [% ELSE %]
+ <h5 class="hidden-js">[% loc('<strong>No</strong> Let me confirm my report by email/text') %]</h5>
+ [% END %]
+[% ELSE %]
+ [% IF type == 'update' %]
+ <h5 class="hidden-js">[% loc('<strong>No</strong> Let me confirm my update by email') %]</h5>
+ [% ELSE %]
+ <h5 class="hidden-js">[% loc('<strong>No</strong> Let me confirm my report by email') %]</h5>
+ [% END %]
+[% END %]
diff --git a/templates/web/base/report/new/form_user_loggedout_email.html b/templates/web/base/report/form/user_loggedout_email.html
index 734eb6f35..c32691eb4 100644
--- a/templates/web/base/report/new/form_user_loggedout_email.html
+++ b/templates/web/base/report/form/user_loggedout_email.html
@@ -1,17 +1,20 @@
+<!-- user_loggedout_email.html -->
[% IF c.config.SMS_AUTHENTICATION %]
[% SET username_label = loc('Your email or mobile') %]
[% SET username_type = 'text' %]
- [% SET username_value = report.user.username %]
+ [% SET username_value = object.user.username %]
[% ELSE %]
[% SET username_label = loc('Your email') %]
[% SET username_type = 'email' %]
- [% SET username_value = report.user.email %]
+ [% SET username_value = object.user.email %]
[% END %]
-<label for="form_username">[% username_label %]</label>
+<label for="form_[% name %]">[% 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"
+<input type="[% username_type %]" name="username" id="form_[% name %]"
+ value="[% username_value | html %]"
[% IF required %]required[% END %]
class="form-control required">
+<!-- /user_loggedout_email.html -->
diff --git a/templates/web/base/report/form/user_loggedout_password.html b/templates/web/base/report/form/user_loggedout_password.html
new file mode 100644
index 000000000..dfd7d0d14
--- /dev/null
+++ b/templates/web/base/report/form/user_loggedout_password.html
@@ -0,0 +1,36 @@
+<!-- user_loggedout_password.html -->
+<div id="form_sign_in_yes" class="form-box hidden-js js-new-report-sign-in-shown">
+
+ <h5 class="hidden-js">[% loc('<strong>Yes</strong> I have a password') %]</h5>
+
+ <p class="hidden-nojs">
+ [% loc('No account?') %]
+ <a id="js-new-report-hide-sign-in" href="#">[% loc('Fill in your details manually.') %]</a>
+ </p>
+
+ [% IF c.cobrand.social_auth_enabled %]
+ [% PROCESS 'report/form/user_loggedout_email.html' name='username_sign_in' required=0 %]
+ [% ELSE %]
+ [% PROCESS 'report/form/user_loggedout_email.html' name='username_sign_in' required=1 %]
+ [% END %]
+
+ <label for="password_sign_in">[% loc('Your password') %]</label>
+ [% IF field_errors.password %]
+ <p class='form-error'>[% field_errors.password %]</p>
+ [% END %]
+ <input class="form-control" type="password" name="password_sign_in" id="password_sign_in" value="">
+
+ <p class="hidden-nojs">
+ [% loc('Forgotten your password?') %]
+ <a id="js-new-report-sign-in-forgotten" href="#">[% loc('Fill in your details manually.') %]</a>
+ </p>
+
+ <div class="general-notes">
+ <p class="hidden-js"><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>
+
+ <input class="btn btn--primary btn--block btn--final js-submit_sign_in" type="submit" name="submit_sign_in" value="[% loc('Submit') %]">
+
+</div>
+<!-- /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..4a90ee5b7
--- /dev/null
+++ b/templates/web/base/report/form/user_name.html
@@ -0,0 +1,13 @@
+<!-- user_name.html -->
+<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">
+<!-- /user_name.html -->
diff --git a/templates/web/base/report/new/category.html b/templates/web/base/report/new/category.html
index 44ed8df71..e537c8f1f 100644
--- a/templates/web/base/report/new/category.html
+++ b/templates/web/base/report/new/category.html
@@ -13,12 +13,12 @@
<label for='form_category' id="form_category_label">
[%~ loc('Category') ~%]
</label>[% =%]
- <select class="form-control[% IF category_groups.size %] js-grouped-select[% END %]" name="category" id="form_category"
+ <select class="validCategory form-control[% IF category_groups.size %] js-grouped-select[% END %]" name="category" id="form_category"
[%~ IF c.user.from_body =%]
[%~ prefill_report = ( c.cobrand.prefill_report_fields_for_inspector && inspector ) || c.user.has_body_permission_to('report_prefill') %]
data-body="[% c.user.from_body.name %]" data-prefill="[% prefill_report %]"
[%~ END ~%]
- >
+ required>
[%~ IF category_groups.size ~%]
[%~ FOREACH group IN category_groups ~%]
[% IF group.name %]<optgroup label="[% group.name %]">[% END %]
diff --git a/templates/web/base/report/new/category_wrapper.html b/templates/web/base/report/new/category_wrapper.html
index da25e51df..d6cba9bb3 100644
--- a/templates/web/base/report/new/category_wrapper.html
+++ b/templates/web/base/report/new/category_wrapper.html
@@ -1,7 +1,7 @@
<div id="form_category_row">
[% IF js %]
<label for="form_category">[% loc('Category') %]</label>
- <select class="form-control" name="category" id="form_category"
+ <select class="validCategory form-control" name="category" id="form_category"
[%~ IF c.user.from_body =%]
[%~ prefill_report = c.cobrand.prefill_report_fields_for_inspector || c.user.has_body_permission_to('report_prefill') %]
data-body="[% c.user.from_body.name %]" data-prefill="[% prefill_report %]"
diff --git a/templates/web/base/report/new/councils_text_private.html b/templates/web/base/report/new/councils_text_private.html
index 4ee7846f1..b6141d500 100644
--- a/templates/web/base/report/new/councils_text_private.html
+++ b/templates/web/base/report/new/councils_text_private.html
@@ -1,8 +1,8 @@
[% FILTER collapse %]
[% IF unresponsive.$category OR unresponsive.ALL OR bodies_to_list.size == 0 %]
- [% loc('These will never be shown online.') %]
+ [% loc('These details will never be shown online without your permission.') %]
[% ELSE %]
- [% loc('These will be sent to the council, but will never be shown online.') %]
+ [% loc('These details will be sent to the council, but will never be shown online without your permission.') %]
[% END %]
(<a href="/privacy">[% loc('See our privacy policy') %]</a>.)
[% END -%]
diff --git a/templates/web/base/report/new/extra_name.html b/templates/web/base/report/new/extra_name.html
index bad03e37f..ac926b1e7 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-control form-focus-trigger required js-form-name" id="form_fms_extra_title"
+<select class="form-control 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/fill_in_details_form.html b/templates/web/base/report/new/fill_in_details_form.html
index c819d34a0..c9bb2bf87 100644
--- a/templates/web/base/report/new/fill_in_details_form.html
+++ b/templates/web/base/report/new/fill_in_details_form.html
@@ -1,5 +1,7 @@
<h1>[% loc('Report your problem') %]</h1>
+<div class="js-new-report-user-hidden">
+
[% IF report.used_map %]
<ul class="change_location">
<li class="change_location__map">[% loc('Click the map or drag the pin to adjust the location') %]</li>
@@ -7,8 +9,12 @@
</ul>
[% END %]
+</div>
+
[% TRY %][% INCLUDE 'report/new/roads_message.html' %][% CATCH file %][% END %]
+<div class="js-new-report-user-hidden">
+
<div id="js-top-message">
[% PROCESS 'report/new/top_message.html' %]
</div>
@@ -24,9 +30,13 @@
[% INCLUDE 'errors.html' %]
+</div>
+
<fieldset>
<div id="problem_form">
- [% PROCESS 'report/new/form_report.html' %]
+ <div class="js-new-report-user-hidden">
+ [% PROCESS 'report/new/form_report.html' %]
+ </div>
[% PROCESS 'report/new/form_user.html' %]
</div>
</fieldset>
diff --git a/templates/web/base/report/new/form_report.html b/templates/web/base/report/new/form_report.html
index 24c3ff4d1..39e29c723 100644
--- a/templates/web/base/report/new/form_report.html
+++ b/templates/web/base/report/new/form_report.html
@@ -1,3 +1,4 @@
+<!-- report/new/form_report.html -->
[% INCLUDE 'report/new/form_heading.html' %]
[% IF field_errors.bodies %]
@@ -6,7 +7,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>
@@ -77,3 +78,4 @@
<input type="hidden" id="do_not_send" name="do_not_send" value="">
<input type="hidden" name="submit_problem" value="1">
</div>
+<!-- /report/new/form_report.html -->
diff --git a/templates/web/base/report/new/form_user.html b/templates/web/base/report/new/form_user.html
index 3e0af10a3..a3f236964 100644
--- a/templates/web/base/report/new/form_user.html
+++ b/templates/web/base/report/new/form_user.html
@@ -1,17 +1,24 @@
-<div id="private_form">
-<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 %]
- [% loc('These will be sent to the council, but will never be shown online.') %]
- (<a href="/privacy">[% loc('See our privacy policy') %]</a>.)
- [% ELSE %]
- [% PROCESS 'report/new/councils_text_private.html' %]
- [% END %]
-</p>
+<!-- report/new/form_user.html -->
+<div class="js-hide-if-invalid-category">
+
+ [% PROCESS 'report/form/user.html' %]
+
+ <div class="hidden-js js-new-report-user-shown">
+ <div class="hidden-nojs form-section-preview">
+ <h2 class="form-section-heading">[% loc('About the problem') %]</h2>
+ <p>
+ <strong class="js-form-section-preview" data-source="#form_title"></strong>
+ <span class="js-form-section-preview" data-source="#form_detail"></span>
+ </p>
+ <button id="js-new-report-user-hide" class="btn btn--block">[% loc('Edit report details') %]</button>
+ </div>
[% 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>
</div>
+<!-- /report/new/form_user.html -->
diff --git a/templates/web/base/report/new/form_user_loggedin.html b/templates/web/base/report/new/form_user_loggedin.html
index f8e34a313..cf6c067c6 100644
--- a/templates/web/base/report/new/form_user_loggedin.html
+++ b/templates/web/base/report/new/form_user_loggedin.html
@@ -1,4 +1,5 @@
-<div class="form-box" id="form-box--logged-in-name">
+<!-- report/new/form_user_loggedin.html -->
+[% PROCESS 'report/form/private_details.html' %]
[% IF js %]
<div style="display:none" id="js-contribute-as-wrapper">
@@ -45,7 +46,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') %]
@@ -56,7 +57,7 @@
<input class="form-control" type="text" value="[% report.user.phone_display | html %]" name="phone" id="form_phone">
[% END %]
[% IF NOT c.user.email_verified %]
- <label for="form_username">[% loc('Email address (optional)') %]</label>
+ <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">
[% END %]
@@ -67,7 +68,5 @@
</div>
[% END %]
- <div class="form-txt-submit-box">
- <input class="green-btn js-submit_register" type="submit" name="submit_register" value="[% loc('Submit') %]">
- </div>
-</div>
+<input class="btn btn--primary btn--block btn--final js-submit_register" type="submit" name="submit_register" value="[% loc('Submit') %]">
+<!-- /report/new/form_user_loggedin.html -->
diff --git a/templates/web/base/report/new/form_user_loggedout.html b/templates/web/base/report/new/form_user_loggedout.html
deleted file mode 100644
index d7bbbf588..000000000
--- a/templates/web/base/report/new/form_user_loggedout.html
+++ /dev/null
@@ -1,32 +0,0 @@
-[% IF c.cobrand.social_auth_enabled %]
- [% 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">
- [% PROCESS 'report/new/form_user_loggedout_email.html' required = 0 %]
-[% ELSE %]
- [% PROCESS 'report/new/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' %]
-</div>
-
-[% IF c.cobrand.social_auth_enabled %]
- </div>
-[% END %]
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
deleted file mode 100644
index 5171abd59..000000000
--- a/templates/web/base/report/new/form_user_loggedout_by_email.html
+++ /dev/null
@@ -1,44 +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 report by email/text') %]</h5>
- [% ELSE %]
- <h5>[% loc('<strong>No</strong> Let me confirm my report by email') %]</h5>
- [% END %]
-
- [% INCLUDE 'report/new/extra_name.html' %]
- [% PROCESS 'user/_anonymity.html' anonymous = report.anonymous %]
- [% INCLUDE 'report/new/form_user_name.html' extra_class='form-focus-trigger' %]
- [% INCLUDE 'report/_show_name_label.html' %]
-
- [% UNLESS c.cobrand.call_hook('disable_phone_number_entry') %]
- <div id="js-hide-if-username-phone">
- <label class="form-focus-hidden" 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 form-focus-hidden" type="text" value="[% phone | html %]" name="phone" id="form_phone">
- </div>
- [% END %]
- <div id="js-hide-if-username-email">
- <label class="form-focus-hidden" for="form_email">[% loc('Email address (optional)') %]</label>
- <input class="form-control form-focus-hidden" type="text" value="[% email | html %]" name="email" id="form_email">
- </div>
-
- <label class="form-focus-hidden" 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 form-focus-hidden" 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 form-focus-hidden">
- <input class="form-control js-password-validate" type="password" 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 form-focus-hidden">
- <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/new/form_user_loggedout_password.html b/templates/web/base/report/new/form_user_loggedout_password.html
deleted file mode 100644
index 16b6fdaad..000000000
--- a/templates/web/base/report/new/form_user_loggedout_password.html
+++ /dev/null
@@ -1,24 +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 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('Submit') %]">
- </div>
-
- <div class="checkbox-group">
- <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]>
- <label class="n inline" for="remember_me">[% loc('Keep me signed in on this computer') %]</label>
- </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/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..5b4622cda 100644
--- a/templates/web/base/report/new/oauth_email_form.html
+++ b/templates/web/base/report/new/oauth_email_form.html
@@ -11,13 +11,8 @@
<fieldset>
<div id="problem_form">
- [% PROCESS 'report/new/form_user_loggedout_email.html' 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' email_required=1 %]
</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 a68ce117f..9a3717ed9 100644
--- a/templates/web/base/report/update-form.html
+++ b/templates/web/base/report/update-form.html
@@ -22,25 +22,15 @@
<input type="hidden" name="token" value="[% csrf_token %]">
<fieldset>
[% IF NOT login_success AND NOT oauth_need_email %]
- [% INCLUDE 'report/update/form_update.html' %]
- [% END %]
- [% IF c.user_exists %]
- [% INCLUDE 'report/update/form_name.html' %]
- <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">
- <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' %]
- <input type="hidden" name="oauth_need_email" value="1">
+ <div class="js-new-report-user-hidden">
+ [% INCLUDE 'report/update/form_update.html' %]
</div>
- [% ELSE %]
- [% INCLUDE 'report/update/form_user_loggedout.html' %]
[% END %]
+ [% PROCESS "report/update/form_user.html" %]
[% IF login_success OR oauth_need_email %]
- [% INCLUDE 'report/update/form_update.html' %]
+ <div class="js-new-report-user-hidden">
+ [% INCLUDE 'report/update/form_update.html' %]
+ </div>
[% END %]
</fieldset>
</form>
diff --git a/templates/web/base/report/update/form_user.html b/templates/web/base/report/update/form_user.html
new file mode 100644
index 000000000..47ba18c12
--- /dev/null
+++ b/templates/web/base/report/update/form_user.html
@@ -0,0 +1,21 @@
+[% PROCESS 'report/form/user.html' %]
+
+<div class="hidden-js js-new-report-user-shown">
+ <div class="hidden-nojs form-section-preview">
+ <h2 class="form-section-heading">[% loc('Your update') %]</h2>
+ <p class="js-form-section-preview" data-source="#form_update"></p>
+ <button id="js-new-report-user-hide" class="btn btn--block">[% loc('Edit your update') %]</button>
+ </div>
+
+ [% IF c.user_exists %]
+ [% PROCESS "report/update/form_user_loggedin.html" %]
+ [% ELSIF oauth_need_email %]
+ <div id="form_sign_in">
+ [% PROCESS 'report/form/user_loggedout_by_email.html' object=update type='update' valid_class='validNameU' email_required=1 %]
+ <input type="hidden" name="oauth_need_email" value="1">
+ </div>
+ [% ELSE %]
+ [% PROCESS "report/form/user_loggedout.html" type='update' object=update %]
+ [% END %]
+
+</div>
diff --git a/templates/web/base/report/update/form_name.html b/templates/web/base/report/update/form_user_loggedin.html
index fa6595d74..bec783bb4 100644
--- a/templates/web/base/report/update/form_name.html
+++ b/templates/web/base/report/update/form_user_loggedin.html
@@ -1,3 +1,5 @@
+<!-- report/update/form_user_loggedin.html -->
+[% PROCESS 'report/form/private_details.html' %]
[% INCLUDE 'report/new/extra_name.html' %]
[% PROCESS 'user/_anonymity.html' anonymous = update.anonymous %]
@@ -24,13 +26,7 @@
<input class="form-control" name="username" id="form_username" type="text" value="[% c.user.email | html %]">
[% END %]
-<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 %]">
+[% PROCESS 'report/form/user_name.html' object=update valid_class='validNameU' %]
[% INCLUDE 'report/_show_name_label.html' %]
@@ -38,3 +34,6 @@
<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>
+
+<div class="clearfix"><input class="btn btn--primary btn--block btn--final js-submit_register" type="submit" name="submit_register" value="[% loc('Post') %]"></div>
+<!-- /report/update/form_user_loggedin.html -->
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 63e6e3e4f..000000000
--- a/templates/web/base/report/update/form_user_loggedout_by_email.html
+++ /dev/null
@@ -1,28 +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/update/form_name.html' %]
-
- <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 c68163fa7..000000000
--- a/templates/web/base/report/update/form_user_loggedout_password.html
+++ /dev/null
@@ -1,23 +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="checkbox-group">
- <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]>
- <label class="inline n" for="remember_me">[% loc('Keep me signed in on this computer') %]</label>
- </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/bromley/report/form/private_details.html b/templates/web/bromley/report/form/private_details.html
new file mode 100644
index 000000000..d146c7ca3
--- /dev/null
+++ b/templates/web/bromley/report/form/private_details.html
@@ -0,0 +1,18 @@
+<!-- private_details.html -->
+<h2 class="form-section-heading form-section-heading--private">[% loc('Tell us about you') %]</h2>
+
+[% UNLESS c.user_exists %]
+<p class="hidden-nojs js-new-report-sign-in-hidden">
+ <a id="js-new-report-show-sign-in" href="#">[% loc('Or sign in with password to prefill this information.') %]</a>
+</p>
+[% END %]
+
+<p class="form-section-description js-new-report-sign-in-hidden" id="js-councils_text_private">
+ [% IF js %]
+ [% loc('These details will be sent to the council, but will never be shown online without your permission.') %]
+ (<a href="/faq#privacy">[% loc('See our privacy policy') %]</a>.)
+ [% ELSE %]
+ [% PROCESS 'report/new/councils_text_private.html' %]
+ [% END %]
+</p>
+<!-- /private_details.html -->
diff --git a/templates/web/base/report/update/form_user_loggedout_email.html b/templates/web/bromley/report/form/user_loggedout_email.html
index f4228969b..78b4a0044 100644
--- a/templates/web/base/report/update/form_user_loggedout_email.html
+++ b/templates/web/bromley/report/form/user_loggedout_email.html
@@ -1,17 +1,22 @@
[% 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>
+<label for="form_[% name %]">[% 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 type="[% username_type %]" name="username" id="form_username" value="[% username_value | html %]"
+<input type="[% username_type %]" name="username" id="form_[% name %]"
+ value="[% username_value | html %]"
[% IF required %]required[% END %]
class="form-control required">
diff --git a/templates/web/bromley/report/form/user_name.html b/templates/web/bromley/report/form/user_name.html
new file mode 100644
index 000000000..93b103cc9
--- /dev/null
+++ b/templates/web/bromley/report/form/user_name.html
@@ -0,0 +1,19 @@
+[% IF c.user_exists %]
+ [% names = c.user.split_name %]
+[% END %]
+
+<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="js-form-name form-control" type="text"
+ name="first_name" id="form_first_name"
+ value="[% first_name || names.first | html %]">
+
+<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="js-form-name form-control" type="text"
+ name="last_name" id="form_last_name"
+ value="[% last_name || names.last | html %]">
diff --git a/templates/web/bromley/report/new/form_user.html b/templates/web/bromley/report/new/form_user.html
deleted file mode 100644
index 20f522dcd..000000000
--- a/templates/web/bromley/report/new/form_user.html
+++ /dev/null
@@ -1,22 +0,0 @@
-[%#
- Bromley overrides form_user.html so that they link to their own
- privacy statement in /faq#privacy, swap the order of the "confirm
- by email" and "confirm by password" boxes, and ask people for their
- title, first name, and last name separately.
-%]
-
-<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 %]
- [% loc('These will be sent to the council, but will never be shown online.') %]
- (<a href="/faq#privacy">[% loc('See our privacy policy') %]</a>.)
- [% ELSE %]
- [% PROCESS 'report/new/councils_text_private.html' %]
- [% END %]
-</p>
-
-[% IF c.user_exists %]
- [% PROCESS "report/new/form_user_loggedin.html" %]
-[% ELSE %]
- [% PROCESS "report/new/form_user_loggedout.html" %]
-[% 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 8c772ac53..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' extra_class='form-focus-trigger' %]
- [% INCLUDE 'report/_show_name_label.html' %]
-
- [% UNLESS c.cobrand.call_hook('disable_phone_number_entry') %]
- <div id="js-hide-if-username-phone">
- <label class="form-focus-hidden" 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 form-focus-hidden" type="text" value="[% report.user.phone_display | html %]" name="phone" id="form_phone">
- </div>
- [% END %]
- <div id="js-hide-if-username-email">
- <label class="form-focus-hidden" for="form_email">[% loc('Email address (optional)') %]</label>
- <input class="form-control form-focus-hidden" type="text" value="[% report.user.email | html %]" name="email" id="form_email">
- </div>
-
- <label class="form-focus-hidden" 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 form-focus-hidden" 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 form-focus-hidden">
- <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 form-focus-hidden">
- <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_loggedout_password.html b/templates/web/bromley/report/new/form_user_loggedout_password.html
deleted file mode 100644
index 900fc5d9d..000000000
--- a/templates/web/bromley/report/new/form_user_loggedout_password.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<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>
- [% 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('Submit') %]">
- </div>
-
- <div class="checkbox-group">
- <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]>
- <label class="n inline" for="remember_me">[% loc('Keep me signed in on this computer') %]</label>
- </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 6c3ca9298..9d589bc93 100644
--- a/templates/web/bromley/report/update-form.html
+++ b/templates/web/bromley/report/update-form.html
@@ -12,28 +12,18 @@
<input type="hidden" name="token" value="[% csrf_token %]">
<fieldset>
[% IF NOT login_success AND NOT oauth_need_email %]
- [% INCLUDE 'report/update/form_update.html' %]
- [% END %]
- [% IF c.user_exists %]
- [% INCLUDE 'report/update/form_name.html' %]
- <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">
- <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' %]
- <input type="hidden" name="oauth_need_email" value="1">
+ <div class="js-new-report-user-hidden">
+ [% INCLUDE 'report/update/form_update.html' %]
</div>
- [% ELSE %]
- [% INCLUDE 'report/update/form_user_loggedout.html' %]
[% END %]
+ [% PROCESS "report/update/form_user.html" %]
<p>Your information will only be used in accordance with our <a href="/faq#privacy">privacy policy</a>.</p>
[% IF login_success OR oauth_need_email %]
- [% INCLUDE 'report/update/form_update.html' %]
+ <div class="js-new-report-user-hidden">
+ [% INCLUDE 'report/update/form_update.html' %]
+ </div>
[% END %]
</fieldset>
</form>
diff --git a/templates/web/bromley/report/update/form_name.html b/templates/web/bromley/report/update/form_name.html
deleted file mode 100644
index 07166a431..000000000
--- a/templates/web/bromley/report/update/form_name.html
+++ /dev/null
@@ -1,29 +0,0 @@
-[% INCLUDE 'report/new/extra_name.html' %]
-
-[% PROCESS 'user/_anonymity.html' anonymous = update.anonymous %]
-
-[% IF c.user_exists %]
- [% names = c.user.split_name %]
-[% END %]
-
-<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="js-form-name form-control" type="text" value="[% names.first || first_name | 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="js-form-name form-control" type="text" value="[% names.last || last_name | html %]" name="last_name" id="form_last_name">
-
-<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>
-
-<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>
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 b70749d87..000000000
--- a/templates/web/bromley/report/update/form_user_loggedout_by_email.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<div id="form_sign_in_no" class="form-box">
- <h5>Confirm my report by email</h5>
-
- [% INCLUDE 'report/update/form_name.html' %]
-
- <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/bromley/report/update/form_user_loggedout_email.html b/templates/web/bromley/report/update/form_user_loggedout_email.html
deleted file mode 100644
index f088bd63d..000000000
--- a/templates/web/bromley/report/update/form_user_loggedout_email.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<label for="form_username">[% loc('Email' ) %]
- <span class="muted">([% loc('We never show your email') %])</span>
-</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>
diff --git a/templates/web/bromley/report/update/form_user_loggedout_password.html b/templates/web/bromley/report/update/form_user_loggedout_password.html
deleted file mode 100644
index c18b45ff0..000000000
--- a/templates/web/bromley/report/update/form_user_loggedout_password.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<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>
- [% 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') %]">
- </div>
-
- <div class="checkbox-group">
- <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]>
- <label class="n inline" for="remember_me">[% loc('Keep me signed in on this computer') %]</label>
- </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 cc869e2be..000000000
--- a/templates/web/fixamingata/report/new/form_user_loggedout.html
+++ /dev/null
@@ -1,75 +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 form-focus-trigger 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 form-focus-hidden">
- <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 form-focus-hidden" 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 class="checkbox-group">
- <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]>
- <label class="n inline" for="remember_me">[% loc('Keep me signed in on this computer') %]</label>
- </div>
- </div>
-
-</div>
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 bd20efdaa..17e308f07 100644
--- a/templates/web/zurich/report/new/fill_in_details_form.html
+++ b/templates/web/zurich/report/new/fill_in_details_form.html
@@ -50,11 +50,11 @@
[% PROCESS "report/new/category_wrapper.html" %]
- <label for="form_username">[% loc('Your email') %]</label>
+ <label for="form_username_register">[% loc('Your email') %]</label>
[% IF field_errors.username %]
<p class='form-error'>[% field_errors.username %]</p>
[% END %]
- <input class="form-control" type="email" value="[% email | html %]" name="username" id="form_username" required>
+ <input class="form-control" type="email" value="[% email | html %]" name="username" id="form_username_register" required>
<label for="form_name">[% loc('Name') %] [% loc('(optional)') %]</label>
[% IF field_errors.name %]