diff options
Diffstat (limited to 'templates')
11 files changed, 91 insertions, 90 deletions
diff --git a/templates/web/base/report/new/category_extras.html b/templates/web/base/report/new/category_extras.html index 41984dd9a..c0f6a7bae 100644 --- a/templates/web/base/report/new/category_extras.html +++ b/templates/web/base/report/new/category_extras.html @@ -1,6 +1,11 @@ <div id="category_meta"> + [%- category = report.category -%] + + [%- IF unresponsive.$category %] + [% INCLUDE "report/new/unresponsive_body.html" body_id = unresponsive.$category %] + [%- END %] + [%- IF report_meta %] - [%- category = report.category %] <h4>Additional Information</h4> [%- FOR meta IN category_extras.$category %] [%- meta_name = meta.code -%] diff --git a/templates/web/base/report/new/category_wrapper.html b/templates/web/base/report/new/category_wrapper.html new file mode 100644 index 000000000..f6bb618f0 --- /dev/null +++ b/templates/web/base/report/new/category_wrapper.html @@ -0,0 +1,17 @@ +[% IF js %] + <div id="form_category_row"> + <label for="form_category">[% loc('Category') %]</label> + <select name="category" id="form_category" required><option>[% loc('Loading...') %]</option></select> + </div> +[% ELSE %] + [% IF category_options.size %] + [% IF field_errors.category %] + <p class='form-error'>[% field_errors.category %]</p> + [% END %] + [% PROCESS "report/new/category.html" %] + [% END %] +[% END %] + +[%- IF category_extras %] + [% PROCESS "report/new/category_extras.html" %] +[%- END %] diff --git a/templates/web/base/report/new/councils_text.html b/templates/web/base/report/new/councils_text.html index f526beb28..65e41f0d1 100644 --- a/templates/web/base/report/new/councils_text.html +++ b/templates/web/base/report/new/councils_text.html @@ -1,5 +1,7 @@ [% FILTER collapse %] -[% IF bodies_to_list.size == 0 %] +[% IF unresponsive.ALL %] + [% PROCESS 'report/new/unresponsive_body.html' body_id = unresponsive.ALL %] +[% ELSIF bodies_to_list.size == 0 %] [% PROCESS 'report/new/councils_text_none.html' %] [% ELSIF bodies_to_list.size == bodies.size %] [% PROCESS 'report/new/councils_text_all.html' %] diff --git a/templates/web/base/report/new/fill_in_details_form.html b/templates/web/base/report/new/fill_in_details_form.html index cee0244c7..d1431ffd3 100644 --- a/templates/web/base/report/new/fill_in_details_form.html +++ b/templates/web/base/report/new/fill_in_details_form.html @@ -63,26 +63,7 @@ <textarea name="detail" id="form_detail" rows="7" cols="26" required>[% report.detail | html %]</textarea> </div> -[% IF js %] - <div class="form-field" id="form_category_row"> - <label for="form_category">[% loc('Category:') %]</label> - <select name="category" id="form_category" required><option>[% loc('Loading...') %]</option></select> - </div> -[% ELSE %] - [% IF category_options.size %] - [% IF field_errors.category %] - <div class='form-error'>[% field_errors.category %]</div> - [% END %] - - <div class="form-field"> - [% PROCESS "report/new/category.html" %] - </div> - [% END %] -[% END %] - -[%- IF category_extras %] -[% PROCESS "report/new/category_extras.html" %] -[%- END %] +[% PROCESS "report/new/category_wrapper.html" %] [% IF c.cobrand.allow_photo_upload %] [% IF field_errors.photo %] diff --git a/templates/web/bromley/report/new/fill_in_details_form.html b/templates/web/bromley/report/new/fill_in_details_form.html index e5c920eae..6bf077322 100644 --- a/templates/web/bromley/report/new/fill_in_details_form.html +++ b/templates/web/bromley/report/new/fill_in_details_form.html @@ -60,24 +60,7 @@ [% END %] <textarea rows="7" cols="26" name="detail" id="form_detail" placeholder="[% loc('Please describe the exact location of the report. Example: “2 dumped mattresses outside Number 19 Stockwell Close”') %]" required>[% report.detail | html %]</textarea> - [% IF js %] - <div id="form_category_row"> - <label for="form_category">[% loc('Category') %]</label> - <select name="category" id="form_category" required><option>[% loc('Loading...') %]</option></select> - </div> - [% ELSE %] - [% IF category_options.size %] - [% IF field_errors.category %] - <p class='form-error'>[% field_errors.category %]</p> - [% END %] - - [% PROCESS "report/new/category.html" %] - [% END %] - [% END %] - - [%- IF category_extras %] - [% PROCESS "report/new/category_extras.html" %] - [%- END %] + [% PROCESS "report/new/category_wrapper.html" %] [% IF c.cobrand.allow_photo_upload %] [% IF field_errors.photo %] diff --git a/templates/web/emptyhomes/report/new/fill_in_details_form.html b/templates/web/emptyhomes/report/new/fill_in_details_form.html index e6ddd56a0..20b0b6842 100644 --- a/templates/web/emptyhomes/report/new/fill_in_details_form.html +++ b/templates/web/emptyhomes/report/new/fill_in_details_form.html @@ -45,22 +45,7 @@ <p>[% loc('Please do not give address or personal information in this section.') %]</p> -[% IF js %] - <div class="form-field" id="form_category_row"> - <label for="form_category">[% loc('Category:') %]</label> - <select name="category" id="form_category" required><option>[% loc('Loading...') %]</option></select> - </div> -[% ELSE %] - [% IF category_options.size %] - [% IF field_errors.category %] - <div class='form-error'>[% field_errors.category %]</div> - [% END %] - - <div class="form-field"> - [% PROCESS "report/new/category.html" %] - </div> - [% END %] -[% END %] +[% PROCESS "report/new/category_wrapper.html" %] [% IF field_errors.title %] <div class='form-error'>[% field_errors.title %]</div> diff --git a/templates/web/fixmystreet.com/report/new/category_at_top.html b/templates/web/fixmystreet.com/report/new/category_at_top.html new file mode 100644 index 000000000..f131f37a1 --- /dev/null +++ b/templates/web/fixmystreet.com/report/new/category_at_top.html @@ -0,0 +1 @@ +[% PROCESS "report/new/category_wrapper.html" %] diff --git a/templates/web/fixmystreet.com/report/new/unresponsive_body.html b/templates/web/fixmystreet.com/report/new/unresponsive_body.html new file mode 100644 index 000000000..a1b41aaf5 --- /dev/null +++ b/templates/web/fixmystreet.com/report/new/unresponsive_body.html @@ -0,0 +1,12 @@ +<div class="unresponsive-council-warning"> + <h1>Important message</h1> + <p> + <span class="unresponsive-council">[% bodies.$body_id.name %]</span> doesn’t accept + [% IF category %] + <span class="refused-category">[% category | html %]</span> + [% END %] + reports. + </p> + <p>We can make your report public, but we can’t send it to the council.</p> + <a href="/unresponsive?body=[% body_id %][% IF category %];category=[% category | uri %][% END %]">What can I do instead?</a> +</div> diff --git a/templates/web/fixmystreet.com/static/unresponsive.html b/templates/web/fixmystreet.com/static/unresponsive.html new file mode 100644 index 000000000..3f09533bf --- /dev/null +++ b/templates/web/fixmystreet.com/static/unresponsive.html @@ -0,0 +1,38 @@ +[% INCLUDE header.html + title = 'Unresponsive councils: What you can do', bodyclass = 'unresponsive-council fullwidthpage' +%] + +<div class="unresponsive-council__header"> + <h1>Bad news :(</h1> + <p><strong class="unresponsive-council-name">[% body.name %]</strong> no + longer accepts [% IF category %][% category | html %][% END %] + reports from FixMyStreet.</p> +</div> + +<div class="unresponsive-council__body"> + <p><strong class="unresponsive-council-name">[% body.name %]</strong> is one + of only <strong>2%</strong> of councils that don’t accept reports from + FixMyStreet. We’re sad about it too, but here’s some things you can do now:</p> + + [% IF NOT body.external_url %] + <a href="[% body.external_url %]" class="unresponsive-council-cta unresponsive-council-cta--primary"> + <strong>Report your issue directly</strong> to <span class="unresponsive-council-name">[% body.name %]</span> on their website + </a> + [% ELSE %] + <a href="https://www.google.co.uk/search?q=report+[% body.name | uri %]" class="unresponsive-council-cta unresponsive-council-cta--primary"> + Find the website of <span class="unresponsive-council-name">[% body.name %]</span> and <strong>report your issue directly</strong> + </a> + [% END %] + + <h2>If you’d prefer to use FixMyStreet next time:</h2> + + <a href="https://www.writetothem.com/" class="unresponsive-council-cta"> + <strong>Write to your MP or local councillors</strong> to let them know this isn’t okay + </a> + + <a href="https://twitter.com/intent/tweet?via=fixmystreet" class="unresponsive-council-cta"> + <strong>Tweet</strong> to let <span class="unresponsive-council-name">[% body.name %]</span></strong> know you’d rather use FixMyStreet + </a> +</div> + +[% INCLUDE footer.html %] diff --git a/templates/web/fixmystreet/report/new/fill_in_details_form.html b/templates/web/fixmystreet/report/new/fill_in_details_form.html index 75e11c74f..82b1097b7 100644 --- a/templates/web/fixmystreet/report/new/fill_in_details_form.html +++ b/templates/web/fixmystreet/report/new/fill_in_details_form.html @@ -34,6 +34,14 @@ <p class='form-error'>[% field_errors.bodies %]</p> [% END %] + [% TRY %] + [%# Useful for amending form contents based on category selection %] + [% PROCESS 'report/new/category_at_top.html' %] + [% need_to_show_category_selector = 0 %] + [% CATCH file %] + [% need_to_show_category_selector = 1 %] + [% END %] + <label for="form_title">[% loc('One-line summary') %] [% INCLUDE 'report/public_label.html' %]</label> [% IF field_errors.title %] <p class='form-error'>[% field_errors.title %]</p> @@ -48,24 +56,10 @@ [% TRY %][% PROCESS 'report/new/inline-tips.html' %][% CATCH file %][% END %] - [% IF js %] - <div id="form_category_row"> - <label for="form_category">[% loc('Category') %]</label> - <select name="category" id="form_category" required><option>[% loc('Loading...') %]</option></select> - </div> - [% ELSE %] - [% IF category_options.size %] - [% IF field_errors.category %] - <p class='form-error'>[% field_errors.category %]</p> - [% END %] - [% PROCESS "report/new/category.html" %] - [% END %] + [% IF need_to_show_category_selector %] + [% PROCESS "report/new/category_wrapper.html" %] [% END %] - [%- IF category_extras %] - [% PROCESS "report/new/category_extras.html" %] - [%- END %] - [% TRY %][% PROCESS 'report/new/after_category.html' %][% CATCH file %][% END %] [% IF c.cobrand.allow_photo_upload %] diff --git a/templates/web/zurich/report/new/fill_in_details_form.html b/templates/web/zurich/report/new/fill_in_details_form.html index 67471867a..28d9ebe68 100644 --- a/templates/web/zurich/report/new/fill_in_details_form.html +++ b/templates/web/zurich/report/new/fill_in_details_form.html @@ -45,24 +45,7 @@ [% END %] <textarea rows="7" cols="26" name="detail" id="form_detail" placeholder="[% loc('Please fill in details of the problem.') %]" required>[% report.detail | html %]</textarea> - [% IF js %] - <div id="form_category_row"> - <label for="form_category">[% loc('Category') %]</label> - <select name="category" id="form_category" required><option>[% loc('Loading...') %]</option></select> - </div> - [% ELSE %] - [% IF category_options.size %] - [% IF field_errors.category %] - <p class='form-error'>[% field_errors.category %]</p> - [% END %] - - [% PROCESS "report/new/category.html" %] - [% END %] - [% END %] - - [%- IF category_extras %] - [% PROCESS "report/new/category_extras.html" %] - [%- END %] + [% PROCESS "report/new/category_wrapper.html" %] [% IF c.cobrand.allow_photo_upload %] <label for="form_photo">[% loc('Photo') %]</label> |