Skip to content

Instantly share code, notes, and snippets.

@schlos
Created June 8, 2021 17:01
Show Gist options
  • Save schlos/d1d3bd175dcee17a94ee5dd04726a716 to your computer and use it in GitHub Desktop.
Save schlos/d1d3bd175dcee17a94ee5dd04726a716 to your computer and use it in GitHub Desktop.
FixMyStreet base cobrand template (v3.1) - report a problem page
[%
# Only used by Zurich
TRY; sidebar_html = PROCESS 'report/new/sidebar.html'; CATCH file; END;
SET bodyclass = '';
SET bodyclass = 'mappage';
SET bodyclass = bodyclass _ " with-notes" IF sidebar_html;
SET extra_js = [];
PROCESS "report/photo-js.html";
PROCESS "maps/${map.type}.html" IF report.used_map;
INCLUDE 'header.html', title => loc('Reporting a problem');
%]
[% IF report.used_map %]
<form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %] class="validate">
[% ELSE %]
<form action="[% c.uri_for('/report/new') %]" method="post" name="mapSkippedForm"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %] class="validate">
<input type="hidden" name="skipped" value="1">
[% END %]
<input type="hidden" name="token" value="[% csrf_token %]">
<input type="hidden" name="pc" value="[% pc | html %]">
<input type="hidden" name="latitude" id="fixmystreet.latitude" value="[% latitude | html %]">
<input type="hidden" name="longitude" id="fixmystreet.longitude" value="[% longitude | html %]">
[% IF report.used_map %]
[% map_html | safe %]
<div class="mobile-map-banner">
<span>[% loc('Reposition if needed, then hit Continue') %]</span>
</div>
</div>
<div id="map_sidebar">
<div id="side-form">
[% ELSE %]
<div id="map_sidebar">
<div id="skipped-map">
[% END %]
<div id="report-a-problem-main">
<a href="#" class="js-back problem-back problem-back--top">[% loc('Back') %]</a>
[% IF login_success %]
[% PROCESS 'report/new/login_success_form.html' %]
<!-- report/new/login_success_form.html START -->
[% PROCESS 'report/new/form_heading.html' %]
<!-- report/new/form_heading.html START -->
<h1>[% loc('Report your problem') %]</h1>
<!-- report/new/form_heading.html END -->
<p class='form-success'>[% loc('You have successfully signed in; please check and confirm your details are accurate:') %]</p>
[% sidebar_html | safe %]
[% INCLUDE 'errors.html' %]
<!-- errors.html START -->
<!-- N/A - there is no errors.html file, but this probably comes from JS for form validation -->
<!-- errors.html END -->
<fieldset>
<div id="problem_form" class="js-reporting-page--single">
[% IF c.user_exists %]
[% PROCESS "report/new/form_user_loggedin.html" type='report' %]
<!-- report/new/form_user_loggedin.html START -->
<!-- report/new/form_user_loggedin.html -->
[% PROCESS 'report/form/private_details.html' %]
<!-- report/new/private_details.html START -->
<!-- N/A - there is no report/new/private_details.html file -->
<!-- report/new/private_details.html END -->
[% can_contribute_as_body = c.user.from_body AND c.user.has_permission_to("contribute_as_body", bodies_ids) %]
[% IF js %]
<div style="display:none" id="js-contribute-as-wrapper">
[% INCLUDE form_as %]
</div>
[% ELSE %]
[% can_contribute_as_another_user = c.user.has_permission_to("contribute_as_another_user", bodies_ids) %]
[% can_contribute_as_anonymous_user = c.user.has_permission_to("contribute_as_anonymous_user", bodies_ids) %]
[% IF can_contribute_as_another_user OR can_contribute_as_anonymous_user OR can_contribute_as_body %]
[% INCLUDE form_as %]
[% END %]
[% END %]
[% BLOCK form_as %]
<label for="form_as">[% loc('Report as') %]</label>
<select id="form_as" class="form-control js-contribute-as" name="form_as">
<option value="myself" [% c.user.from_body AND ( c.user.has_body_permission_to('planned_reports') || c.user.has_body_permission_to('default_to_body') ) ? '' : 'selected' %]>[% loc('Yourself') %]</option>
[% IF js || can_contribute_as_anonymous_user %]
<option value="anonymous_user">[% loc('Anonymous user') %]</option>
[% END %]
[% IF js || can_contribute_as_another_user %]
<option value="another_user">[% loc('Another user') %]</option>
[% END %]
[% IF js || can_contribute_as_body %]
<option value="body" [% c.user.from_body AND ( c.user.has_body_permission_to('planned_reports') || c.user.has_body_permission_to('default_to_body') ) ? 'selected' : '' %]>[% c.user.from_body.cobrand_name %]</option>
[% END %]
</select>
[% END %]
[% IF c.user.phone_verified AND NOT c.cobrand.call_hook('disable_phone_number_entry') %]
<label for="form_phone">[% loc('Phone number') %]</label>
<input class="form-control" id="form_phone" name="phone" disabled type="text" value="[% c.user.phone_display | html %]">
[% END %]
[% IF c.user.email_verified %]
<label for="form_username">[% loc('Email address') %]<span class="hidden"> [% loc('(optional)') %]</span></label>
[% IF field_errors.username_register %]
<p class='form-error'>[% field_errors.username_register %]</p>
[% END %]
<input class="form-control" id="form_username" name="username"
[%- IF NOT can_contribute_as_another_user -%]
disabled
[%- END -%]
type="text" value="[% c.user.email | html %]">
[% END %]
[% INCLUDE 'report/new/extra_name.html' %]
<!-- report/new/extra_name.html START -->
[% IF extra_name_info %]
<label for="form_fms_extra_title">Title</label>
[% IF field_errors.fms_extra_title %]
<p class='form-error'>[% field_errors.fms_extra_title %]</p>
[% END %]
[% 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 required js-form-name" id="form_fms_extra_title"
name="fms_extra_title">
<option></option>
<option value="MR"[% ' selected' IF title == 'MR' %]>Mr</option>
<option value="MISS"[% ' selected' IF title == 'MISS' %]>Miss</option>
<option value="MRS"[% ' selected' IF title == 'MRS' %]>Mrs</option>
<option value="MS"[% ' selected' IF title == 'MS' %]>Ms</option>
<option value="DR"[% ' selected' IF title == 'DR' %]>Dr</option>
</select>
[% END %]
<!-- report/new/extra_name.html END -->
[% PROCESS 'user/_anonymity.html' anonymous = report.anonymous %]
<!-- user/_anonymity.html START -->
[%
IF anonymous=='';
IF c.user_exists;
SET name_public = NOT c.user.latest_anonymity;
ELSE;
SET name_public = c.cobrand.default_show_name;
END;
ELSE;
SET name_public = anonymous==0;
END
%]
<!-- user/_anonymity.html END -->
[% INCLUDE 'report/form/user_name.html' object=report %]
<!-- report/form/user_name.html START -->
<!-- user_name.html -->
<label for="form_name">[% loc('Name') %]
[% TRY %]
[% INCLUDE 'report/form/after_name.html' %]
<!-- report/form/after_name.html START -->
<!-- N/A - there is no report/form/after_name.html file -->
<!-- report/form/after_name.html END -->
[% 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 -->
<!-- report/form/user_name.html END -->
[% INCLUDE 'report/_show_name_label.html' %]
[% IF NOT c.user.phone_verified AND NOT c.cobrand.call_hook('disable_phone_number_entry') %]
<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">
[% END %]
[% IF NOT c.user.email_verified %]
<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 %]
[% IF c.user.has_permission_to("report_inspect", bodies_ids) OR c.user.has_permission_to("report_mark_private", bodies_ids) %]
<div class="checkbox-group">
<input type="checkbox" name="non_public" id="form_non_public" value="1"
[%~ SET category_safe = mark_safe(category) %]
[%~ ' checked' IF report.non_public OR non_public_categories.$category_safe %]
[%~ ' disabled' IF non_public_categories.$category_safe %]>
<label class="inline" for="form_non_public">[% loc('Private – this will mean the report cannot be viewed publicly') %]</label>
</div>
[% END %]
[% IF can_contribute_as_body %]
[% TRY %][% INCLUDE 'report/form/private_comments.html' %][% CATCH file %][% END %]
<!-- report/form/private_comments.html START -->
<!-- N/A - there is no report/form/private_comments.html file -->
<!-- report/form/private_comments.html END -->
[% END %]
[% PROCESS 'report/form/submit.html' %]
<!-- report/form/submit.html START -->
<input class="desk-only btn btn--primary btn--block btn--final js-submit_register" type="submit" name="submit_register" value="[% loc('Submit') %]">
<input class="mob-only btn btn--primary btn--block btn--final js-submit_register" type="submit" name="submit_register_mobile" value="[% loc('Submit') %]">
<!-- report/form/submit.html END -->
<!-- /report/new/form_user_loggedin.html -->
<!-- report/new/form_user_loggedin.html END -->
[% ELSE %]
[% PROCESS "report/form/user_loggedout.html" type='report' object=report %]
<!-- report/form/user_loggedout.html START -->
<!-- user_loggedout.html -->
<div id="form_sign_in">
[% PROCESS 'report/form/private_details.html' %]
<!-- report/form/private_details.html START -->
<!-- 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 class="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="[% c.cobrand.privacy_policy_url %]">[% loc('See our privacy policy') %]</a>.)
[% ELSE %]
[% PROCESS 'report/new/councils_text_private.html' %]
<!-- report/new/councils_text_private.html START -->
[% FILTER collapse %]
[% category = mark_safe(category) %]
[% IF unresponsive.$category OR unresponsive.ALL OR bodies_to_list.size == 0 %]
[% loc('These details will never be shown online without your permission.') %]
[% ELSE %]
[% loc('These details will be sent to the council, but will never be shown online without your permission.') %]
[% END %]
(<a href="[% c.cobrand.privacy_policy_url %]">[% loc('See our privacy policy') %]</a>.)
[% END -%]
<!-- report/new/councils_text_private.html END -->
[% END %]
</p>
[% END %]
<!-- /private_details.html -->
<!-- report/form/private_details.html END -->
<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' %]
<!-- report/form/user_loggedout_password.html START -->
<!-- user_loggedout_password.html -->
<div id="form_sign_in_yes" class="form-box hidden-js js-new-report-sign-in-shown">
<h3 class="hidden-js">[% loc('<strong>Yes</strong> I have a password') %]</h3>
<p class="hidden-nojs">
[% loc('No account?') %]
<a class="js-new-report-hide-sign-in" href="#">[% loc('Fill in your details manually.') %]</a>
</p>
[% PROCESS 'report/form/user_loggedout_email.html' name='username_sign_in' %]
<!-- report/form/user_loggedout_email.html START -->
<!-- user_loggedout_email.html -->
[% IF c.cobrand.sms_authentication %]
[% SET username_label = loc('Your email or mobile') %]
[% SET username_type = 'text' %]
[% ELSE %]
[% SET username_label = loc('Your email') %]
[% SET username_type = 'email' %]
[% END %]
[% SET username_field = (name == 'username_sign_in') ? 'username' : name ~%]
<label for="form_[% name %]">[% username_label %]</label>
[% IF field_errors.$name %]
<p class='form-error'>[% field_errors.$name %]</p>
[% END %]
<input type="[% username_type %]" name="[% username_field %]" id="form_[% name %]"
value="[% c.get_param(username_field) %]"
class="form-control required">
<!-- /user_loggedout_email.html -->
<!-- report/form/user_loggedout_email.html 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 class="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 -->
<!-- report/form/user_loggedout_password.html END -->
[% PROCESS 'report/form/user_loggedout_by_email.html' %]
<!-- report/form/user_loggedout_by_email.html START -->
<!-- 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' %]
<!-- report/form/user_loggedout_by_email_heading.html START -->
[% IF c.cobrand.sms_authentication %]
[% IF type == 'update' %]
<h3 class="hidden-js">[% loc('<strong>No</strong> Let me confirm my update by email/text') %]</h3>
[% ELSE %]
<h3 class="hidden-js">[% loc('<strong>No</strong> Let me confirm my report by email/text') %]</h3>
[% END %]
[% ELSE %]
[% IF type == 'update' %]
<h3 class="hidden-js">[% loc('<strong>No</strong> Let me confirm my update by email') %]</h3>
[% ELSE %]
<h3 class="hidden-js">[% loc('<strong>No</strong> Let me confirm my report by email') %]</h3>
[% END %]
[% END %]
<!-- report/form/user_loggedout_by_email_heading.html END -->
[% INCLUDE 'report/new/extra_name.html' %]
<!-- report/new/extra_name.html START -->
[% IF extra_name_info %]
<label for="form_fms_extra_title">Title</label>
[% IF field_errors.fms_extra_title %]
<p class='form-error'>[% field_errors.fms_extra_title %]</p>
[% END %]
[% 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 required js-form-name" id="form_fms_extra_title"
name="fms_extra_title">
<option></option>
<option value="MR"[% ' selected' IF title == 'MR' %]>Mr</option>
<option value="MISS"[% ' selected' IF title == 'MISS' %]>Miss</option>
<option value="MRS"[% ' selected' IF title == 'MRS' %]>Mrs</option>
<option value="MS"[% ' selected' IF title == 'MS' %]>Ms</option>
<option value="DR"[% ' selected' IF title == 'DR' %]>Dr</option>
</select>
[% END %]
<!-- report/new/extra_name.html END -->
[% PROCESS 'user/_anonymity.html' anonymous = object.anonymous %]
<!-- user/_anonymity.html START -->
[%
IF anonymous=='';
IF c.user_exists;
SET name_public = NOT c.user.latest_anonymity;
ELSE;
SET name_public = c.cobrand.default_show_name;
END;
ELSE;
SET name_public = anonymous==0;
END
%]
<!-- user/_anonymity.html END -->
[% INCLUDE 'report/form/user_name.html' %]
<!-- report/form/user_name.html START -->
<!-- user_name.html -->
<label for="form_name">[% loc('Name') %]
[% TRY %]
[% INCLUDE 'report/form/after_name.html' %]
<!-- report/form/after_name.html START -->
<!-- N/A - there is no report/form/after_name.html file -->
<!-- report/form/after_name.html END -->
[% 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 -->
<!-- report/form/user_name.html END -->
[% INCLUDE 'report/_show_name_label.html' %]
<!-- report/_show_name_label.html START -->
<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>
<!-- report/_show_name_label.html END -->
[% IF type != 'update' %]
[% IF NOT c.cobrand.call_hook('disable_phone_number_entry') AND NOT c.cobrand.sms_authentication %]
<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">
[% 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 type != 'update' AND c.cobrand.sms_authentication AND NOT c.cobrand.call_hook('disable_phone_number_entry') %]
<fieldset>
<legend>How would you like to receive updates?</legend>
[% IF field_errors.update_method %]
<p class='form-error'>[% field_errors.update_method %]</p>
[% END %]
<p class="segmented-control segmented-control--radio">
<input required type="radio" name="update_method" id="update_method_email"
data-show="#js-optional-phone" data-hide="#js-optional-email"
value="email"[% ' checked' IF update_method == 'email' %]>
<label class="btn" for="update_method_email">[% loc('Email') %]</label>
<input type="radio" name="update_method" id="update_method_phone"
data-show="#js-optional-email" data-hide="#js-optional-phone"
value="phone"[% ' checked' IF update_method == 'phone' %]>
<label class="btn" for="update_method_phone">[% loc('Phone') %]</label>
</p>
</fieldset>
[% IF field_errors.username_register %]
<p class='form-error'>[% field_errors.username_register %]</p>
[% END %]
<label for="form_email">[% loc('Your email') %]<span class="hidden-js" id="js-optional-email"> [% loc('(optional)') %]</span></label>
[% IF field_errors.email %]
<p class='form-error'>[% field_errors.email %]</p>
[% END %]
<input type="email" name="email" id="form_email" value="[% email %]" class="form-control">
<label for="form_phone">[% loc('Phone number') %]<span class="hidden-js" id="js-optional-phone"> [% loc('(optional)') %]</span></label>
[% IF field_errors.phone %]
<p class='form-error'>[% field_errors.phone %]</p>
[% END %]
<input class="form-control" type="text" value="[% phone %]" name="phone" id="form_phone">
[% ELSE %]
[% PROCESS 'report/form/user_loggedout_email.html' name='username_register' %]
<!-- report/form/user_loggedout_email.html START -->
<!-- user_loggedout_email.html -->
[% IF c.cobrand.sms_authentication %]
[% SET username_label = loc('Your email or mobile') %]
[% SET username_type = 'text' %]
[% ELSE %]
[% SET username_label = loc('Your email') %]
[% SET username_type = 'email' %]
[% END %]
[% SET username_field = (name == 'username_sign_in') ? 'username' : name ~%]
<label for="form_[% name %]">[% username_label %]</label>
[% IF field_errors.$name %]
<p class='form-error'>[% field_errors.$name %]</p>
[% END %]
<input type="[% username_type %]" name="[% username_field %]" id="form_[% name %]"
value="[% c.get_param(username_field) %]"
class="form-control required">
<!-- /user_loggedout_email.html -->
<!-- report/form/user_loggedout_email.html END -->
[% 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="">
[% PROCESS 'auth/form_extra.html' %]
<!-- auth/form_extra.html START -->
<!-- file is empty -->
<!-- auth/form_extra.html END -->
[% PROCESS 'report/form/submit.html' %]
<!-- report/form/submit.html START -->
<input class="desk-only btn btn--primary btn--block btn--final js-submit_register" type="submit" name="submit_register" value="[% loc('Submit') %]">
<input class="mob-only btn btn--primary btn--block btn--final js-submit_register" type="submit" name="submit_register_mobile" value="[% loc('Submit') %]">
<!-- report/form/submit.html END -->
</div>
<!-- /user_loggedout_by_email.html -->
<!-- report/form/user_loggedout_by_email.html END -->
</div>
<!-- /user_loggedout.html -->
<!-- report/form/user_loggedout.html END -->
[% END %]
[% PROCESS 'report/new/form_report.html' %]
<!-- report/new/form_report.html START -->
[% SET form_show_category_only = NOT category || field_errors.category || disable_form_message || have_disable_qn_to_answer %]
[% TRY %][% PROCESS 'report/new/_form_labels.html' %][% CATCH file %][% END %]
<!-- report/new/_form_labels.html START -->
<!-- N/A - file does not exist -->
<!-- report/new/_form_labels.html END -->
[% PROCESS 'report/new/form_public_councils_text.html' ~%]
<!-- report/new/form_public_councils_text.html START -->
[% BLOCK public_councils_text %]
<h2 class="form-section-heading js-hide-if-private-category">[% loc( 'Public details' ) %]</h2>
<h2 class="form-section-heading form-section-heading--private js-hide-if-public-category hidden-js">[% loc( 'Report details' ) %]</h2>
<div class="form-section-description" id="js-councils_text">
[% IF js %]
[% PROCESS 'report/new/councils_text_all.html' list_of_names = [ loc('the local council') ] %]
<!-- report/new/councils_text_all.html START -->
[% IF NOT list_of_names %]
[% SET default_list = [] %][% FOR b IN bodies_to_list.values %][% default_list.push(b.cobrand_name) %][% END %]
[% SET list_of_names = default_list %]
[% END %]
[% category = mark_safe(category) %]
<p>
[% UNLESS non_public_categories.$category;
tprintf(
loc('These will be sent to <strong>%s</strong> and also published online for others to see, in accordance with our <a href="%s">privacy policy</a>.'),
mark_safe(list_of_names.join( '</strong>' _ loc(' or ') _ '<strong>' )), c.cobrand.privacy_policy_url
);
ELSE;
tprintf(
loc('These will be sent to <strong>%s</strong> but not published online.'),
mark_safe(list_of_names.join( '</strong>' _ loc(' or ') _ '<strong>' ))
);
END %]
[% TRY %][% INCLUDE 'report/new/councils_extra_text.html' %][% CATCH file %][% END %]
<!-- report/new/councils_extra_text.html START -->
<!-- N/A - file does not exist -->
<!-- report/new/councils_extra_text.html END -->
</p>
<!-- report/new/councils_text_all.html END -->
[% ELSE %]
[% PROCESS 'report/new/councils_text.html' %]
<!-- report/new/councils_text.html START -->
[% FILTER collapse %]
[% category = mark_safe(category) %]
[% IF unresponsive.$category OR unresponsive.ALL OR bodies_to_list.size == 0 %]
[% tprintf(
loc('These will be published online for others to see, in accordance with our <a href="%s">privacy policy</a>.'),
c.cobrand.privacy_policy_url)
%]
[% ELSE %]
[% PROCESS 'report/new/councils_text_all.html' %]
<!-- report/new/councils_text_all.html START -->
[% IF NOT list_of_names %]
[% SET default_list = [] %][% FOR b IN bodies_to_list.values %][% default_list.push(b.cobrand_name) %][% END %]
[% SET list_of_names = default_list %]
[% END %]
[% category = mark_safe(category) %]
<p>
[% UNLESS non_public_categories.$category;
tprintf(
loc('These will be sent to <strong>%s</strong> and also published online for others to see, in accordance with our <a href="%s">privacy policy</a>.'),
mark_safe(list_of_names.join( '</strong>' _ loc(' or ') _ '<strong>' )), c.cobrand.privacy_policy_url
);
ELSE;
tprintf(
loc('These will be sent to <strong>%s</strong> but not published online.'),
mark_safe(list_of_names.join( '</strong>' _ loc(' or ') _ '<strong>' ))
);
END %]
[% TRY %][% INCLUDE 'report/new/councils_extra_text.html' %][% CATCH file %][% END %]
<!-- report/new/councils_extra_text.html START -->
<!-- N/A - file does not exist -->
<!-- report/new/councils_extra_text.html END -->
</p>
<!-- report/new/councils_text_all.html END -->
[% END %]
[% END -%]
<!-- report/new/councils_text.html END -->
[% END %]
</div>
[% END %]
<!-- report/new/form_public_councils_text.html END -->
<!-- report/new/form_report.html -->
[% INCLUDE 'report/new/form_after_heading.html' %]
<!-- report/new/form_after_heading.html START -->
<!-- N/A - file is empty -->
<!-- report/new/form_after_heading.html END -->
[% IF field_errors.bodies %]
<p class='form-error'>[% field_errors.bodies %]</p>
[% END %]
<div data-page-name="category" class="js-reporting-page js-reporting-page--category js-reporting-page--active">
[% IF public_councils_text_at_top %]
[% INCLUDE public_councils_text %]
[% END %]
[% PROCESS "report/new/category_wrapper.html" %]
<!-- report/new/category_wrapper.html START -->
<div id="form_category_row">
[% IF js %]
<fieldset id="form_category_fieldset"
[%~ 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 ~%]
>
<legend id="form_category_legend">[%~ form_category_label OR loc('Category') ~%]</legend>
[% loc('Loading...') %]
</fieldset>
[% ELSE %]
[% IF category_options.size %]
[% IF field_errors.category %]
<p class='form-error'>[% field_errors.category %]</p>
[% END %]
[% PROCESS "report/new/category.html" %]
<!-- report/new/category.html START -->
[% TRY %][% PROCESS 'report/new/_form_labels.html' %][% CATCH file %][% END ~%]
<!-- report/new/_form_labels.html START -->
<!-- N/A - no such file -->
<!-- report/new/_form_labels.html END -->
[%
# If only one option, pre-select that as if it were already selected. This
# carries through to the category_extras template because this template is
# included with PROCESS.
IF category_options.size == 1;
category = category_options.0.category;
END;
IF category;
category_lc = category | lower;
END
~%]
[% IF category_options.size OR category_groups.size ~%]
[% IF native_app %]
[% INCLUDE 'report/new/category-app.html' %]
<!-- report/new/category-app.html START -->
[% BLOCK category_option %]
[% cat_lc = cat.category | lower =%]
<option value='[% cat.category %]'[% ' selected' IF ( report.category == cat.category || category_lc == cat_lc ) AND ( NOT filter_group OR filter_group == group.name ) ~%]
>[% cat.category_display %]
[%~ IF cat.get_extra_metadata('help_text') %] ([% cat.get_extra_metadata('help_text') %])[% END ~%]
</option>
[% END %]
<label for='form_category' id="form_category_label">
[%~ form_category_label OR loc('Category') ~%]
</label>[% =%]
<select required class="validCategory form-control" name="category" id="form_category">
[%~ INCLUDE 'report/new/_category_select.html' ~%]
<!-- report/new/_category_select.html START -->
[%~ FOREACH group IN category_groups ~%]
[% IF group.name %]<optgroup label="[% group.name %]">[% END %]
[%~ FOREACH cat IN group.categories ~%]
[% INCLUDE category_option %]
[%~ END ~%]
[% IF group.name %]</optgroup>[% END %]
[%~ END =%]
<!-- report/new/_category_select.html END -->
</select>
<!-- report/new/category-app.html END -->
[% ELSE %]
<fieldset class="govuk-radios govuk-radios--small" id="form_category_fieldset"
[%~ 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 ~%]
>
<legend id="form_category_legend">[%~ form_category_label OR loc('Category') ~%]</legend>
[%~ FOREACH group_or_cat IN category_groups ~%]
<div class="govuk-radios__item">
[% IF group_or_cat.name %]
<input class="govuk-radios__input" required id="category_[% group_or_cat.id %]" type="radio" name="category" value="[% group_or_cat.name %]" data-subcategory="[% group_or_cat.id %]"[% ' checked' IF filter_group == group_or_cat.name %]>
<label class="govuk-label govuk-radios__label" for="category_[% group_or_cat.id %]">[% group_or_cat.name %]</label>
[% ELSE # A category not in a group %]
[% cat_lc = group_or_cat.category | lower =%]
<input class="govuk-radios__input" required id="category_[% group_or_cat.id %]" type="radio" name="category" value='[% group_or_cat.category %]'[% ' checked' IF ( report.category == group_or_cat.category || category_lc == cat_lc ) AND NOT filter_group ~%]>
<label class="govuk-label govuk-radios__label" for="category_[% group_or_cat.id %]">[% group_or_cat.category_display %]
[%~ IF group_or_cat.get_extra_metadata('help_text') %]
([% group_or_cat.get_extra_metadata('help_text') %])
[% END ~%]
</label>
[%~ END =%]
</div>
[%~ END =%]
</fieldset>
[% END %]
[%~ END ~%]
<!-- report/new/category.html END -->
[% END %]
[% END %]
</div>
<div class="js-post-category-messages">
[% IF disable_form_message %]
<div id="js-category-stopper" class="box-warning" role="alert" aria-live="assertive">
[% disable_form_message | safe %]
</div>
[% END %]
</div>
<!-- report/new/category_wrapper.html END -->
[% TRY %][% PROCESS 'report/new/after_category.html' %][% CATCH file %][% END %]
<!-- report/new/after_category.html START -->
<!-- N/A - file is empty -->
<!-- report/new/after_category.html END -->
<button class="btn btn--block btn--final hidden-nojs js-reporting-page--next"
[% ' disabled' IF disable_form_message %]>[% loc('Continue') %]</button>
</div>
<div data-page-name="subcategory" class="js-reporting-page js-reporting-page--subcategory js-reporting-page--skip[% ' hidden-nojs' UNLESS filter_group %]">
<div id="form_subcategory_row">
[% IF NOT js %]
[% PROCESS report/new/subcategories.html %]
<!-- report/new/subcategories.html START -->
[% IF category; category_lc = category | lower; END ~%]
[%~ FOREACH group IN category_groups ~%]
[% IF group.name %]
<fieldset class="govuk-radios govuk-radios--small hidden-js[% ' hidden-nojs' UNLESS filter_group == group.name %] js-subcategory" id="subcategory_[% group.id %]">
<legend>[% group.name %]: [% loc('Subcategory') %]</legend>
[%~ FOREACH cat IN group.categories ~%]
[% cat_lc = cat.category | lower =%]
<div class="govuk-radios__item">
<input class="required govuk-radios__input" id="subcategory_[% cat.id %]" type="radio" name="category.[% group.id %]" value='[% cat.category %]'[% ' checked' IF ( report.category == cat.category || category_lc == cat_lc ) AND ( NOT filter_group OR filter_group == group.name ) ~%]>
<label class="govuk-label govuk-radios__label" for="subcategory_[% cat.id %]">[% cat.category_display %]
[%~ IF cat.get_extra_metadata('help_text') %] ([% cat.get_extra_metadata('help_text') %])[% END ~%]
</label>
</div>
[%~ END ~%]
</fieldset>
[% END %]
[%~ END ~%]
<!-- report/new/subcategories.html END -->
[% END %]
</div>
<div class="js-post-category-messages"></div>
<button class="btn btn--block btn--final hidden-nojs js-reporting-page--next">[% loc('Continue') %]</button>
</div>
[% PROCESS "report/new/duplicate_suggestions.html" %]
<!-- report/new/duplicate_suggestions.html START -->
[% IF c.cobrand.suggest_duplicates AND NOT login_success AND NOT oauth_need_email %]
[% extra_js.push(
version('/js/duplicates.js'),
) -%]
<div data-page-name="duplicates" id="js-duplicate-reports" class="js-reporting-page js-reporting-page--duplicates js-reporting-page--skip duplicate-report-suggestions hidden">
<h2 class="form-section-heading">[% loc('Already been reported?') %]</h2>
<div class="form-section-description">
[% IF c.cobrand.is_council %]
<p>[% loc('There are similar problems nearby that we’re already aware of, is one of them yours?') %]</p>
[% ELSE %]
<p>[% loc('We’ve already reported these nearby problems to the council. Is one of them yours?') %]</p>
[% END %]
</div>
<ul class="item-list"></ul>
<button type="button" class="btn btn--block js-reporting-page--next">[% loc('Continue – report a new problem') %]</button>
</div>
<div class="js-template-get-updates hidden">
<div id="alerts" class="get-updates js-alert-list">
<p id="rznvy_hint">
[% IF c.user_exists %]
[% loc('Would you like us to notify you when this problem is updated or fixed?') %]
[% ELSE %]
[% loc('If you let us know your email address, we’ll notify you when this problem is updated or fixed.') %]
[% END %]
</p>
<input type="hidden" name="id" disabled>
<input type="hidden" name="token" value="[% csrf_token %]" disabled>
<input type="hidden" name="type" value="updates" disabled>
[% IF c.user_exists %]
[% IF c.user.has_permission_to('contribute_as_another_user', bodies_ids) %]
<label for="rznvy_input">[% loc('Email') %]</label>
<div class="form-txt-submit-box">
<input type="email" class="form-control" name="rznvy" id="rznvy_input" aria-described-by="rznvy_hint" disabled>
<input type="submit" value="[% loc('Get updates') %]" class="btn" id="alert_email_button">
</div>
[% ELSE %]
<input type="submit" value="[% loc('Get updates') %]" class="btn btn--block" id="alert_email_button">
[% END %]
[% ELSE %]
<label for="rznvy_input">[% loc('Your email') %]</label>
<div class="form-txt-submit-box">
<input type="email" class="form-control" name="rznvy" id="rznvy_input" aria-described-by="rznvy_hint" disabled>
<input type="submit" value="[% loc('Get updates') %]" class="btn" id="alert_email_button">
</div>
[% END %]
</div>
</div>
[% END %]
<!-- report/new/duplicate_suggestions.html END -->
<div data-page-name="extra" id="js-post-category-messages" class="js-reporting-page js-reporting-page--skip">
[%# This section includes 'Pick an asset' text, roadworks info, extra category questions %]
[% IF NOT disable_form_message %]
[% PROCESS "report/new/category_extras.html" %]
<!-- report/new/category_extras.html START -->
[% IF NOT list_of_names %]
[% SET default_list = [] %][% FOR b IN bodies_to_list.values %][% default_list.push(b.cobrand_name) %][% END %]
[% SET list_of_names = default_list %]
[% END %]
[% category = mark_safe(category) %]
<div id="category_meta">
[%- IF unresponsive.$category %]
[%# Note: this is only shown on FMS.com %]
[% INCLUDE "report/new/unresponsive_body.html" body_id = unresponsive.$category %]
<!-- report/new/unresponsive_body.html START -->
<!-- N/A - no such file -->
<!-- report/new/unresponsive_body.html END -->
[%- END %]
[%- IF category_extras.$category.size %]
[% UNLESS category_extras_hidden.$category %]
<div class="extra-category-questions">
[% UNLESS category_extras_notices.$category %]
<h2 class="visuallyhidden form-section-heading">[% loc('Extra details') %]</h2>
<p class="form-section-description">
[% tprintf(
loc('Help <strong>%s</strong> resolve your problem quicker, by providing some extra detail. This extra information will not be published online.'),
mark_safe(list_of_names.join( '</strong>' _ loc(' or ') _ '<strong>' ))
); %]
</p>
[% END %]
[% INCLUDE 'report/new/category_extras_fields.html' metas=category_extras.$category %]
<!-- report/new/category_extras_fields.html START -->
[%- FOR meta IN metas %]
[%- meta_name = meta.code -%]
[%- x_meta_name = 'x' _ meta.code # For report_meta and field_errors lookup, as TT hides codes starting "_" -%]
[% IF c.cobrand.category_extra_hidden(meta) AND NOT show_hidden %]
<input type="hidden" value="[% report_meta.$x_meta_name.value | html %]" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]">
[% ELSIF meta.variable != 'false' || NOT hide_notices %]
<label for="[% cat_prefix %]form_[% meta_name %]">[% (meta.description OR meta.code) | safe %]</label>
[% TRY %][% INCLUDE 'report/new/_category_extra_field_notice.html' %][% CATCH file %][% END %]
[% IF field_errors.$x_meta_name %]
<p class='form-error'>[% field_errors.$x_meta_name %]</p>
[% END -%]
[% IF meta.variable != 'false' %]
[% IF meta.item('values').size %]
<select class="form-control" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>
<option value="">[% loc('-- Pick an option --') %]</option>
[% FOR option IN meta.values %]
<option value="[% option.key %]"[% IF option.key == report_meta.$x_meta_name.value %] selected[% END %]>[% option.name %]</option>
[% END %]
</select>
[% ELSIF meta.datatype == 'text' %]
<textarea class="form-control" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>[% report_meta.$x_meta_name.value %]</textarea>
[% ELSE %]
<input class="form-control" type="[% meta.fieldtype OR 'text' %]" value="[% report_meta.$x_meta_name.value | html %]" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>
[% END %]
[% END %]
[% END %]
[%- END %]
<!-- report/new/category_extras_fields.html END -->
</div>
[% ELSE %]
[% INCLUDE 'report/new/category_extras_fields.html' metas=category_extras.$category %]
<!-- report/new/category_extras_fields.html START -->
[%- FOR meta IN metas %]
[%- meta_name = meta.code -%]
[%- x_meta_name = 'x' _ meta.code # For report_meta and field_errors lookup, as TT hides codes starting "_" -%]
[% IF c.cobrand.category_extra_hidden(meta) AND NOT show_hidden %]
<input type="hidden" value="[% report_meta.$x_meta_name.value | html %]" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]">
[% ELSIF meta.variable != 'false' || NOT hide_notices %]
<label for="[% cat_prefix %]form_[% meta_name %]">[% (meta.description OR meta.code) | safe %]</label>
[% TRY %][% INCLUDE 'report/new/_category_extra_field_notice.html' %][% CATCH file %][% END %]
[% IF field_errors.$x_meta_name %]
<p class='form-error'>[% field_errors.$x_meta_name %]</p>
[% END -%]
[% IF meta.variable != 'false' %]
[% IF meta.item('values').size %]
<select class="form-control" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>
<option value="">[% loc('-- Pick an option --') %]</option>
[% FOR option IN meta.values %]
<option value="[% option.key %]"[% IF option.key == report_meta.$x_meta_name.value %] selected[% END %]>[% option.name %]</option>
[% END %]
</select>
[% ELSIF meta.datatype == 'text' %]
<textarea class="form-control" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>[% report_meta.$x_meta_name.value %]</textarea>
[% ELSE %]
<input class="form-control" type="[% meta.fieldtype OR 'text' %]" value="[% report_meta.$x_meta_name.value | html %]" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>
[% END %]
[% END %]
[% END %]
[%- END %]
<!-- report/new/category_extras_fields.html END -->
[% END %]
[%- END %]
[%- IF report_extra_fields %]
[% FOREACH extras IN report_extra_fields %]
[% cat_prefix = "extra[" _ extras.id _ "]" %]
[% INCLUDE 'report/new/category_extras_fields.html' metas=extras.get_extra_fields %]
<!-- report/new/category_extras_fields.html START -->
[%- FOR meta IN metas %]
[%- meta_name = meta.code -%]
[%- x_meta_name = 'x' _ meta.code # For report_meta and field_errors lookup, as TT hides codes starting "_" -%]
[% IF c.cobrand.category_extra_hidden(meta) AND NOT show_hidden %]
<input type="hidden" value="[% report_meta.$x_meta_name.value | html %]" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]">
[% ELSIF meta.variable != 'false' || NOT hide_notices %]
<label for="[% cat_prefix %]form_[% meta_name %]">[% (meta.description OR meta.code) | safe %]</label>
[% TRY %][% INCLUDE 'report/new/_category_extra_field_notice.html' %][% CATCH file %][% END %]
[% IF field_errors.$x_meta_name %]
<p class='form-error'>[% field_errors.$x_meta_name %]</p>
[% END -%]
[% IF meta.variable != 'false' %]
[% IF meta.item('values').size %]
<select class="form-control" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>
<option value="">[% loc('-- Pick an option --') %]</option>
[% FOR option IN meta.values %]
<option value="[% option.key %]"[% IF option.key == report_meta.$x_meta_name.value %] selected[% END %]>[% option.name %]</option>
[% END %]
</select>
[% ELSIF meta.datatype == 'text' %]
<textarea class="form-control" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>[% report_meta.$x_meta_name.value %]</textarea>
[% ELSE %]
<input class="form-control" type="[% meta.fieldtype OR 'text' %]" value="[% report_meta.$x_meta_name.value | html %]" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>
[% END %]
[% END %]
[% END %]
[%- END %]
<!-- report/new/category_extras_fields.html END -->
[% END %]
[%- END %]
</div>
<!-- report/new/category_extras.html END -->
[% END %]
<div class="js-post-category-messages"></div>
<button class="btn btn--block btn--final hidden-nojs js-reporting-page--next">[% loc('Continue') %]</button>
</div>
[% IF form_show_category_only %]
<div class="hidden-js">
<input class="btn btn--primary btn--block btn--final" type="submit" name="submit_category_part_only" value="[% loc('Submit') %]">
</div>
[% SET field_required = '' %]
[% ELSE %]
[% SET field_required = ' required' %]
[% END %]
[% IF c.cobrand.allow_photo_upload %]
<div data-page-name="photo" class="js-reporting-page[% ' hidden-nojs' IF form_show_category_only %]">
[% PROCESS 'report/form/photo_upload.html' type='report' %]
<!-- report/form/photo_upload.html START -->
[% IF c.cobrand.allow_photo_upload %]
<input type="hidden" name="upload_fileid" value="[% upload_fileid %]">
<label for="form_photo">
<span data-singular="[% loc('Photo') %]" data-plural="[% loc('Photos') %]">[% loc('Photo') %]</span>
[% IF c.cobrand.moniker == 'zurich' %][% loc('(Defect &amp; location of defect)') %][% END %]
[% loc('(optional)') %]
</label>
[% IF field_errors.photo %]
<p class='form-error'>[% field_errors.photo %]</p>
[% END %]
<div id="form_photos">
[% IF upload_fileid %]
[% IF type == 'report' %]
<p>[% loc('You have already attached photos to this report. Note that you can attach a maximum of 3 to this report (if you try to upload more, the oldest will be removed).') %]</p>
[% ELSE %]
<p>[% loc('You have already attached photos to this update. Note that you can attach a maximum of 3 to this update (if you try to upload more, the oldest will be removed).') %]</p>
[% END %]
[% FOREACH id IN upload_fileid.split(',') %]
<img align="right" src="/photo/temp.[% id %]" alt="">
[% END %]
[% END %]
<input type="file" name="photo1" id="form_photo">
<label for="form_photo2">[% loc('Photo') %]</label>
<input type="file" name="photo2" id="form_photo2">
<label for="form_photo3">[% loc('Photo') %]</label>
<input type="file" name="photo3" id="form_photo3">
</div>
[% END %]
<!-- report/form/photo_upload.html END -->
[% PROCESS 'report/new/after_photo.html' %]
<!-- report/new/after_photo.html START -->
<div class="description_tips" aria-label="[% loc('Tips for perfect photos') %]">
<ul class="do">
<li>[% loc('For best results include a close-up and a wide shot') %]</li>
</ul>
<ul class="dont">
<li>[% loc('Avoid personal information and vehicle number plates') %]</li>
</ul>
</div>
<!-- report/new/after_photo.html END -->
<button class="btn btn--block btn--final hidden-nojs js-reporting-page--next">[% loc('Continue') %]</button>
</div>
[% END %]
<div data-page-name="details" class="js-reporting-page[% ' hidden-nojs' IF form_show_category_only %]">
[% UNLESS public_councils_text_at_top %]
[% INCLUDE public_councils_text %]
[% END %]
[% INCLUDE 'report/new/form_title.html' %]
<!-- report/new/form_title.html START -->
[% DEFAULT form_title = loc('Summarise the problem') %]
[% DEFAULT form_title_placeholder = loc('e.g. ‘10 inch pothole on Example St, near post box’') %]
<label for="form_title">[% form_title %]</label>
<p class="form-hint" id="title-hint">[% contact_title_hint OR form_title_placeholder %]</p>
[% IF field_errors.title %]
<p class='form-error'>[% field_errors.title %]</p>
[% END %]
<input class="form-control" type="text" value="[% report.title | html %]" name="title" id="form_title" aria-describedby="title-hint"[% field_required %] autocomplete="off">
<!-- report/new/form_title.html END -->
[% TRY %][% PROCESS 'report/new/after_title.html' %][% CATCH file %][% END %]
<!-- report/new/after_title.html START -->
<!-- N/A - no such file -->
<!-- report/new/after_title.html END -->
[% DEFAULT form_detail_label = loc('Explain what’s wrong') %]
<label for="form_detail">[% form_detail_label %]</label>
[%# You can prevent a hint being printed by setting form_detail_placeholder to a Falsey value %]
[% IF NOT form_detail_placeholder.defined %]
[% SET form_detail_placeholder = loc('e.g. ‘This pothole has been here for two months and…’') %]
[% END %]
[% IF contact_detail_hint %]
<p class="form-hint" id="detail-hint">[% contact_detail_hint %]</p>
[% ELSIF form_detail_placeholder %]
<p class="form-hint" id="detail-hint">[% form_detail_placeholder %]</p>
[% END %]
[% IF field_errors.detail %]
<p class='form-error'>[% field_errors.detail %]</p>
[% END %]
<textarea class="form-control" rows="7" cols="26" name="detail" id="form_detail" [% IF form_detail_placeholder %]aria-describedby="detail-hint"[% END %][% field_required %]>[% report.detail | html %]</textarea>
[% TRY %][% PROCESS 'report/new/inline-tips.html' %][% CATCH file %][% END %]
<!-- report/new/inline-tips.html START -->
<!-- N/A - no such file -->
<!-- report/new/inline-tips.html END -->
<div class="js-reporting-page--single-hidden">
[% PROCESS report/form/user.html type='report' %]
<!-- report/form/user.html START -->
<!-- report/form/user.html -->
<div class="[% IF type != 'report' %]js-new-report-user-hidden[% END %]
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 type="button" class="btn btn--block hidden-nojs js-reporting-page--next[% IF type != 'report' %] js-new-report-user-show[% END %]">[% loc('Continue') %]</button>
[% ELSE %]
[% IF c.config.FACEBOOK_APP_ID %]
<button name="social_sign_in" id="facebook_sign_in" value="facebook" 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.cobrand.feature('oidc_login') %]
<button name="social_sign_in" id="oidc_sign_in" value="oidc" class="btn btn--block btn--social btn--oidc">
[% tprintf(loc('Login with %s'), c.cobrand.feature('oidc_login').display_name) %]
</button>
[% END %]
[% IF c.config.TWITTER_KEY %]
<button name="social_sign_in" id="twitter_sign_in" value="twitter" 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 type="button" class="btn btn--block hidden-nojs js-reporting-page--next[% IF type != 'report' %] js-new-report-user-show[% END %]">[% loc('Log in with email') %]</button>
[% END %]
<div class="js-show-if-anonymous
[%~ ' hidden-js' UNLESS type == 'report' AND c.cobrand.allow_anonymous_reports == 'button' %]">
<small id="or">[% loc('or') %]</small>
<button name="report_anonymously" value="yes" class="btn btn--block js-new-report-submit">[% loc('Report anonymously') %]</button>
<small>[% loc('No personal details will be stored, and you will not receive updates about this report.') %]</small>
</div>
</div>
[% IF (c.user_exists OR NOT c.cobrand.social_auth_enabled) AND type == 'report' AND c.cobrand.allow_anonymous_reports == 'button' %]
<div class="form-section-preview form-section-preview--next hidden-js">
<button name="report_anonymously" value="yes" class="btn btn--block">[% loc('Report anonymously') %]</button>
<small>[% loc('No personal details will be stored, and you will not receive updates about this report.') %]</small>
<small id="or">[% loc('or') %]</small>
</div>
[% END %]
<!-- /report/form/user.html -->
<!-- report/form/user.html END -->
</div>
</div>
[% IF partial_token %]
<input type="hidden" name="partial" value="[% partial_token.token %]">
[% END %]
<input type="hidden" id="single_body_only" name="single_body_only" value="">
<input type="hidden" id="do_not_send" name="do_not_send" value="">
<input type="hidden" name="submit_problem" value="1">
<input type="hidden" id="form_service" name="service" value="">
<!-- /report/new/form_report.html -->
<!-- report/new/form_report.html END -->
[% PROCESS 'report/form/submit.html' %]
<!-- report/form/submit.html START -->
<input class="desk-only btn btn--primary btn--block btn--final js-submit_register" type="submit" name="submit_register" value="[% loc('Submit') %]">
<input class="mob-only btn btn--primary btn--block btn--final js-submit_register" type="submit" name="submit_register_mobile" value="[% loc('Submit') %]">
<!-- report/form/submit.html END -->
</div>
</fieldset>
<!-- report/new/login_success_form.html END -->
[% ELSIF oauth_need_email %]
[% PROCESS 'report/new/oauth_email_form.html' %]
<!-- report/new/oauth_email_form.html START -->
[% PROCESS 'report/new/form_heading.html' %]
<!-- report/new/form_heading.html START -->
<h1>[% loc('Report your problem') %]</h1>
<!-- report/new/form_heading.html END -->
<p class="form-error">
[% loc('Please note your report has <strong>not yet been sent</strong>.') %]
[% loc('We need your email address, please give it below.') %]
</p>
[% sidebar_html | safe %]
[% INCLUDE 'errors.html' %]
<!-- errors.html START -->
[% FOREACH error IN errors %]
[% '<ul class="error">' IF loop.first %]
<li>[% error %]</li>
[% '</ul>' IF loop.last %]
[% END %]
<!-- errors.html END -->
<fieldset>
<div id="problem_form" class="js-reporting-page--single">
<div id="form_sign_in">
[% PROCESS 'report/form/user_loggedout_by_email.html' object=report type='report' email_required=1 %]
<!-- report/form/user_loggedout_by_email.html START -->
<!-- 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' %]
<!-- report/form/user_loggedout_by_email_heading.html START -->
[% IF c.cobrand.sms_authentication %]
[% IF type == 'update' %]
<h3 class="hidden-js">[% loc('<strong>No</strong> Let me confirm my update by email/text') %]</h3>
[% ELSE %]
<h3 class="hidden-js">[% loc('<strong>No</strong> Let me confirm my report by email/text') %]</h3>
[% END %]
[% ELSE %]
[% IF type == 'update' %]
<h3 class="hidden-js">[% loc('<strong>No</strong> Let me confirm my update by email') %]</h3>
[% ELSE %]
<h3 class="hidden-js">[% loc('<strong>No</strong> Let me confirm my report by email') %]</h3>
[% END %]
[% END %]
<!-- report/form/user_loggedout_by_email_heading.html END -->
[% INCLUDE 'report/new/extra_name.html' %]
<!-- report/new/extra_name.html START -->
[% IF extra_name_info %]
<label for="form_fms_extra_title">Title</label>
[% IF field_errors.fms_extra_title %]
<p class='form-error'>[% field_errors.fms_extra_title %]</p>
[% END %]
[% 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 required js-form-name" id="form_fms_extra_title"
name="fms_extra_title">
<option></option>
<option value="MR"[% ' selected' IF title == 'MR' %]>Mr</option>
<option value="MISS"[% ' selected' IF title == 'MISS' %]>Miss</option>
<option value="MRS"[% ' selected' IF title == 'MRS' %]>Mrs</option>
<option value="MS"[% ' selected' IF title == 'MS' %]>Ms</option>
<option value="DR"[% ' selected' IF title == 'DR' %]>Dr</option>
</select>
[% END %]
<!-- report/new/extra_name.html END -->
[% PROCESS 'user/_anonymity.html' anonymous = object.anonymous %]
<!-- user/_anonymity.html START -->
[%
IF anonymous=='';
IF c.user_exists;
SET name_public = NOT c.user.latest_anonymity;
ELSE;
SET name_public = c.cobrand.default_show_name;
END;
ELSE;
SET name_public = anonymous==0;
END
%]
<!-- user/_anonymity.html END -->
[% INCLUDE 'report/form/user_name.html' %]
<!-- report/form/user_name.html START -->
<!-- user_name.html -->
<label for="form_name">[% loc('Name') %]
[% TRY %]
[% INCLUDE 'report/form/after_name.html' %]
<!-- report/form/after_name.html START -->
<!-- N/A - there is no report/form/after_name.html file -->
<!-- report/form/after_name.html END -->
[% 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 -->
<!-- report/form/user_name.html END -->
[% INCLUDE 'report/_show_name_label.html' %]
<!-- report/_show_name_label.html START -->
<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>
<!-- report/_show_name_label.html END -->
[% IF type != 'update' %]
[% IF NOT c.cobrand.call_hook('disable_phone_number_entry') AND NOT c.cobrand.sms_authentication %]
<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">
[% 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 type != 'update' AND c.cobrand.sms_authentication AND NOT c.cobrand.call_hook('disable_phone_number_entry') %]
<fieldset>
<legend>How would you like to receive updates?</legend>
[% IF field_errors.update_method %]
<p class='form-error'>[% field_errors.update_method %]</p>
[% END %]
<p class="segmented-control segmented-control--radio">
<input required type="radio" name="update_method" id="update_method_email"
data-show="#js-optional-phone" data-hide="#js-optional-email"
value="email"[% ' checked' IF update_method == 'email' %]>
<label class="btn" for="update_method_email">[% loc('Email') %]</label>
<input type="radio" name="update_method" id="update_method_phone"
data-show="#js-optional-email" data-hide="#js-optional-phone"
value="phone"[% ' checked' IF update_method == 'phone' %]>
<label class="btn" for="update_method_phone">[% loc('Phone') %]</label>
</p>
</fieldset>
[% IF field_errors.username_register %]
<p class='form-error'>[% field_errors.username_register %]</p>
[% END %]
<label for="form_email">[% loc('Your email') %]<span class="hidden-js" id="js-optional-email"> [% loc('(optional)') %]</span></label>
[% IF field_errors.email %]
<p class='form-error'>[% field_errors.email %]</p>
[% END %]
<input type="email" name="email" id="form_email" value="[% email %]" class="form-control">
<label for="form_phone">[% loc('Phone number') %]<span class="hidden-js" id="js-optional-phone"> [% loc('(optional)') %]</span></label>
[% IF field_errors.phone %]
<p class='form-error'>[% field_errors.phone %]</p>
[% END %]
<input class="form-control" type="text" value="[% phone %]" name="phone" id="form_phone">
[% ELSE %]
[% PROCESS 'report/form/user_loggedout_email.html' name='username_register' %]
<!-- report/form/user_loggedout_email.html START -->
<!-- user_loggedout_email.html -->
[% IF c.cobrand.sms_authentication %]
[% SET username_label = loc('Your email or mobile') %]
[% SET username_type = 'text' %]
[% ELSE %]
[% SET username_label = loc('Your email') %]
[% SET username_type = 'email' %]
[% END %]
[% SET username_field = (name == 'username_sign_in') ? 'username' : name ~%]
<label for="form_[% name %]">[% username_label %]</label>
[% IF field_errors.$name %]
<p class='form-error'>[% field_errors.$name %]</p>
[% END %]
<input type="[% username_type %]" name="[% username_field %]" id="form_[% name %]"
value="[% c.get_param(username_field) %]"
class="form-control required">
<!-- /user_loggedout_email.html -->
<!-- report/form/user_loggedout_email.html END -->
[% 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="">
[% PROCESS 'auth/form_extra.html' %]
<!-- auth/form_extra.html START -->
<!-- file is empty -->
<!-- auth/form_extra.html END -->
[% PROCESS 'report/form/submit.html' %]
<!-- report/form/submit.html START -->
<input class="desk-only btn btn--primary btn--block btn--final js-submit_register" type="submit" name="submit_register" value="[% loc('Submit') %]">
<input class="mob-only btn btn--primary btn--block btn--final js-submit_register" type="submit" name="submit_register_mobile" value="[% loc('Submit') %]">
<!-- report/form/submit.html END -->
</div>
<!-- /user_loggedout_by_email.html -->
<!-- report/form/user_loggedout_by_email.html END -->
</div>
<input type="hidden" name="oauth_need_email" value="1">
[% PROCESS 'report/new/form_report.html' %]
<!-- report/new/form_report.html START -->
[% SET form_show_category_only = NOT category || field_errors.category || disable_form_message || have_disable_qn_to_answer %]
[% TRY %][% PROCESS 'report/new/_form_labels.html' %][% CATCH file %][% END %]
<!-- report/new/_form_labels.html START -->
<!-- N/A - no such file -->
<!-- report/new/_form_labels.html END -->
[% PROCESS 'report/new/form_public_councils_text.html' ~%]
<!-- report/new/form_public_councils_text.html START -->
[% BLOCK public_councils_text %]
<h2 class="form-section-heading js-hide-if-private-category">[% loc( 'Public details' ) %]</h2>
<h2 class="form-section-heading form-section-heading--private js-hide-if-public-category hidden-js">[% loc( 'Report details' ) %]</h2>
<div class="form-section-description" id="js-councils_text">
[% IF js %]
[% PROCESS 'report/new/councils_text_all.html' list_of_names = [ loc('the local council') ] %]
<!-- report/new/councils_text_all.html START -->
[% IF NOT list_of_names %]
[% SET default_list = [] %][% FOR b IN bodies_to_list.values %][% default_list.push(b.cobrand_name) %][% END %]
[% SET list_of_names = default_list %]
[% END %]
[% category = mark_safe(category) %]
<p>
[% UNLESS non_public_categories.$category;
tprintf(
loc('These will be sent to <strong>%s</strong> and also published online for others to see, in accordance with our <a href="%s">privacy policy</a>.'),
mark_safe(list_of_names.join( '</strong>' _ loc(' or ') _ '<strong>' )), c.cobrand.privacy_policy_url
);
ELSE;
tprintf(
loc('These will be sent to <strong>%s</strong> but not published online.'),
mark_safe(list_of_names.join( '</strong>' _ loc(' or ') _ '<strong>' ))
);
END %]
[% TRY %][% INCLUDE 'report/new/councils_extra_text.html' %][% CATCH file %][% END %]
<!-- report/new/councils_extra_text.html START -->
<!-- N/A - no such file -->
<!-- report/new/councils_extra_text.html END -->
</p>
<!-- report/new/councils_text_all.html END -->
[% ELSE %]
[% PROCESS 'report/new/councils_text.html' %]
<!-- report/new/councils_text.html START -->
[% FILTER collapse %]
[% category = mark_safe(category) %]
[% IF unresponsive.$category OR unresponsive.ALL OR bodies_to_list.size == 0 %]
[% tprintf(
loc('These will be published online for others to see, in accordance with our <a href="%s">privacy policy</a>.'),
c.cobrand.privacy_policy_url)
%]
[% ELSE %]
[% PROCESS 'report/new/councils_text_all.html' %]
<!-- report/new/councils_text_all.html START -->
[% IF NOT list_of_names %]
[% SET default_list = [] %][% FOR b IN bodies_to_list.values %][% default_list.push(b.cobrand_name) %][% END %]
[% SET list_of_names = default_list %]
[% END %]
[% category = mark_safe(category) %]
<p>
[% UNLESS non_public_categories.$category;
tprintf(
loc('These will be sent to <strong>%s</strong> and also published online for others to see, in accordance with our <a href="%s">privacy policy</a>.'),
mark_safe(list_of_names.join( '</strong>' _ loc(' or ') _ '<strong>' )), c.cobrand.privacy_policy_url
);
ELSE;
tprintf(
loc('These will be sent to <strong>%s</strong> but not published online.'),
mark_safe(list_of_names.join( '</strong>' _ loc(' or ') _ '<strong>' ))
);
END %]
[% TRY %][% INCLUDE 'report/new/councils_extra_text.html' %][% CATCH file %][% END %]
<!-- report/new/councils_extra_text.html START -->
<!-- N/A - no such file -->
<!-- report/new/councils_extra_text.html END -->
</p>
<!-- report/new/councils_text_all.html END -->
[% END %]
[% END -%]
<!-- report/new/councils_text.html END -->
[% END %]
</div>
[% END %]
<!-- report/new/form_public_councils_text.html END -->
<!-- report/new/form_report.html -->
[% INCLUDE 'report/new/form_after_heading.html' %]
<!-- report/new/form_after_heading.html START -->
<!-- N/A - file is empty -->
<!-- report/new/form_after_heading.html END -->
[% IF field_errors.bodies %]
<p class='form-error'>[% field_errors.bodies %]</p>
[% END %]
<div data-page-name="category" class="js-reporting-page js-reporting-page--category js-reporting-page--active">
[% IF public_councils_text_at_top %]
[% INCLUDE public_councils_text %]
[% END %]
[% PROCESS "report/new/category_wrapper.html" %]
<!-- report/new/category_wrapper.html START -->
<div id="form_category_row">
[% IF js %]
<fieldset id="form_category_fieldset"
[%~ 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 ~%]
>
<legend id="form_category_legend">[%~ form_category_label OR loc('Category') ~%]</legend>
[% loc('Loading...') %]
</fieldset>
[% ELSE %]
[% IF category_options.size %]
[% IF field_errors.category %]
<p class='form-error'>[% field_errors.category %]</p>
[% END %]
[% PROCESS "report/new/category.html" %]
<!-- report/new/category.html START -->
[% TRY %][% PROCESS 'report/new/_form_labels.html' %][% CATCH file %][% END ~%]
<!-- report/new/_form_labels.html START -->
<!-- N/A - no such file -->
<!-- report/new/_form_labels.html END -->
[%
# If only one option, pre-select that as if it were already selected. This
# carries through to the category_extras template because this template is
# included with PROCESS.
IF category_options.size == 1;
category = category_options.0.category;
END;
IF category;
category_lc = category | lower;
END
~%]
[% IF category_options.size OR category_groups.size ~%]
[% IF native_app %]
[% INCLUDE 'report/new/category-app.html' %]
<!-- report/new/category-app.html START -->
[% BLOCK category_option %]
[% cat_lc = cat.category | lower =%]
<option value='[% cat.category %]'[% ' selected' IF ( report.category == cat.category || category_lc == cat_lc ) AND ( NOT filter_group OR filter_group == group.name ) ~%]
>[% cat.category_display %]
[%~ IF cat.get_extra_metadata('help_text') %] ([% cat.get_extra_metadata('help_text') %])[% END ~%]
</option>
[% END %]
<label for='form_category' id="form_category_label">
[%~ form_category_label OR loc('Category') ~%]
</label>[% =%]
<select required class="validCategory form-control" name="category" id="form_category">
[%~ INCLUDE 'report/new/_category_select.html' ~%]
<!-- report/new/_category_select.html START -->
[%~ FOREACH group IN category_groups ~%]
[% IF group.name %]<optgroup label="[% group.name %]">[% END %]
[%~ FOREACH cat IN group.categories ~%]
[% INCLUDE category_option %]
[%~ END ~%]
[% IF group.name %]</optgroup>[% END %]
[%~ END =%]
<!-- report/new/_category_select.html END -->
</select>
<!-- report/new/category-app.html END -->
[% ELSE %]
<fieldset class="govuk-radios govuk-radios--small" id="form_category_fieldset"
[%~ 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 ~%]
>
<legend id="form_category_legend">[%~ form_category_label OR loc('Category') ~%]</legend>
[%~ FOREACH group_or_cat IN category_groups ~%]
<div class="govuk-radios__item">
[% IF group_or_cat.name %]
<input class="govuk-radios__input" required id="category_[% group_or_cat.id %]" type="radio" name="category" value="[% group_or_cat.name %]" data-subcategory="[% group_or_cat.id %]"[% ' checked' IF filter_group == group_or_cat.name %]>
<label class="govuk-label govuk-radios__label" for="category_[% group_or_cat.id %]">[% group_or_cat.name %]</label>
[% ELSE # A category not in a group %]
[% cat_lc = group_or_cat.category | lower =%]
<input class="govuk-radios__input" required id="category_[% group_or_cat.id %]" type="radio" name="category" value='[% group_or_cat.category %]'[% ' checked' IF ( report.category == group_or_cat.category || category_lc == cat_lc ) AND NOT filter_group ~%]>
<label class="govuk-label govuk-radios__label" for="category_[% group_or_cat.id %]">[% group_or_cat.category_display %]
[%~ IF group_or_cat.get_extra_metadata('help_text') %]
([% group_or_cat.get_extra_metadata('help_text') %])
[% END ~%]
</label>
[%~ END =%]
</div>
[%~ END =%]
</fieldset>
[% END %]
[%~ END ~%]
<!-- report/new/category.html END -->
[% END %]
[% END %]
</div>
<div class="js-post-category-messages">
[% IF disable_form_message %]
<div id="js-category-stopper" class="box-warning" role="alert" aria-live="assertive">
[% disable_form_message | safe %]
</div>
[% END %]
</div>
<!-- report/new/category_wrapper.html END -->
[% TRY %][% PROCESS 'report/new/after_category.html' %][% CATCH file %][% END %]
<!-- report/new/after_category.html START -->
<!-- N/A - no such file -->
<!-- report/new/after_category.html END -->
<button class="btn btn--block btn--final hidden-nojs js-reporting-page--next"
[% ' disabled' IF disable_form_message %]>[% loc('Continue') %]</button>
</div>
<div data-page-name="subcategory" class="js-reporting-page js-reporting-page--subcategory js-reporting-page--skip[% ' hidden-nojs' UNLESS filter_group %]">
<div id="form_subcategory_row">
[% IF NOT js %]
[% PROCESS report/new/subcategories.html %]
<!-- report/new/subcategories.html START -->
[% IF category; category_lc = category | lower; END ~%]
[%~ FOREACH group IN category_groups ~%]
[% IF group.name %]
<fieldset class="govuk-radios govuk-radios--small hidden-js[% ' hidden-nojs' UNLESS filter_group == group.name %] js-subcategory" id="subcategory_[% group.id %]">
<legend>[% group.name %]: [% loc('Subcategory') %]</legend>
[%~ FOREACH cat IN group.categories ~%]
[% cat_lc = cat.category | lower =%]
<div class="govuk-radios__item">
<input class="required govuk-radios__input" id="subcategory_[% cat.id %]" type="radio" name="category.[% group.id %]" value='[% cat.category %]'[% ' checked' IF ( report.category == cat.category || category_lc == cat_lc ) AND ( NOT filter_group OR filter_group == group.name ) ~%]>
<label class="govuk-label govuk-radios__label" for="subcategory_[% cat.id %]">[% cat.category_display %]
[%~ IF cat.get_extra_metadata('help_text') %] ([% cat.get_extra_metadata('help_text') %])[% END ~%]
</label>
</div>
[%~ END ~%]
</fieldset>
[% END %]
[%~ END ~%]
<!-- report/new/subcategories.html END -->
[% END %]
</div>
<div class="js-post-category-messages"></div>
<button class="btn btn--block btn--final hidden-nojs js-reporting-page--next">[% loc('Continue') %]</button>
</div>
[% PROCESS "report/new/duplicate_suggestions.html" %]
<!-- report/new/duplicate_suggestions.html START -->
[% IF c.cobrand.suggest_duplicates AND NOT login_success AND NOT oauth_need_email %]
[% extra_js.push(
version('/js/duplicates.js'),
) -%]
<div data-page-name="duplicates" id="js-duplicate-reports" class="js-reporting-page js-reporting-page--duplicates js-reporting-page--skip duplicate-report-suggestions hidden">
<h2 class="form-section-heading">[% loc('Already been reported?') %]</h2>
<div class="form-section-description">
[% IF c.cobrand.is_council %]
<p>[% loc('There are similar problems nearby that we’re already aware of, is one of them yours?') %]</p>
[% ELSE %]
<p>[% loc('We’ve already reported these nearby problems to the council. Is one of them yours?') %]</p>
[% END %]
</div>
<ul class="item-list"></ul>
<button type="button" class="btn btn--block js-reporting-page--next">[% loc('Continue – report a new problem') %]</button>
</div>
<div class="js-template-get-updates hidden">
<div id="alerts" class="get-updates js-alert-list">
<p id="rznvy_hint">
[% IF c.user_exists %]
[% loc('Would you like us to notify you when this problem is updated or fixed?') %]
[% ELSE %]
[% loc('If you let us know your email address, we’ll notify you when this problem is updated or fixed.') %]
[% END %]
</p>
<input type="hidden" name="id" disabled>
<input type="hidden" name="token" value="[% csrf_token %]" disabled>
<input type="hidden" name="type" value="updates" disabled>
[% IF c.user_exists %]
[% IF c.user.has_permission_to('contribute_as_another_user', bodies_ids) %]
<label for="rznvy_input">[% loc('Email') %]</label>
<div class="form-txt-submit-box">
<input type="email" class="form-control" name="rznvy" id="rznvy_input" aria-described-by="rznvy_hint" disabled>
<input type="submit" value="[% loc('Get updates') %]" class="btn" id="alert_email_button">
</div>
[% ELSE %]
<input type="submit" value="[% loc('Get updates') %]" class="btn btn--block" id="alert_email_button">
[% END %]
[% ELSE %]
<label for="rznvy_input">[% loc('Your email') %]</label>
<div class="form-txt-submit-box">
<input type="email" class="form-control" name="rznvy" id="rznvy_input" aria-described-by="rznvy_hint" disabled>
<input type="submit" value="[% loc('Get updates') %]" class="btn" id="alert_email_button">
</div>
[% END %]
</div>
</div>
[% END %]
<!-- report/new/duplicate_suggestions.html END -->
<div data-page-name="extra" id="js-post-category-messages" class="js-reporting-page js-reporting-page--skip">
[%# This section includes 'Pick an asset' text, roadworks info, extra category questions %]
[% IF NOT disable_form_message %]
[% PROCESS "report/new/category_extras.html" %]
<!-- report/new/category_extras.html START -->
[% IF NOT list_of_names %]
[% SET default_list = [] %][% FOR b IN bodies_to_list.values %][% default_list.push(b.cobrand_name) %][% END %]
[% SET list_of_names = default_list %]
[% END %]
[% category = mark_safe(category) %]
<div id="category_meta">
[%- IF unresponsive.$category %]
[%# Note: this is only shown on FMS.com %]
[% INCLUDE "report/new/unresponsive_body.html" body_id = unresponsive.$category %]
<!-- report/new/unresponsive_body.html START -->
<!-- N/A - no such file -->
<!-- report/new/unresponsive_body.html END -->
[%- END %]
[%- IF category_extras.$category.size %]
[% UNLESS category_extras_hidden.$category %]
<div class="extra-category-questions">
[% UNLESS category_extras_notices.$category %]
<h2 class="visuallyhidden form-section-heading">[% loc('Extra details') %]</h2>
<p class="form-section-description">
[% tprintf(
loc('Help <strong>%s</strong> resolve your problem quicker, by providing some extra detail. This extra information will not be published online.'),
mark_safe(list_of_names.join( '</strong>' _ loc(' or ') _ '<strong>' ))
); %]
</p>
[% END %]
[% INCLUDE 'report/new/category_extras_fields.html' metas=category_extras.$category %]
<!-- report/new/category_extras_fields.html START -->
[%- FOR meta IN metas %]
[%- meta_name = meta.code -%]
[%- x_meta_name = 'x' _ meta.code # For report_meta and field_errors lookup, as TT hides codes starting "_" -%]
[% IF c.cobrand.category_extra_hidden(meta) AND NOT show_hidden %]
<input type="hidden" value="[% report_meta.$x_meta_name.value | html %]" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]">
[% ELSIF meta.variable != 'false' || NOT hide_notices %]
<label for="[% cat_prefix %]form_[% meta_name %]">[% (meta.description OR meta.code) | safe %]</label>
[% TRY %][% INCLUDE 'report/new/_category_extra_field_notice.html' %][% CATCH file %][% END %]
<!-- report/new/_category_extra_field_notice.html START -->
<!-- N/A - no such file -->
<!-- report/new/_category_extra_field_notice.html END -->
[% IF field_errors.$x_meta_name %]
<p class='form-error'>[% field_errors.$x_meta_name %]</p>
[% END -%]
[% IF meta.variable != 'false' %]
[% IF meta.item('values').size %]
<select class="form-control" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>
<option value="">[% loc('-- Pick an option --') %]</option>
[% FOR option IN meta.values %]
<option value="[% option.key %]"[% IF option.key == report_meta.$x_meta_name.value %] selected[% END %]>[% option.name %]</option>
[% END %]
</select>
[% ELSIF meta.datatype == 'text' %]
<textarea class="form-control" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>[% report_meta.$x_meta_name.value %]</textarea>
[% ELSE %]
<input class="form-control" type="[% meta.fieldtype OR 'text' %]" value="[% report_meta.$x_meta_name.value | html %]" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>
[% END %]
[% END %]
[% END %]
[%- END %]
<!-- report/new/category_extras_fields.html END -->
</div>
[% ELSE %]
[% INCLUDE 'report/new/category_extras_fields.html' metas=category_extras.$category %]
<!-- report/new/category_extras_fields.html START -->
[%- FOR meta IN metas %]
[%- meta_name = meta.code -%]
[%- x_meta_name = 'x' _ meta.code # For report_meta and field_errors lookup, as TT hides codes starting "_" -%]
[% IF c.cobrand.category_extra_hidden(meta) AND NOT show_hidden %]
<input type="hidden" value="[% report_meta.$x_meta_name.value | html %]" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]">
[% ELSIF meta.variable != 'false' || NOT hide_notices %]
<label for="[% cat_prefix %]form_[% meta_name %]">[% (meta.description OR meta.code) | safe %]</label>
[% TRY %][% INCLUDE 'report/new/_category_extra_field_notice.html' %][% CATCH file %][% END %]
<!-- report/new/_category_extra_field_notice.html START -->
<!-- N/A - no such file -->
<!-- report/new/_category_extra_field_notice.html END -->
[% IF field_errors.$x_meta_name %]
<p class='form-error'>[% field_errors.$x_meta_name %]</p>
[% END -%]
[% IF meta.variable != 'false' %]
[% IF meta.item('values').size %]
<select class="form-control" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>
<option value="">[% loc('-- Pick an option --') %]</option>
[% FOR option IN meta.values %]
<option value="[% option.key %]"[% IF option.key == report_meta.$x_meta_name.value %] selected[% END %]>[% option.name %]</option>
[% END %]
</select>
[% ELSIF meta.datatype == 'text' %]
<textarea class="form-control" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>[% report_meta.$x_meta_name.value %]</textarea>
[% ELSE %]
<input class="form-control" type="[% meta.fieldtype OR 'text' %]" value="[% report_meta.$x_meta_name.value | html %]" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>
[% END %]
[% END %]
[% END %]
[%- END %]
<!-- report/new/category_extras_fields.html END -->
[% END %]
[%- END %]
[%- IF report_extra_fields %]
[% FOREACH extras IN report_extra_fields %]
[% cat_prefix = "extra[" _ extras.id _ "]" %]
[% INCLUDE 'report/new/category_extras_fields.html' metas=extras.get_extra_fields %]
<!-- report/new/category_extras_fields.html START -->
[%- FOR meta IN metas %]
[%- meta_name = meta.code -%]
[%- x_meta_name = 'x' _ meta.code # For report_meta and field_errors lookup, as TT hides codes starting "_" -%]
[% IF c.cobrand.category_extra_hidden(meta) AND NOT show_hidden %]
<input type="hidden" value="[% report_meta.$x_meta_name.value | html %]" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]">
[% ELSIF meta.variable != 'false' || NOT hide_notices %]
<label for="[% cat_prefix %]form_[% meta_name %]">[% (meta.description OR meta.code) | safe %]</label>
[% TRY %][% INCLUDE 'report/new/_category_extra_field_notice.html' %][% CATCH file %][% END %]
<!-- report/new/_category_extra_field_notice.html START -->
<!-- N/A - no such file -->
<!-- report/new/_category_extra_field_notice.html END -->
[% IF field_errors.$x_meta_name %]
<p class='form-error'>[% field_errors.$x_meta_name %]</p>
[% END -%]
[% IF meta.variable != 'false' %]
[% IF meta.item('values').size %]
<select class="form-control" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>
<option value="">[% loc('-- Pick an option --') %]</option>
[% FOR option IN meta.values %]
<option value="[% option.key %]"[% IF option.key == report_meta.$x_meta_name.value %] selected[% END %]>[% option.name %]</option>
[% END %]
</select>
[% ELSIF meta.datatype == 'text' %]
<textarea class="form-control" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>[% report_meta.$x_meta_name.value %]</textarea>
[% ELSE %]
<input class="form-control" type="[% meta.fieldtype OR 'text' %]" value="[% report_meta.$x_meta_name.value | html %]" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>
[% END %]
[% END %]
[% END %]
[%- END %]
<!-- report/new/category_extras_fields.html END -->
[% END %]
[%- END %]
</div>
<!-- report/new/category_extras.html END -->
[% END %]
<div class="js-post-category-messages"></div>
<button class="btn btn--block btn--final hidden-nojs js-reporting-page--next">[% loc('Continue') %]</button>
</div>
[% IF form_show_category_only %]
<div class="hidden-js">
<input class="btn btn--primary btn--block btn--final" type="submit" name="submit_category_part_only" value="[% loc('Submit') %]">
</div>
[% SET field_required = '' %]
[% ELSE %]
[% SET field_required = ' required' %]
[% END %]
[% IF c.cobrand.allow_photo_upload %]
<div data-page-name="photo" class="js-reporting-page[% ' hidden-nojs' IF form_show_category_only %]">
[% PROCESS 'report/form/photo_upload.html' type='report' %]
<!-- report/form/photo_upload.html START -->
[% IF c.cobrand.allow_photo_upload %]
<input type="hidden" name="upload_fileid" value="[% upload_fileid %]">
<label for="form_photo">
<span data-singular="[% loc('Photo') %]" data-plural="[% loc('Photos') %]">[% loc('Photo') %]</span>
[% IF c.cobrand.moniker == 'zurich' %][% loc('(Defect &amp; location of defect)') %][% END %]
[% loc('(optional)') %]
</label>
[% IF field_errors.photo %]
<p class='form-error'>[% field_errors.photo %]</p>
[% END %]
<div id="form_photos">
[% IF upload_fileid %]
[% IF type == 'report' %]
<p>[% loc('You have already attached photos to this report. Note that you can attach a maximum of 3 to this report (if you try to upload more, the oldest will be removed).') %]</p>
[% ELSE %]
<p>[% loc('You have already attached photos to this update. Note that you can attach a maximum of 3 to this update (if you try to upload more, the oldest will be removed).') %]</p>
[% END %]
[% FOREACH id IN upload_fileid.split(',') %]
<img align="right" src="/photo/temp.[% id %]" alt="">
[% END %]
[% END %]
<input type="file" name="photo1" id="form_photo">
<label for="form_photo2">[% loc('Photo') %]</label>
<input type="file" name="photo2" id="form_photo2">
<label for="form_photo3">[% loc('Photo') %]</label>
<input type="file" name="photo3" id="form_photo3">
</div>
[% END %]
<!-- report/form/photo_upload.html END -->
[% PROCESS 'report/new/after_photo.html' %]
<!-- report/new/after_photo.html START -->
<div class="description_tips" aria-label="[% loc('Tips for perfect photos') %]">
<ul class="do">
<li>[% loc('For best results include a close-up and a wide shot') %]</li>
</ul>
<ul class="dont">
<li>[% loc('Avoid personal information and vehicle number plates') %]</li>
</ul>
</div>
<!-- report/new/after_photo.html END -->
<button class="btn btn--block btn--final hidden-nojs js-reporting-page--next">[% loc('Continue') %]</button>
</div>
[% END %]
<div data-page-name="details" class="js-reporting-page[% ' hidden-nojs' IF form_show_category_only %]">
[% UNLESS public_councils_text_at_top %]
[% INCLUDE public_councils_text %]
[% END %]
[% INCLUDE 'report/new/form_title.html' %]
<!-- report/new/form_title.html START -->
[% DEFAULT form_title = loc('Summarise the problem') %]
[% DEFAULT form_title_placeholder = loc('e.g. ‘10 inch pothole on Example St, near post box’') %]
<label for="form_title">[% form_title %]</label>
<p class="form-hint" id="title-hint">[% contact_title_hint OR form_title_placeholder %]</p>
[% IF field_errors.title %]
<p class='form-error'>[% field_errors.title %]</p>
[% END %]
<input class="form-control" type="text" value="[% report.title | html %]" name="title" id="form_title" aria-describedby="title-hint"[% field_required %] autocomplete="off">
<!-- report/new/form_title.html END -->
[% TRY %][% PROCESS 'report/new/after_title.html' %][% CATCH file %][% END %]
<!-- report/new/after_title.html START -->
<!-- N/A - no such file -->
<!-- report/new/after_title.html END -->
[% DEFAULT form_detail_label = loc('Explain what’s wrong') %]
<label for="form_detail">[% form_detail_label %]</label>
[%# You can prevent a hint being printed by setting form_detail_placeholder to a Falsey value %]
[% IF NOT form_detail_placeholder.defined %]
[% SET form_detail_placeholder = loc('e.g. ‘This pothole has been here for two months and…’') %]
[% END %]
[% IF contact_detail_hint %]
<p class="form-hint" id="detail-hint">[% contact_detail_hint %]</p>
[% ELSIF form_detail_placeholder %]
<p class="form-hint" id="detail-hint">[% form_detail_placeholder %]</p>
[% END %]
[% IF field_errors.detail %]
<p class='form-error'>[% field_errors.detail %]</p>
[% END %]
<textarea class="form-control" rows="7" cols="26" name="detail" id="form_detail" [% IF form_detail_placeholder %]aria-describedby="detail-hint"[% END %][% field_required %]>[% report.detail | html %]</textarea>
[% TRY %][% PROCESS 'report/new/inline-tips.html' %][% CATCH file %][% END %]
<!-- report/new/inline-tips.html START -->
<!-- N/A - no such file -->
<!-- report/new/inline-tips.html END -->
<div class="js-reporting-page--single-hidden">
[% PROCESS report/form/user.html type='report' %]
<!-- report/form/user.html START -->
<!-- report/form/user.html -->
<div class="[% IF type != 'report' %]js-new-report-user-hidden[% END %]
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 type="button" class="btn btn--block hidden-nojs js-reporting-page--next[% IF type != 'report' %] js-new-report-user-show[% END %]">[% loc('Continue') %]</button>
[% ELSE %]
[% IF c.config.FACEBOOK_APP_ID %]
<button name="social_sign_in" id="facebook_sign_in" value="facebook" 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.cobrand.feature('oidc_login') %]
<button name="social_sign_in" id="oidc_sign_in" value="oidc" class="btn btn--block btn--social btn--oidc">
[% tprintf(loc('Login with %s'), c.cobrand.feature('oidc_login').display_name) %]
</button>
[% END %]
[% IF c.config.TWITTER_KEY %]
<button name="social_sign_in" id="twitter_sign_in" value="twitter" 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 type="button" class="btn btn--block hidden-nojs js-reporting-page--next[% IF type != 'report' %] js-new-report-user-show[% END %]">[% loc('Log in with email') %]</button>
[% END %]
<div class="js-show-if-anonymous
[%~ ' hidden-js' UNLESS type == 'report' AND c.cobrand.allow_anonymous_reports == 'button' %]">
<small id="or">[% loc('or') %]</small>
<button name="report_anonymously" value="yes" class="btn btn--block js-new-report-submit">[% loc('Report anonymously') %]</button>
<small>[% loc('No personal details will be stored, and you will not receive updates about this report.') %]</small>
</div>
</div>
[% IF (c.user_exists OR NOT c.cobrand.social_auth_enabled) AND type == 'report' AND c.cobrand.allow_anonymous_reports == 'button' %]
<div class="form-section-preview form-section-preview--next hidden-js">
<button name="report_anonymously" value="yes" class="btn btn--block">[% loc('Report anonymously') %]</button>
<small>[% loc('No personal details will be stored, and you will not receive updates about this report.') %]</small>
<small id="or">[% loc('or') %]</small>
</div>
[% END %]
<!-- /report/form/user.html -->
<!-- report/form/user.html END -->
</div>
</div>
[% IF partial_token %]
<input type="hidden" name="partial" value="[% partial_token.token %]">
[% END %]
<input type="hidden" id="single_body_only" name="single_body_only" value="">
<input type="hidden" id="do_not_send" name="do_not_send" value="">
<input type="hidden" name="submit_problem" value="1">
<input type="hidden" id="form_service" name="service" value="">
<!-- /report/new/form_report.html -->
<!-- report/new/form_report.html END -->
[% PROCESS 'report/form/submit.html' %]
<!-- report/form/submit.html START -->
<input class="desk-only btn btn--primary btn--block btn--final js-submit_register" type="submit" name="submit_register" value="[% loc('Submit') %]">
<input class="mob-only btn btn--primary btn--block btn--final js-submit_register" type="submit" name="submit_register_mobile" value="[% loc('Submit') %]">
<!-- report/form/submit.html END -->
</div>
</fieldset>
<!-- report/new/oauth_email_form.html END -->
[% ELSE %]
[% PROCESS 'report/new/fill_in_details_form.html' %]
<!-- report/new/fill_in_details_form.html START -->
[% PROCESS 'report/new/form_heading.html' %]
<!-- report/new/form_heading.html START -->
<h1>[% loc('Report your problem') %]</h1>
<!-- report/new/form_heading.html END -->
[% TRY %][% INCLUDE 'report/new/roads_message.html' %][% CATCH file %][% END %]
<!-- report/new/roads_message.html START -->
<!-- N/A - no such file -->
<!-- report/new/roads_message.html END -->
<fieldset>
<div id="problem_form">
[% 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>
<li class="change_location__search">[% loc('Or <a href="/">search for a different location</a>') %]</li>
</ul>
[% END %]
<div id="js-top-message">
[% PROCESS 'report/new/top_message.html' %]
<!-- report/new/top_message.html START -->
[% FILTER collapse ~%]
[%~ IF unresponsive.ALL ~%]
[% PROCESS 'report/new/unresponsive_body.html' body_id = unresponsive.ALL %]
<!-- report/new/unresponsive_body.html START -->
<!-- N/A - no such file -->
<!-- report/new/unresponsive_body.html END -->
[%~ ELSIF bodies_to_list.size == 0 # On a /new page, no bodies ~%]
<div class="box-warning">[% PROCESS 'report/new/top_message_none.html' %]</div>
<!-- report/new/top_message_none.html START -->
<p>
[%
nget(
"We do not yet have details for the council that covers this location.",
"We do not yet have details for the councils that cover this location.",
missing_details_bodies.size || all_areas.size
);
%]
[%
loc("If you submit a problem here the problem will <strong>not</strong> be reported to the council.");
%]
[%
tprintf(
loc("You can help us by finding a contact email address for local problems for %s and emailing it to us at <a href='mailto:%s'>%s</a>."),
missing_details_body_names.join( loc(' or ') ) || all_area_names.join( loc(' or ') ),
c.cobrand.contact_email,
c.cobrand.contact_email
);
%]
</p>
<!-- report/new/top_message_none.html END -->
[%~ ELSIF bodies_to_list.size != bodies.size # On a /new page, some missing bodies ~%]
<div class="box-warning">[% PROCESS 'report/new/top_message_some.html' %]</div>
<!-- report/new/top_message_some.html START -->
<p>
[%
nget(
"We do <strong>not</strong> yet have details for the other council that covers this location.",
"We do <strong>not</strong> yet have details for the other councils that cover this location.",
missing_details_bodies.size
);
%]
[%
tprintf(
loc("You can help us by finding a contact email address for local problems for %s and emailing it to us at <a href='mailto:%s'>%s</a>."),
missing_details_body_names.join( loc(' or ') ),
c.cobrand.contact_email,
c.cobrand.contact_email
);
%]
</p>
<!-- report/new/top_message_some.html END -->
[%~ END ~%]
[%~ END ~%]
<!-- report/new/top_message.html END -->
</div>
[% IF report.used_map && partial_token %]
<p id="unknown">[% loc('Please note your report has <strong>not yet been sent</strong>. Choose a category and add further information below, then submit.') %]</p>
[% END %]
[% IF oauth_failure %]
<p class="form-error">[% loc('Sorry, we could not log you in. Please fill in the form below.') %]</p>
[% END %]
[% sidebar_html | safe %]
[% INCLUDE 'errors.html' %]
<!-- errors.html START -->
[% FOREACH error IN errors %]
[% '<ul class="error">' IF loop.first %]
<li>[% error %]</li>
[% '</ul>' IF loop.last %]
[% END %]
<!-- errors.html END -->
[% PROCESS 'report/new/form_report.html' %]
<!-- report/new/form_report.html START -->
[% SET form_show_category_only = NOT category || field_errors.category || disable_form_message || have_disable_qn_to_answer %]
[% TRY %][% PROCESS 'report/new/_form_labels.html' %][% CATCH file %][% END %]
<!-- report/new/_form_labels.html START -->
<!-- N/A - file does not exist -->
<!-- report/new/_form_labels.html END -->
[% PROCESS 'report/new/form_public_councils_text.html' ~%]
<!-- report/new/form_public_councils_text.html START -->
[% BLOCK public_councils_text %]
<h2 class="form-section-heading js-hide-if-private-category">[% loc( 'Public details' ) %]</h2>
<h2 class="form-section-heading form-section-heading--private js-hide-if-public-category hidden-js">[% loc( 'Report details' ) %]</h2>
<div class="form-section-description" id="js-councils_text">
[% IF js %]
[% PROCESS 'report/new/councils_text_all.html' list_of_names = [ loc('the local council') ] %]
<!-- report/new/councils_text_all.html START -->
[% IF NOT list_of_names %]
[% SET default_list = [] %][% FOR b IN bodies_to_list.values %][% default_list.push(b.cobrand_name) %][% END %]
[% SET list_of_names = default_list %]
[% END %]
[% category = mark_safe(category) %]
<p>
[% UNLESS non_public_categories.$category;
tprintf(
loc('These will be sent to <strong>%s</strong> and also published online for others to see, in accordance with our <a href="%s">privacy policy</a>.'),
mark_safe(list_of_names.join( '</strong>' _ loc(' or ') _ '<strong>' )), c.cobrand.privacy_policy_url
);
ELSE;
tprintf(
loc('These will be sent to <strong>%s</strong> but not published online.'),
mark_safe(list_of_names.join( '</strong>' _ loc(' or ') _ '<strong>' ))
);
END %]
[% TRY %][% INCLUDE 'report/new/councils_extra_text.html' %][% CATCH file %][% END %]
<!-- report/new/councils_extra_text.html START -->
<!-- N/A - file does not exist -->
<!-- report/new/councils_extra_text.html END -->
</p>
<!-- report/new/councils_text_all.html END -->
[% ELSE %]
[% PROCESS 'report/new/councils_text.html' %]
<!-- report/new/councils_text.html START -->
[% FILTER collapse %]
[% category = mark_safe(category) %]
[% IF unresponsive.$category OR unresponsive.ALL OR bodies_to_list.size == 0 %]
[% tprintf(
loc('These will be published online for others to see, in accordance with our <a href="%s">privacy policy</a>.'),
c.cobrand.privacy_policy_url)
%]
[% ELSE %]
[% PROCESS 'report/new/councils_text_all.html' %]
<!-- report/new/councils_text_all.html START -->
[% IF NOT list_of_names %]
[% SET default_list = [] %][% FOR b IN bodies_to_list.values %][% default_list.push(b.cobrand_name) %][% END %]
[% SET list_of_names = default_list %]
[% END %]
[% category = mark_safe(category) %]
<p>
[% UNLESS non_public_categories.$category;
tprintf(
loc('These will be sent to <strong>%s</strong> and also published online for others to see, in accordance with our <a href="%s">privacy policy</a>.'),
mark_safe(list_of_names.join( '</strong>' _ loc(' or ') _ '<strong>' )), c.cobrand.privacy_policy_url
);
ELSE;
tprintf(
loc('These will be sent to <strong>%s</strong> but not published online.'),
mark_safe(list_of_names.join( '</strong>' _ loc(' or ') _ '<strong>' ))
);
END %]
[% TRY %][% INCLUDE 'report/new/councils_extra_text.html' %][% CATCH file %][% END %]
<!-- report/new/councils_extra_text.html START -->
<!-- N/A - file does not exist -->
<!-- report/new/councils_extra_text.html END -->
</p>
<!-- report/new/councils_text_all.html END -->
[% END %]
[% END -%]
<!-- report/new/councils_text.html END -->
[% END %]
</div>
[% END %]
<!-- report/new/form_public_councils_text.html END -->
<!-- report/new/form_report.html -->
[% INCLUDE 'report/new/form_after_heading.html' %]
<!-- report/new/form_after_heading.html START -->
<!-- N/A - file is empty -->
<!-- report/new/form_after_heading.html END -->
[% IF field_errors.bodies %]
<p class='form-error'>[% field_errors.bodies %]</p>
[% END %]
<div data-page-name="category" class="js-reporting-page js-reporting-page--category js-reporting-page--active">
[% IF public_councils_text_at_top %]
[% INCLUDE public_councils_text %]
[% END %]
[% PROCESS "report/new/category_wrapper.html" %]
<!-- report/new/category_wrapper.html START -->
<div id="form_category_row">
[% IF js %]
<fieldset id="form_category_fieldset"
[%~ 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 ~%]
>
<legend id="form_category_legend">[%~ form_category_label OR loc('Category') ~%]</legend>
[% loc('Loading...') %]
</fieldset>
[% ELSE %]
[% IF category_options.size %]
[% IF field_errors.category %]
<p class='form-error'>[% field_errors.category %]</p>
[% END %]
[% PROCESS "report/new/category.html" %]
<!-- report/new/category.html START -->
[% TRY %][% PROCESS 'report/new/_form_labels.html' %][% CATCH file %][% END ~%]
<!-- report/new/_form_labels.html START -->
<!-- N/A - no such file -->
<!-- report/new/_form_labels.html END -->
[%
# If only one option, pre-select that as if it were already selected. This
# carries through to the category_extras template because this template is
# included with PROCESS.
IF category_options.size == 1;
category = category_options.0.category;
END;
IF category;
category_lc = category | lower;
END
~%]
[% IF category_options.size OR category_groups.size ~%]
[% IF native_app %]
[% INCLUDE 'report/new/category-app.html' %]
<!-- report/new/category-app.html START -->
[% BLOCK category_option %]
[% cat_lc = cat.category | lower =%]
<option value='[% cat.category %]'[% ' selected' IF ( report.category == cat.category || category_lc == cat_lc ) AND ( NOT filter_group OR filter_group == group.name ) ~%]
>[% cat.category_display %]
[%~ IF cat.get_extra_metadata('help_text') %] ([% cat.get_extra_metadata('help_text') %])[% END ~%]
</option>
[% END %]
<label for='form_category' id="form_category_label">
[%~ form_category_label OR loc('Category') ~%]
</label>[% =%]
<select required class="validCategory form-control" name="category" id="form_category">
[%~ INCLUDE 'report/new/_category_select.html' ~%]
<!-- report/new/_category_select.html START -->
[%~ FOREACH group IN category_groups ~%]
[% IF group.name %]<optgroup label="[% group.name %]">[% END %]
[%~ FOREACH cat IN group.categories ~%]
[% INCLUDE category_option %]
[%~ END ~%]
[% IF group.name %]</optgroup>[% END %]
[%~ END =%]
<!-- report/new/_category_select.html END -->
</select>
<!-- report/new/category-app.html END -->
[% ELSE %]
<fieldset class="govuk-radios govuk-radios--small" id="form_category_fieldset"
[%~ 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 ~%]
>
<legend id="form_category_legend">[%~ form_category_label OR loc('Category') ~%]</legend>
[%~ FOREACH group_or_cat IN category_groups ~%]
<div class="govuk-radios__item">
[% IF group_or_cat.name %]
<input class="govuk-radios__input" required id="category_[% group_or_cat.id %]" type="radio" name="category" value="[% group_or_cat.name %]" data-subcategory="[% group_or_cat.id %]"[% ' checked' IF filter_group == group_or_cat.name %]>
<label class="govuk-label govuk-radios__label" for="category_[% group_or_cat.id %]">[% group_or_cat.name %]</label>
[% ELSE # A category not in a group %]
[% cat_lc = group_or_cat.category | lower =%]
<input class="govuk-radios__input" required id="category_[% group_or_cat.id %]" type="radio" name="category" value='[% group_or_cat.category %]'[% ' checked' IF ( report.category == group_or_cat.category || category_lc == cat_lc ) AND NOT filter_group ~%]>
<label class="govuk-label govuk-radios__label" for="category_[% group_or_cat.id %]">[% group_or_cat.category_display %]
[%~ IF group_or_cat.get_extra_metadata('help_text') %]
([% group_or_cat.get_extra_metadata('help_text') %])
[% END ~%]
</label>
[%~ END =%]
</div>
[%~ END =%]
</fieldset>
[% END %]
[%~ END ~%]
<!-- report/new/category.html END -->
[% END %]
[% END %]
</div>
<div class="js-post-category-messages">
[% IF disable_form_message %]
<div id="js-category-stopper" class="box-warning" role="alert" aria-live="assertive">
[% disable_form_message | safe %]
</div>
[% END %]
</div>
<!-- report/new/category_wrapper.html END -->
[% TRY %][% PROCESS 'report/new/after_category.html' %][% CATCH file %][% END %]
<!-- report/new/after_category.html START -->
<!-- N/A - file is empty -->
<!-- report/new/after_category.html END -->
<button class="btn btn--block btn--final hidden-nojs js-reporting-page--next"
[% ' disabled' IF disable_form_message %]>[% loc('Continue') %]</button>
</div>
<div data-page-name="subcategory" class="js-reporting-page js-reporting-page--subcategory js-reporting-page--skip[% ' hidden-nojs' UNLESS filter_group %]">
<div id="form_subcategory_row">
[% IF NOT js %]
[% PROCESS report/new/subcategories.html %]
<!-- report/new/subcategories.html START -->
[% IF category; category_lc = category | lower; END ~%]
[%~ FOREACH group IN category_groups ~%]
[% IF group.name %]
<fieldset class="govuk-radios govuk-radios--small hidden-js[% ' hidden-nojs' UNLESS filter_group == group.name %] js-subcategory" id="subcategory_[% group.id %]">
<legend>[% group.name %]: [% loc('Subcategory') %]</legend>
[%~ FOREACH cat IN group.categories ~%]
[% cat_lc = cat.category | lower =%]
<div class="govuk-radios__item">
<input class="required govuk-radios__input" id="subcategory_[% cat.id %]" type="radio" name="category.[% group.id %]" value='[% cat.category %]'[% ' checked' IF ( report.category == cat.category || category_lc == cat_lc ) AND ( NOT filter_group OR filter_group == group.name ) ~%]>
<label class="govuk-label govuk-radios__label" for="subcategory_[% cat.id %]">[% cat.category_display %]
[%~ IF cat.get_extra_metadata('help_text') %] ([% cat.get_extra_metadata('help_text') %])[% END ~%]
</label>
</div>
[%~ END ~%]
</fieldset>
[% END %]
[%~ END ~%]
<!-- report/new/subcategories.html END -->
[% END %]
</div>
<div class="js-post-category-messages"></div>
<button class="btn btn--block btn--final hidden-nojs js-reporting-page--next">[% loc('Continue') %]</button>
</div>
[% PROCESS "report/new/duplicate_suggestions.html" %]
<!-- report/new/duplicate_suggestions.html START -->
[% IF c.cobrand.suggest_duplicates AND NOT login_success AND NOT oauth_need_email %]
[% extra_js.push(
version('/js/duplicates.js'),
) -%]
<div data-page-name="duplicates" id="js-duplicate-reports" class="js-reporting-page js-reporting-page--duplicates js-reporting-page--skip duplicate-report-suggestions hidden">
<h2 class="form-section-heading">[% loc('Already been reported?') %]</h2>
<div class="form-section-description">
[% IF c.cobrand.is_council %]
<p>[% loc('There are similar problems nearby that we’re already aware of, is one of them yours?') %]</p>
[% ELSE %]
<p>[% loc('We’ve already reported these nearby problems to the council. Is one of them yours?') %]</p>
[% END %]
</div>
<ul class="item-list"></ul>
<button type="button" class="btn btn--block js-reporting-page--next">[% loc('Continue – report a new problem') %]</button>
</div>
<div class="js-template-get-updates hidden">
<div id="alerts" class="get-updates js-alert-list">
<p id="rznvy_hint">
[% IF c.user_exists %]
[% loc('Would you like us to notify you when this problem is updated or fixed?') %]
[% ELSE %]
[% loc('If you let us know your email address, we’ll notify you when this problem is updated or fixed.') %]
[% END %]
</p>
<input type="hidden" name="id" disabled>
<input type="hidden" name="token" value="[% csrf_token %]" disabled>
<input type="hidden" name="type" value="updates" disabled>
[% IF c.user_exists %]
[% IF c.user.has_permission_to('contribute_as_another_user', bodies_ids) %]
<label for="rznvy_input">[% loc('Email') %]</label>
<div class="form-txt-submit-box">
<input type="email" class="form-control" name="rznvy" id="rznvy_input" aria-described-by="rznvy_hint" disabled>
<input type="submit" value="[% loc('Get updates') %]" class="btn" id="alert_email_button">
</div>
[% ELSE %]
<input type="submit" value="[% loc('Get updates') %]" class="btn btn--block" id="alert_email_button">
[% END %]
[% ELSE %]
<label for="rznvy_input">[% loc('Your email') %]</label>
<div class="form-txt-submit-box">
<input type="email" class="form-control" name="rznvy" id="rznvy_input" aria-described-by="rznvy_hint" disabled>
<input type="submit" value="[% loc('Get updates') %]" class="btn" id="alert_email_button">
</div>
[% END %]
</div>
</div>
[% END %]
<!-- report/new/duplicate_suggestions.html END -->
<div data-page-name="extra" id="js-post-category-messages" class="js-reporting-page js-reporting-page--skip">
[%# This section includes 'Pick an asset' text, roadworks info, extra category questions %]
[% IF NOT disable_form_message %]
[% PROCESS "report/new/category_extras.html" %]
<!-- report/new/category_extras.html START -->
[% IF NOT list_of_names %]
[% SET default_list = [] %][% FOR b IN bodies_to_list.values %][% default_list.push(b.cobrand_name) %][% END %]
[% SET list_of_names = default_list %]
[% END %]
[% category = mark_safe(category) %]
<div id="category_meta">
[%- IF unresponsive.$category %]
[%# Note: this is only shown on FMS.com %]
[% INCLUDE "report/new/unresponsive_body.html" body_id = unresponsive.$category %]
<!-- report/new/unresponsive_body.html START -->
<!-- N/A - no such file -->
<!-- report/new/unresponsive_body.html END -->
[%- END %]
[%- IF category_extras.$category.size %]
[% UNLESS category_extras_hidden.$category %]
<div class="extra-category-questions">
[% UNLESS category_extras_notices.$category %]
<h2 class="visuallyhidden form-section-heading">[% loc('Extra details') %]</h2>
<p class="form-section-description">
[% tprintf(
loc('Help <strong>%s</strong> resolve your problem quicker, by providing some extra detail. This extra information will not be published online.'),
mark_safe(list_of_names.join( '</strong>' _ loc(' or ') _ '<strong>' ))
); %]
</p>
[% END %]
[% INCLUDE 'report/new/category_extras_fields.html' metas=category_extras.$category %]
<!-- report/new/category_extras_fields.html START -->
[%- FOR meta IN metas %]
[%- meta_name = meta.code -%]
[%- x_meta_name = 'x' _ meta.code # For report_meta and field_errors lookup, as TT hides codes starting "_" -%]
[% IF c.cobrand.category_extra_hidden(meta) AND NOT show_hidden %]
<input type="hidden" value="[% report_meta.$x_meta_name.value | html %]" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]">
[% ELSIF meta.variable != 'false' || NOT hide_notices %]
<label for="[% cat_prefix %]form_[% meta_name %]">[% (meta.description OR meta.code) | safe %]</label>
[% TRY %][% INCLUDE 'report/new/_category_extra_field_notice.html' %][% CATCH file %][% END %]
[% IF field_errors.$x_meta_name %]
<p class='form-error'>[% field_errors.$x_meta_name %]</p>
[% END -%]
[% IF meta.variable != 'false' %]
[% IF meta.item('values').size %]
<select class="form-control" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>
<option value="">[% loc('-- Pick an option --') %]</option>
[% FOR option IN meta.values %]
<option value="[% option.key %]"[% IF option.key == report_meta.$x_meta_name.value %] selected[% END %]>[% option.name %]</option>
[% END %]
</select>
[% ELSIF meta.datatype == 'text' %]
<textarea class="form-control" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>[% report_meta.$x_meta_name.value %]</textarea>
[% ELSE %]
<input class="form-control" type="[% meta.fieldtype OR 'text' %]" value="[% report_meta.$x_meta_name.value | html %]" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>
[% END %]
[% END %]
[% END %]
[%- END %]
<!-- report/new/category_extras_fields.html END -->
</div>
[% ELSE %]
[% INCLUDE 'report/new/category_extras_fields.html' metas=category_extras.$category %]
<!-- report/new/category_extras_fields.html START -->
[%- FOR meta IN metas %]
[%- meta_name = meta.code -%]
[%- x_meta_name = 'x' _ meta.code # For report_meta and field_errors lookup, as TT hides codes starting "_" -%]
[% IF c.cobrand.category_extra_hidden(meta) AND NOT show_hidden %]
<input type="hidden" value="[% report_meta.$x_meta_name.value | html %]" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]">
[% ELSIF meta.variable != 'false' || NOT hide_notices %]
<label for="[% cat_prefix %]form_[% meta_name %]">[% (meta.description OR meta.code) | safe %]</label>
[% TRY %][% INCLUDE 'report/new/_category_extra_field_notice.html' %][% CATCH file %][% END %]
[% IF field_errors.$x_meta_name %]
<p class='form-error'>[% field_errors.$x_meta_name %]</p>
[% END -%]
[% IF meta.variable != 'false' %]
[% IF meta.item('values').size %]
<select class="form-control" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>
<option value="">[% loc('-- Pick an option --') %]</option>
[% FOR option IN meta.values %]
<option value="[% option.key %]"[% IF option.key == report_meta.$x_meta_name.value %] selected[% END %]>[% option.name %]</option>
[% END %]
</select>
[% ELSIF meta.datatype == 'text' %]
<textarea class="form-control" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>[% report_meta.$x_meta_name.value %]</textarea>
[% ELSE %]
<input class="form-control" type="[% meta.fieldtype OR 'text' %]" value="[% report_meta.$x_meta_name.value | html %]" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>
[% END %]
[% END %]
[% END %]
[%- END %]
<!-- report/new/category_extras_fields.html END -->
[% END %]
[%- END %]
[%- IF report_extra_fields %]
[% FOREACH extras IN report_extra_fields %]
[% cat_prefix = "extra[" _ extras.id _ "]" %]
[% INCLUDE 'report/new/category_extras_fields.html' metas=extras.get_extra_fields %]
<!-- report/new/category_extras_fields.html START -->
[%- FOR meta IN metas %]
[%- meta_name = meta.code -%]
[%- x_meta_name = 'x' _ meta.code # For report_meta and field_errors lookup, as TT hides codes starting "_" -%]
[% IF c.cobrand.category_extra_hidden(meta) AND NOT show_hidden %]
<input type="hidden" value="[% report_meta.$x_meta_name.value | html %]" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]">
[% ELSIF meta.variable != 'false' || NOT hide_notices %]
<label for="[% cat_prefix %]form_[% meta_name %]">[% (meta.description OR meta.code) | safe %]</label>
[% TRY %][% INCLUDE 'report/new/_category_extra_field_notice.html' %][% CATCH file %][% END %]
[% IF field_errors.$x_meta_name %]
<p class='form-error'>[% field_errors.$x_meta_name %]</p>
[% END -%]
[% IF meta.variable != 'false' %]
[% IF meta.item('values').size %]
<select class="form-control" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>
<option value="">[% loc('-- Pick an option --') %]</option>
[% FOR option IN meta.values %]
<option value="[% option.key %]"[% IF option.key == report_meta.$x_meta_name.value %] selected[% END %]>[% option.name %]</option>
[% END %]
</select>
[% ELSIF meta.datatype == 'text' %]
<textarea class="form-control" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>[% report_meta.$x_meta_name.value %]</textarea>
[% ELSE %]
<input class="form-control" type="[% meta.fieldtype OR 'text' %]" value="[% report_meta.$x_meta_name.value | html %]" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>
[% END %]
[% END %]
[% END %]
[%- END %]
<!-- report/new/category_extras_fields.html END -->
[% END %]
[%- END %]
</div>
<!-- report/new/category_extras.html END -->
[% END %]
<div class="js-post-category-messages"></div>
<button class="btn btn--block btn--final hidden-nojs js-reporting-page--next">[% loc('Continue') %]</button>
</div>
[% IF form_show_category_only %]
<div class="hidden-js">
<input class="btn btn--primary btn--block btn--final" type="submit" name="submit_category_part_only" value="[% loc('Submit') %]">
</div>
[% SET field_required = '' %]
[% ELSE %]
[% SET field_required = ' required' %]
[% END %]
[% IF c.cobrand.allow_photo_upload %]
<div data-page-name="photo" class="js-reporting-page[% ' hidden-nojs' IF form_show_category_only %]">
[% PROCESS 'report/form/photo_upload.html' type='report' %]
<!-- report/form/photo_upload.html START -->
[% IF c.cobrand.allow_photo_upload %]
<input type="hidden" name="upload_fileid" value="[% upload_fileid %]">
<label for="form_photo">
<span data-singular="[% loc('Photo') %]" data-plural="[% loc('Photos') %]">[% loc('Photo') %]</span>
[% IF c.cobrand.moniker == 'zurich' %][% loc('(Defect &amp; location of defect)') %][% END %]
[% loc('(optional)') %]
</label>
[% IF field_errors.photo %]
<p class='form-error'>[% field_errors.photo %]</p>
[% END %]
<div id="form_photos">
[% IF upload_fileid %]
[% IF type == 'report' %]
<p>[% loc('You have already attached photos to this report. Note that you can attach a maximum of 3 to this report (if you try to upload more, the oldest will be removed).') %]</p>
[% ELSE %]
<p>[% loc('You have already attached photos to this update. Note that you can attach a maximum of 3 to this update (if you try to upload more, the oldest will be removed).') %]</p>
[% END %]
[% FOREACH id IN upload_fileid.split(',') %]
<img align="right" src="/photo/temp.[% id %]" alt="">
[% END %]
[% END %]
<input type="file" name="photo1" id="form_photo">
<label for="form_photo2">[% loc('Photo') %]</label>
<input type="file" name="photo2" id="form_photo2">
<label for="form_photo3">[% loc('Photo') %]</label>
<input type="file" name="photo3" id="form_photo3">
</div>
[% END %]
<!-- report/form/photo_upload.html END -->
[% PROCESS 'report/new/after_photo.html' %]
<!-- report/new/after_photo.html START -->
<div class="description_tips" aria-label="[% loc('Tips for perfect photos') %]">
<ul class="do">
<li>[% loc('For best results include a close-up and a wide shot') %]</li>
</ul>
<ul class="dont">
<li>[% loc('Avoid personal information and vehicle number plates') %]</li>
</ul>
</div>
<!-- report/new/after_photo.html END -->
<button class="btn btn--block btn--final hidden-nojs js-reporting-page--next">[% loc('Continue') %]</button>
</div>
[% END %]
<div data-page-name="details" class="js-reporting-page[% ' hidden-nojs' IF form_show_category_only %]">
[% UNLESS public_councils_text_at_top %]
[% INCLUDE public_councils_text %]
[% END %]
[% INCLUDE 'report/new/form_title.html' %]
<!-- report/new/form_title.html START -->
[% DEFAULT form_title = loc('Summarise the problem') %]
[% DEFAULT form_title_placeholder = loc('e.g. ‘10 inch pothole on Example St, near post box’') %]
<label for="form_title">[% form_title %]</label>
<p class="form-hint" id="title-hint">[% contact_title_hint OR form_title_placeholder %]</p>
[% IF field_errors.title %]
<p class='form-error'>[% field_errors.title %]</p>
[% END %]
<input class="form-control" type="text" value="[% report.title | html %]" name="title" id="form_title" aria-describedby="title-hint"[% field_required %] autocomplete="off">
<!-- report/new/form_title.html END -->
[% TRY %][% PROCESS 'report/new/after_title.html' %][% CATCH file %][% END %]
<!-- report/new/after_title.html START -->
<!-- N/A - no such file -->
<!-- report/new/after_title.html END -->
[% DEFAULT form_detail_label = loc('Explain what’s wrong') %]
<label for="form_detail">[% form_detail_label %]</label>
[%# You can prevent a hint being printed by setting form_detail_placeholder to a Falsey value %]
[% IF NOT form_detail_placeholder.defined %]
[% SET form_detail_placeholder = loc('e.g. ‘This pothole has been here for two months and…’') %]
[% END %]
[% IF contact_detail_hint %]
<p class="form-hint" id="detail-hint">[% contact_detail_hint %]</p>
[% ELSIF form_detail_placeholder %]
<p class="form-hint" id="detail-hint">[% form_detail_placeholder %]</p>
[% END %]
[% IF field_errors.detail %]
<p class='form-error'>[% field_errors.detail %]</p>
[% END %]
<textarea class="form-control" rows="7" cols="26" name="detail" id="form_detail" [% IF form_detail_placeholder %]aria-describedby="detail-hint"[% END %][% field_required %]>[% report.detail | html %]</textarea>
[% TRY %][% PROCESS 'report/new/inline-tips.html' %][% CATCH file %][% END %]
<!-- report/new/inline-tips.html START -->
<!-- N/A - no such file -->
<!-- report/new/inline-tips.html END -->
<div class="js-reporting-page--single-hidden">
[% PROCESS report/form/user.html type='report' %]
<!-- report/form/user.html START -->
<!-- report/form/user.html -->
<div class="[% IF type != 'report' %]js-new-report-user-hidden[% END %]
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 type="button" class="btn btn--block hidden-nojs js-reporting-page--next[% IF type != 'report' %] js-new-report-user-show[% END %]">[% loc('Continue') %]</button>
[% ELSE %]
[% IF c.config.FACEBOOK_APP_ID %]
<button name="social_sign_in" id="facebook_sign_in" value="facebook" 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.cobrand.feature('oidc_login') %]
<button name="social_sign_in" id="oidc_sign_in" value="oidc" class="btn btn--block btn--social btn--oidc">
[% tprintf(loc('Login with %s'), c.cobrand.feature('oidc_login').display_name) %]
</button>
[% END %]
[% IF c.config.TWITTER_KEY %]
<button name="social_sign_in" id="twitter_sign_in" value="twitter" 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 type="button" class="btn btn--block hidden-nojs js-reporting-page--next[% IF type != 'report' %] js-new-report-user-show[% END %]">[% loc('Log in with email') %]</button>
[% END %]
<div class="js-show-if-anonymous
[%~ ' hidden-js' UNLESS type == 'report' AND c.cobrand.allow_anonymous_reports == 'button' %]">
<small id="or">[% loc('or') %]</small>
<button name="report_anonymously" value="yes" class="btn btn--block js-new-report-submit">[% loc('Report anonymously') %]</button>
<small>[% loc('No personal details will be stored, and you will not receive updates about this report.') %]</small>
</div>
</div>
[% IF (c.user_exists OR NOT c.cobrand.social_auth_enabled) AND type == 'report' AND c.cobrand.allow_anonymous_reports == 'button' %]
<div class="form-section-preview form-section-preview--next hidden-js">
<button name="report_anonymously" value="yes" class="btn btn--block">[% loc('Report anonymously') %]</button>
<small>[% loc('No personal details will be stored, and you will not receive updates about this report.') %]</small>
<small id="or">[% loc('or') %]</small>
</div>
[% END %]
<!-- /report/form/user.html -->
<!-- report/form/user.html END -->
</div>
</div>
[% IF partial_token %]
<input type="hidden" name="partial" value="[% partial_token.token %]">
[% END %]
<input type="hidden" id="single_body_only" name="single_body_only" value="">
<input type="hidden" id="do_not_send" name="do_not_send" value="">
<input type="hidden" name="submit_problem" value="1">
<input type="hidden" id="form_service" name="service" value="">
<!-- /report/new/form_report.html -->
<!-- report/new/form_report.html END -->
[% PROCESS 'report/new/form_user.html' %]
<!-- report/new/form_user.html START -->
<!-- report/new/form_user.html -->
<div data-page-name="user" class="js-reporting-page[% ' hidden-nojs' IF form_show_category_only %]">
[% IF c.user_exists %]
[% PROCESS "report/new/form_user_loggedin.html" type='report' %]
<!-- report/new/form_user_loggedin.html START -->
<!-- report/new/form_user_loggedin.html -->
[% PROCESS 'report/form/private_details.html' %]
<!-- report/new/private_details.html START -->
<!-- N/A - there is no report/new/private_details.html file -->
<!-- report/new/private_details.html END -->
[% can_contribute_as_body = c.user.from_body AND c.user.has_permission_to("contribute_as_body", bodies_ids) %]
[% IF js %]
<div style="display:none" id="js-contribute-as-wrapper">
[% INCLUDE form_as %]
</div>
[% ELSE %]
[% can_contribute_as_another_user = c.user.has_permission_to("contribute_as_another_user", bodies_ids) %]
[% can_contribute_as_anonymous_user = c.user.has_permission_to("contribute_as_anonymous_user", bodies_ids) %]
[% IF can_contribute_as_another_user OR can_contribute_as_anonymous_user OR can_contribute_as_body %]
[% INCLUDE form_as %]
[% END %]
[% END %]
[% BLOCK form_as %]
<label for="form_as">[% loc('Report as') %]</label>
<select id="form_as" class="form-control js-contribute-as" name="form_as">
<option value="myself" [% c.user.from_body AND ( c.user.has_body_permission_to('planned_reports') || c.user.has_body_permission_to('default_to_body') ) ? '' : 'selected' %]>[% loc('Yourself') %]</option>
[% IF js || can_contribute_as_anonymous_user %]
<option value="anonymous_user">[% loc('Anonymous user') %]</option>
[% END %]
[% IF js || can_contribute_as_another_user %]
<option value="another_user">[% loc('Another user') %]</option>
[% END %]
[% IF js || can_contribute_as_body %]
<option value="body" [% c.user.from_body AND ( c.user.has_body_permission_to('planned_reports') || c.user.has_body_permission_to('default_to_body') ) ? 'selected' : '' %]>[% c.user.from_body.cobrand_name %]</option>
[% END %]
</select>
[% END %]
[% IF c.user.phone_verified AND NOT c.cobrand.call_hook('disable_phone_number_entry') %]
<label for="form_phone">[% loc('Phone number') %]</label>
<input class="form-control" id="form_phone" name="phone" disabled type="text" value="[% c.user.phone_display | html %]">
[% END %]
[% IF c.user.email_verified %]
<label for="form_username">[% loc('Email address') %]<span class="hidden"> [% loc('(optional)') %]</span></label>
[% IF field_errors.username_register %]
<p class='form-error'>[% field_errors.username_register %]</p>
[% END %]
<input class="form-control" id="form_username" name="username"
[%- IF NOT can_contribute_as_another_user -%]
disabled
[%- END -%]
type="text" value="[% c.user.email | html %]">
[% END %]
[% INCLUDE 'report/new/extra_name.html' %]
<!-- report/new/extra_name.html START -->
[% IF extra_name_info %]
<label for="form_fms_extra_title">Title</label>
[% IF field_errors.fms_extra_title %]
<p class='form-error'>[% field_errors.fms_extra_title %]</p>
[% END %]
[% 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 required js-form-name" id="form_fms_extra_title"
name="fms_extra_title">
<option></option>
<option value="MR"[% ' selected' IF title == 'MR' %]>Mr</option>
<option value="MISS"[% ' selected' IF title == 'MISS' %]>Miss</option>
<option value="MRS"[% ' selected' IF title == 'MRS' %]>Mrs</option>
<option value="MS"[% ' selected' IF title == 'MS' %]>Ms</option>
<option value="DR"[% ' selected' IF title == 'DR' %]>Dr</option>
</select>
[% END %]
<!-- report/new/extra_name.html END -->
[% PROCESS 'user/_anonymity.html' anonymous = report.anonymous %]
<!-- user/_anonymity.html START -->
[%
IF anonymous=='';
IF c.user_exists;
SET name_public = NOT c.user.latest_anonymity;
ELSE;
SET name_public = c.cobrand.default_show_name;
END;
ELSE;
SET name_public = anonymous==0;
END
%]
<!-- user/_anonymity.html END -->
[% INCLUDE 'report/form/user_name.html' object=report %]
<!-- report/form/user_name.html START -->
<!-- user_name.html -->
<label for="form_name">[% loc('Name') %]
[% TRY %]
[% INCLUDE 'report/form/after_name.html' %]
<!-- report/form/after_name.html START -->
<!-- N/A - there is no report/form/after_name.html file -->
<!-- report/form/after_name.html END -->
[% 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 -->
<!-- report/form/user_name.html END -->
[% INCLUDE 'report/_show_name_label.html' %]
[% IF NOT c.user.phone_verified AND NOT c.cobrand.call_hook('disable_phone_number_entry') %]
<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">
[% END %]
[% IF NOT c.user.email_verified %]
<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 %]
[% IF c.user.has_permission_to("report_inspect", bodies_ids) OR c.user.has_permission_to("report_mark_private", bodies_ids) %]
<div class="checkbox-group">
<input type="checkbox" name="non_public" id="form_non_public" value="1"
[%~ SET category_safe = mark_safe(category) %]
[%~ ' checked' IF report.non_public OR non_public_categories.$category_safe %]
[%~ ' disabled' IF non_public_categories.$category_safe %]>
<label class="inline" for="form_non_public">[% loc('Private – this will mean the report cannot be viewed publicly') %]</label>
</div>
[% END %]
[% IF can_contribute_as_body %]
[% TRY %][% INCLUDE 'report/form/private_comments.html' %][% CATCH file %][% END %]
<!-- report/form/private_comments.html START -->
<!-- N/A - there is no report/form/private_comments.html file -->
<!-- report/form/private_comments.html END -->
[% END %]
[% PROCESS 'report/form/submit.html' %]
<!-- report/form/submit.html START -->
<input class="desk-only btn btn--primary btn--block btn--final js-submit_register" type="submit" name="submit_register" value="[% loc('Submit') %]">
<input class="mob-only btn btn--primary btn--block btn--final js-submit_register" type="submit" name="submit_register_mobile" value="[% loc('Submit') %]">
<!-- report/form/submit.html END -->
<!-- /report/new/form_user_loggedin.html -->
<!-- report/new/form_user_loggedin.html END -->
[% ELSE %]
[% PROCESS "report/form/user_loggedout.html" type='report' object=report %]
<!-- report/form/user_loggedout.html START -->
<!-- user_loggedout.html -->
<div id="form_sign_in">
[% PROCESS 'report/form/private_details.html' %]
<!-- report/form/private_details.html START -->
<!-- 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 class="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="[% c.cobrand.privacy_policy_url %]">[% loc('See our privacy policy') %]</a>.)
[% ELSE %]
[% PROCESS 'report/new/councils_text_private.html' %]
<!-- report/new/councils_text_private.html START -->
[% FILTER collapse %]
[% category = mark_safe(category) %]
[% IF unresponsive.$category OR unresponsive.ALL OR bodies_to_list.size == 0 %]
[% loc('These details will never be shown online without your permission.') %]
[% ELSE %]
[% loc('These details will be sent to the council, but will never be shown online without your permission.') %]
[% END %]
(<a href="[% c.cobrand.privacy_policy_url %]">[% loc('See our privacy policy') %]</a>.)
[% END -%]
<!-- report/new/councils_text_private.html END -->
[% END %]
</p>
[% END %]
<!-- /private_details.html -->
<!-- report/form/private_details.html END -->
<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' %]
<!-- report/form/user_loggedout_password.html START -->
<!-- user_loggedout_password.html -->
<div id="form_sign_in_yes" class="form-box hidden-js js-new-report-sign-in-shown">
<h3 class="hidden-js">[% loc('<strong>Yes</strong> I have a password') %]</h3>
<p class="hidden-nojs">
[% loc('No account?') %]
<a class="js-new-report-hide-sign-in" href="#">[% loc('Fill in your details manually.') %]</a>
</p>
[% PROCESS 'report/form/user_loggedout_email.html' name='username_sign_in' %]
<!-- report/form/user_loggedout_email.html START -->
<!-- user_loggedout_email.html -->
[% IF c.cobrand.sms_authentication %]
[% SET username_label = loc('Your email or mobile') %]
[% SET username_type = 'text' %]
[% ELSE %]
[% SET username_label = loc('Your email') %]
[% SET username_type = 'email' %]
[% END %]
[% SET username_field = (name == 'username_sign_in') ? 'username' : name ~%]
<label for="form_[% name %]">[% username_label %]</label>
[% IF field_errors.$name %]
<p class='form-error'>[% field_errors.$name %]</p>
[% END %]
<input type="[% username_type %]" name="[% username_field %]" id="form_[% name %]"
value="[% c.get_param(username_field) %]"
class="form-control required">
<!-- /user_loggedout_email.html -->
<!-- report/form/user_loggedout_email.html 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 class="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 -->
<!-- report/form/user_loggedout_password.html END -->
[% PROCESS 'report/form/user_loggedout_by_email.html' %]
<!-- report/form/user_loggedout_by_email.html START -->
<!-- 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' %]
<!-- report/form/user_loggedout_by_email_heading.html START -->
[% IF c.cobrand.sms_authentication %]
[% IF type == 'update' %]
<h3 class="hidden-js">[% loc('<strong>No</strong> Let me confirm my update by email/text') %]</h3>
[% ELSE %]
<h3 class="hidden-js">[% loc('<strong>No</strong> Let me confirm my report by email/text') %]</h3>
[% END %]
[% ELSE %]
[% IF type == 'update' %]
<h3 class="hidden-js">[% loc('<strong>No</strong> Let me confirm my update by email') %]</h3>
[% ELSE %]
<h3 class="hidden-js">[% loc('<strong>No</strong> Let me confirm my report by email') %]</h3>
[% END %]
[% END %]
<!-- report/form/user_loggedout_by_email_heading.html END -->
[% INCLUDE 'report/new/extra_name.html' %]
<!-- report/new/extra_name.html START -->
[% IF extra_name_info %]
<label for="form_fms_extra_title">Title</label>
[% IF field_errors.fms_extra_title %]
<p class='form-error'>[% field_errors.fms_extra_title %]</p>
[% END %]
[% 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 required js-form-name" id="form_fms_extra_title"
name="fms_extra_title">
<option></option>
<option value="MR"[% ' selected' IF title == 'MR' %]>Mr</option>
<option value="MISS"[% ' selected' IF title == 'MISS' %]>Miss</option>
<option value="MRS"[% ' selected' IF title == 'MRS' %]>Mrs</option>
<option value="MS"[% ' selected' IF title == 'MS' %]>Ms</option>
<option value="DR"[% ' selected' IF title == 'DR' %]>Dr</option>
</select>
[% END %]
<!-- report/new/extra_name.html END -->
[% PROCESS 'user/_anonymity.html' anonymous = object.anonymous %]
<!-- user/_anonymity.html START -->
[%
IF anonymous=='';
IF c.user_exists;
SET name_public = NOT c.user.latest_anonymity;
ELSE;
SET name_public = c.cobrand.default_show_name;
END;
ELSE;
SET name_public = anonymous==0;
END
%]
<!-- user/_anonymity.html END -->
[% INCLUDE 'report/form/user_name.html' %]
<!-- report/form/user_name.html START -->
<!-- user_name.html -->
<label for="form_name">[% loc('Name') %]
[% TRY %]
[% INCLUDE 'report/form/after_name.html' %]
<!-- report/form/after_name.html START -->
<!-- N/A - there is no report/form/after_name.html file -->
<!-- report/form/after_name.html END -->
[% 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 -->
<!-- report/form/user_name.html END -->
[% INCLUDE 'report/_show_name_label.html' %]
<!-- report/_show_name_label.html START -->
<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>
<!-- report/_show_name_label.html END -->
[% IF type != 'update' %]
[% IF NOT c.cobrand.call_hook('disable_phone_number_entry') AND NOT c.cobrand.sms_authentication %]
<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">
[% 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 type != 'update' AND c.cobrand.sms_authentication AND NOT c.cobrand.call_hook('disable_phone_number_entry') %]
<fieldset>
<legend>How would you like to receive updates?</legend>
[% IF field_errors.update_method %]
<p class='form-error'>[% field_errors.update_method %]</p>
[% END %]
<p class="segmented-control segmented-control--radio">
<input required type="radio" name="update_method" id="update_method_email"
data-show="#js-optional-phone" data-hide="#js-optional-email"
value="email"[% ' checked' IF update_method == 'email' %]>
<label class="btn" for="update_method_email">[% loc('Email') %]</label>
<input type="radio" name="update_method" id="update_method_phone"
data-show="#js-optional-email" data-hide="#js-optional-phone"
value="phone"[% ' checked' IF update_method == 'phone' %]>
<label class="btn" for="update_method_phone">[% loc('Phone') %]</label>
</p>
</fieldset>
[% IF field_errors.username_register %]
<p class='form-error'>[% field_errors.username_register %]</p>
[% END %]
<label for="form_email">[% loc('Your email') %]<span class="hidden-js" id="js-optional-email"> [% loc('(optional)') %]</span></label>
[% IF field_errors.email %]
<p class='form-error'>[% field_errors.email %]</p>
[% END %]
<input type="email" name="email" id="form_email" value="[% email %]" class="form-control">
<label for="form_phone">[% loc('Phone number') %]<span class="hidden-js" id="js-optional-phone"> [% loc('(optional)') %]</span></label>
[% IF field_errors.phone %]
<p class='form-error'>[% field_errors.phone %]</p>
[% END %]
<input class="form-control" type="text" value="[% phone %]" name="phone" id="form_phone">
[% ELSE %]
[% PROCESS 'report/form/user_loggedout_email.html' name='username_register' %]
<!-- report/form/user_loggedout_email.html START -->
<!-- user_loggedout_email.html -->
[% IF c.cobrand.sms_authentication %]
[% SET username_label = loc('Your email or mobile') %]
[% SET username_type = 'text' %]
[% ELSE %]
[% SET username_label = loc('Your email') %]
[% SET username_type = 'email' %]
[% END %]
[% SET username_field = (name == 'username_sign_in') ? 'username' : name ~%]
<label for="form_[% name %]">[% username_label %]</label>
[% IF field_errors.$name %]
<p class='form-error'>[% field_errors.$name %]</p>
[% END %]
<input type="[% username_type %]" name="[% username_field %]" id="form_[% name %]"
value="[% c.get_param(username_field) %]"
class="form-control required">
<!-- /user_loggedout_email.html -->
<!-- report/form/user_loggedout_email.html END -->
[% 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="">
[% PROCESS 'auth/form_extra.html' %]
<!-- auth/form_extra.html START -->
<!-- file is empty -->
<!-- auth/form_extra.html END -->
[% PROCESS 'report/form/submit.html' %]
<!-- report/form/submit.html START -->
<input class="desk-only btn btn--primary btn--block btn--final js-submit_register" type="submit" name="submit_register" value="[% loc('Submit') %]">
<input class="mob-only btn btn--primary btn--block btn--final js-submit_register" type="submit" name="submit_register_mobile" value="[% loc('Submit') %]">
<!-- report/form/submit.html END -->
</div>
<!-- /user_loggedout_by_email.html -->
<!-- report/form/user_loggedout_by_email.html END -->
</div>
<!-- /user_loggedout.html -->
<!-- report/form/user_loggedout.html END -->
[% END %]
</div>
<!-- /report/new/form_user.html -->
<!-- report/new/form_user.html END -->
</div>
</fieldset>
<!-- report/new/fill_in_details_form.html END -->
[% END %]
</div>
</div>
</div>
</form>
[% INCLUDE 'footer.html' %]
<!-- footer.html START -->
[% IF pagefooter %]
<footer role="contentinfo">
[% INCLUDE 'front/footer-marketing.html' %]
<!-- front/footer-marketing.html START -->
<!-- N/A - this will not show because there is no value "pagefooter" -->
<!-- front/footer-marketing.html END -->
</footer>
[% END %]
</div><!-- .content role=main -->
</div><!-- .container -->
</div><!-- .table-cell -->
</div> <!-- .wrapper -->
[% INCLUDE 'common_footer_tags.html' %]
<!-- common_footer_tags.html START -->
[% IF NOT bodyclass.match('mappage') %]
[% TRY %][% PROCESS 'footer_extra.html' %][% CATCH file %][% END %]
<!-- footer_extra.html START -->
<!-- N/A - footer_extra.html does not exist in base, it's used if needed in some custom themes -->
<!-- footer_extra.html END -->
[% END %]
[% PROCESS 'common_scripts.html' %]
<!-- common_scripts.html START -->
[%
USE date;
USE Math;
scripts = [];
scripts.push(
start _ "/js/translation_strings." _ lang_code _ ".js?" _ Math.int( date.now / 3600 ),
);
IF bodyclass.match('frontpage');
scripts.push(
version('/js/front.js'),
version('/js/geolocation.js'),
version('/js/loading-attribute-polyfill.js'),
);
ELSIF bodyclass.match('alertpage');
scripts.push(
version('/js/geolocation.js'),
);
ELSIF bodyclass.match('offlinepage');
ELSE;
scripts.push(
version('/js/validation_rules.js'),
version('/vendor/jquery-2.2.4.min.js'),
version('/vendor/jquery.multi-select.min.js'),
version('/vendor/jquery.validate.min.js'),
version('/cobrands/fixmystreet/fixmystreet.js'),
);
END;
FOR script IN extra_js;
scripts.push(script);
END;
IF c.user_exists AND (c.user.from_body OR c.user.is_superuser);
scripts.push(
version('/js/geolocation.js'),
version('/vendor/jquery-2.2.4.min.js'),
version('/cobrands/fixmystreet/staff.js')
);
IF bodyclass.match('mappage') AND c.cobrand.suggest_duplicates AND NOT login_success AND NOT oauth_need_email;
scripts.push(
version('/js/duplicates.js')
);
END;
IF c.user.has_body_permission_to('planned_reports');
scripts.push(
version('/vendor/idb-keyval-iife.min.js'),
version('/cobrands/fixmystreet/offline.js'),
);
END;
END;
IF bodyclass.match('mappage');
FOR script IN map_js.merge(c.cobrand.call_hook('map_js_extra'));
IF script.match('^/');
scripts.push(version(script));
ELSE;
scripts.push(script);
END;
END;
scripts.push(
version('/cobrands/fixmystreet/map.js'),
version('/vendor/dropzone.min.js'),
version('/vendor/fancybox/jquery.fancybox-1.3.4.pack.js'),
version('/js/loading-attribute-polyfill.js'),
);
ELSE;
scripts.push(
version('/cobrands/fixmystreet/prefetch-polyfill.js'),
);
END;
IF admin;
scripts.push(
version('/cobrands/fixmystreet/admin.js'),
version('/vendor/html5sortable.min.js'),
);
END;
TRY;
PROCESS 'footer_extra_js.html';
CATCH file;
END;
<!-- footer_extra_js.html START -->
<!-- N/A - footer_extra_js.html does not exist in base, it's used if needed in some custom themes -->
<!-- footer_extra_js.html END -->
~%]
<!-- common_scripts.html END -->
<!--[if lte IE 9]>
<script src="[% version('/vendor/history.polyfill.min.js') %]"></script>
<![endif]-->
[%
scripts_seen = {};
FOR script IN scripts;
script = script.0 ? script : [ script ];
NEXT IF scripts_seen.${script.0};
scripts_seen.${script.0} = 1;
~%]
<script src="[% script.0 %]"
[%~ FOR attr IN script.1 %] [% attr.key %]="[% attr.value %]"[% END ~%]
></script>
[% END %]
<!-- common_footer_tags.html END -->
</body>
</html>
<!-- footer.html END -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment