diff options
-rw-r--r-- | perllib/FixMyStreet/Map/Bristol.pm | 4 | ||||
-rw-r--r-- | perllib/FixMyStreet/Script/Inactive.pm | 2 | ||||
-rw-r--r-- | templates/email/bexley/_problem-confirm_footer.html | 12 | ||||
-rw-r--r-- | templates/email/buckinghamshire/other-reported.html | 7 | ||||
-rw-r--r-- | templates/email/buckinghamshire/other-reported.txt | 6 | ||||
-rw-r--r-- | templates/email/default/problem-confirm.html | 1 | ||||
-rw-r--r-- | templates/web/bexley/email_sent.html | 38 | ||||
-rw-r--r-- | templates/web/bexley/front/pre-steps.html | 12 | ||||
-rw-r--r-- | templates/web/bexley/tokens/_extras_confirm.html | 12 | ||||
-rw-r--r-- | templates/web/buckinghamshire/front/pre-steps.html | 7 | ||||
-rw-r--r-- | templates/web/fixmystreet.com/before_wrapper.html | 26 | ||||
-rw-r--r-- | templates/web/tfl/front/pre-steps.html | 9 | ||||
-rw-r--r-- | web/cobrands/fixmystreet.com/_survey-banner.scss | 124 | ||||
-rw-r--r-- | web/cobrands/fixmystreet.com/base.scss | 1 |
14 files changed, 257 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/Map/Bristol.pm b/perllib/FixMyStreet/Map/Bristol.pm index f6f5406de..70240a991 100644 --- a/perllib/FixMyStreet/Map/Bristol.pm +++ b/perllib/FixMyStreet/Map/Bristol.pm @@ -8,9 +8,9 @@ use strict; sub default_zoom { 5; } -sub urls { [ 'https://maps.bristol.gov.uk/arcgis/rest/services/base/2015_BCC_96dpi/MapServer/WMTS/tile' ] } +sub urls { [ 'https://maps.bristol.gov.uk/arcgis/rest/services/base/2019_Q2_BCC_96dpi/MapServer/WMTS/tile' ] } -sub layer_names { [ '2015_BCC_96dpi' ] } +sub layer_names { [ '2019_Q2_BCC_96dpi' ] } sub scales { my $self = shift; diff --git a/perllib/FixMyStreet/Script/Inactive.pm b/perllib/FixMyStreet/Script/Inactive.pm index e09417648..8dd524ce1 100644 --- a/perllib/FixMyStreet/Script/Inactive.pm +++ b/perllib/FixMyStreet/Script/Inactive.pm @@ -191,7 +191,7 @@ sub email_inactive_users { user => $user, url => $self->base_cobrand->base_url_with_lang . '/my', }, - { To => [ $user->email, $user->name ] }, + { To => [ [ $user->email, $user->name ] ] }, undef, 0, $self->base_cobrand, ); diff --git a/templates/email/bexley/_problem-confirm_footer.html b/templates/email/bexley/_problem-confirm_footer.html new file mode 100644 index 000000000..5a7cc2782 --- /dev/null +++ b/templates/email/bexley/_problem-confirm_footer.html @@ -0,0 +1,12 @@ +<p style="border: 0.1em solid rgb(252, 13, 27); padding: 0.5em; background-color: rgb(237, 207, 206);"> + <strong>While we find ourselves in these unprecedented times.</strong> + All issues reported on Bexley’s FixMyStreet system will continue to be + actioned to keep our roads safe for critical workers to be able to continue + to support the London Borough of Bexley and its residents. We may take + longer to respond to you while we concentrate on getting issues resolved in + priority order and within available resources. Non-urgent defects may also + take longer than normal to fix. We will continue to serve you the best that + we can but urge everyone not to make journeys unless absolutely necessary + and not report to anything that is not urgent. Thank you for + your understanding. +</p> diff --git a/templates/email/buckinghamshire/other-reported.html b/templates/email/buckinghamshire/other-reported.html index 341df8120..8f790425f 100644 --- a/templates/email/buckinghamshire/other-reported.html +++ b/templates/email/buckinghamshire/other-reported.html @@ -22,6 +22,13 @@ using the email address associated with the report.</p> [% IF cobrand.owns_problem( report ) %] [% TRY %][% INCLUDE '_council_reference.html' problem=report %][% CATCH file %][% END %] [% END %] + +<p style="[% p_style %]"> +Due to the current COVID 19 crisis and associated restrictions regrettably we +must prioritise more urgent work, therefore we hope you will understand that +there may be a delay in fixing the defect. +</p> + <p style="margin: 20px auto; text-align: center"> <a style="[% button_style %]" href="[% cobrand.base_url_for_report(report) %][% report.view_url %]">View my report</a> </p> diff --git a/templates/email/buckinghamshire/other-reported.txt b/templates/email/buckinghamshire/other-reported.txt index 4d354d3ed..8fa9cfb15 100644 --- a/templates/email/buckinghamshire/other-reported.txt +++ b/templates/email/buckinghamshire/other-reported.txt @@ -2,7 +2,7 @@ Subject: Your [% report.category | lower %] report has been logged Hello [% report.name %], -Your report to [% report.body %] has been logged on [% site_name %]. +Thank you for your report to [% report.body %] which has been logged on [% site_name %]. [% IF report.non_public ~%] It has been marked as private and will not be visible to the general public; @@ -15,6 +15,10 @@ associated with the report. [% TRY %][% INCLUDE '_council_reference.txt' problem=report %][% CATCH file %][% END %] [% END %] +Due to the current COVID 19 crisis and associated restrictions regrettably we +must prioritise more urgent work, therefore we hope you will understand that +there may be a delay in fixing the defect. + It is available to view at: [% cobrand.base_url_for_report(report) %][% report.view_url %] diff --git a/templates/email/default/problem-confirm.html b/templates/email/default/problem-confirm.html index b94a008f7..40b83a5a0 100644 --- a/templates/email/default/problem-confirm.html +++ b/templates/email/default/problem-confirm.html @@ -25,6 +25,7 @@ of problem, so it will instead be sent to [% report.body %]. <a style="[% button_style %]" href="[% token_url %]">Yes, send my report</a> </p> <p style="[% p_style %]">If you no longer wish to send this report, please take no further action.</p> + [% TRY %][% INCLUDE '_problem-confirm_footer.html' %][% CATCH file %][% END %] [% end_padded_box | safe %] </th> [% WRAPPER '_email_sidebar.html' object = report, url = token_url %] diff --git a/templates/web/bexley/email_sent.html b/templates/web/bexley/email_sent.html new file mode 100644 index 000000000..293959183 --- /dev/null +++ b/templates/web/bexley/email_sent.html @@ -0,0 +1,38 @@ +[% INCLUDE 'header.html', bodyclass = 'fullwidthpage', title = loc('Create a report') %] + +<div class="confirmation-header confirmation-header--inbox"> + + <h1>[% loc("Nearly done! Now check your email…") %]</h1> + + <p> + [% IF email_type == 'problem' %] + [% loc("Click the link in our confirmation email to publish your problem.") %] + [% ELSIF email_type == 'update' %] + [% loc("Click the link in our confirmation email to publish your update.") %] + [% ELSIF email_type == 'alert' %] + [% loc("Click the link in our confirmation email to activate your alert.") %] + [% END %] + </p> + + [% TRY %][% INCLUDE '_email_sent_extra.html' %][% CATCH file %][% END %] + + <p> + [% loc("Can’t find our email? Check your spam folder – that’s the solution 99% of the time.") %] + </p> + + <p style="border: 0.1em solid rgb(252, 13, 27); padding: 0.5em; background-color: rgb(237, 207, 206);"> + <strong>While we find ourselves in these unprecedented times.</strong> + All issues reported on Bexley’s FixMyStreet system will continue to be + actioned to keep our roads safe for critical workers to be able to continue + to support the London Borough of Bexley and its residents. We may take + longer to respond to you while we concentrate on getting issues resolved in + priority order and within available resources. Non-urgent defects may also + take longer than normal to fix. We will continue to serve you the best that + we can but urge everyone not to make journeys unless absolutely necessary + and not report to anything that is not urgent. Thank you for + your understanding. + </p> + +</div> + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/bexley/front/pre-steps.html b/templates/web/bexley/front/pre-steps.html new file mode 100644 index 000000000..830690fe7 --- /dev/null +++ b/templates/web/bexley/front/pre-steps.html @@ -0,0 +1,12 @@ +<p style="border: 0.3em solid rgb(252, 13, 27); padding: 2em; background-color: rgb(237, 207, 206); font-size: 1.2em;"> +<strong>While we find ourselves in these unprecedented times.</strong> + All issues reported on Bexley’s FixMyStreet system will continue to be + actioned to keep our roads safe for critical workers to be able to continue + to support the London Borough of Bexley and its residents. We may take + longer to respond to you while we concentrate on getting issues resolved in + priority order and within available resources. Non-urgent defects may also + take longer than normal to fix. We will continue to serve you the best that + we can but urge everyone not to make journeys unless absolutely necessary + and not report to anything that is not urgent. Thank you for your + understanding. +</p> diff --git a/templates/web/bexley/tokens/_extras_confirm.html b/templates/web/bexley/tokens/_extras_confirm.html new file mode 100644 index 000000000..5a7cc2782 --- /dev/null +++ b/templates/web/bexley/tokens/_extras_confirm.html @@ -0,0 +1,12 @@ +<p style="border: 0.1em solid rgb(252, 13, 27); padding: 0.5em; background-color: rgb(237, 207, 206);"> + <strong>While we find ourselves in these unprecedented times.</strong> + All issues reported on Bexley’s FixMyStreet system will continue to be + actioned to keep our roads safe for critical workers to be able to continue + to support the London Borough of Bexley and its residents. We may take + longer to respond to you while we concentrate on getting issues resolved in + priority order and within available resources. Non-urgent defects may also + take longer than normal to fix. We will continue to serve you the best that + we can but urge everyone not to make journeys unless absolutely necessary + and not report to anything that is not urgent. Thank you for + your understanding. +</p> diff --git a/templates/web/buckinghamshire/front/pre-steps.html b/templates/web/buckinghamshire/front/pre-steps.html new file mode 100644 index 000000000..4728bff2f --- /dev/null +++ b/templates/web/buckinghamshire/front/pre-steps.html @@ -0,0 +1,7 @@ +<p style="margin: -1em -1em 1em; padding: 20px 30px; background-color: #f79f73; color: #000;"> +In light of the ongoing COVID 19 crisis an element of TfB workforce has reduced +by the need for self-isolation. This regrettably means that for the immediate +future some work will have to be delayed. We apologise for any possible delay +in addressing your report and hope that you will understand in the +circumstances. +</p> diff --git a/templates/web/fixmystreet.com/before_wrapper.html b/templates/web/fixmystreet.com/before_wrapper.html new file mode 100644 index 000000000..9fc07343b --- /dev/null +++ b/templates/web/fixmystreet.com/before_wrapper.html @@ -0,0 +1,26 @@ +<div class="survey-banner"> + <p> + <span class="survey-banner__text">Share your views and help us improve FixMyStreet for everyone</span> + <a class="survey-banner__cta" href="https://www.surveygizmo.com/s3/5506345/46e9932d0fbf" target="_blank">Take our short survey</a> + </p> + <button class="survey-banner__close">Close</button> +</div> +<script nonce="[% csp_nonce %]"> +(function(){ + var live_site = location.hostname === 'www.fixmystreet.com'; + var hasnt_opted_out = document.cookie.indexOf('__has_closed_march_2020_survey') === -1; + var randomly_chosen = Math.random() > 0.6; + if ( live_site && hasnt_opted_out && randomly_chosen ) { + document.body.className = ((document.body.className) ? document.body.className + ' has-survey-banner' : 'has-survey-banner'); + document.querySelector('.survey-banner').style.display = 'block'; + } + function hide_survey(){ + document.querySelector('.survey-banner').style.display = 'none'; + document.body.className = document.body.className.replace('has-survey-banner', ''); + var t = new Date(); t.setFullYear(t.getFullYear() + 1); + document.cookie = '__has_closed_march_2020_survey=1; path=/; expires=' + t.toUTCString(); + } + document.querySelector('.survey-banner__close').onclick = hide_survey; + document.querySelector('.survey-banner__cta').onclick = hide_survey; +})(); +</script> diff --git a/templates/web/tfl/front/pre-steps.html b/templates/web/tfl/front/pre-steps.html new file mode 100644 index 000000000..314db0a93 --- /dev/null +++ b/templates/web/tfl/front/pre-steps.html @@ -0,0 +1,9 @@ +<p style="max-width: 38em; font-size: 1.2em; margin-bottom: 2.5em;"> + <strong>While we find ourselves in these unprecedented times.</strong> + All issues reported on Streetcare will continue to be acknowledged as + we work to keep our roads safe for critical workers to continue to + support London. We may take longer to respond to you while we concentrate on + getting issues resolved as our priority. Non-urgent defects may also take longer + than normal to fix. We will continue to serve you the best that we can but urge + everyone not to make journeys unless absolutely necessary. +</p> diff --git a/web/cobrands/fixmystreet.com/_survey-banner.scss b/web/cobrands/fixmystreet.com/_survey-banner.scss new file mode 100644 index 000000000..a3db76ba4 --- /dev/null +++ b/web/cobrands/fixmystreet.com/_survey-banner.scss @@ -0,0 +1,124 @@ +.survey-banner { + display: none; // will get shown by javascript + background: #A94CA6; + color: #fff; + position: relative; + z-index: 1; // stack in front of the page top border + text-align: center; + padding: 0 2.5em; // make space for the close button + + .map-reporting & { + display: none !important; + } + + p { + margin: 0; + padding: 12px 0; // 12px vertical padding, plus 4px margin on childen = 16px = 1em + line-height: 1.3; + } +} + +.survey-banner__text, +.survey-banner__cta { + display: inline-block; + margin: 4px 8px; +} + +.survey-banner__text { + font-size: 0.9em; +} + +.survey-banner__cta { + font-size: 0.8em; + font-weight: bold; + background: #fff; + color: #000; + padding: 0.4em 1em; + border-radius: 3em; + text-decoration: none; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.4); + + &:visited { + color: #000; + } + + &:focus { + outline: none; + box-shadow: 0 0 0 4px $primary; + } + + &:hover, + &:active { + background: mix(#A94CA6, #fff, 10%); + color: #000; + text-decoration: none; + } +} + +.survey-banner__close { + display: block; + position: absolute; + top: 0.5em; + right: 0.5em; + + width: 2em; + height: 0; + padding-top: 2em; + overflow: hidden; + + color: #fff; + background: transparent; + border: none; + + &:before { + display: block; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + content: "\00d7"; + font-size: 2em; + } + + @media screen and (min-width: 48em) { + top: 50%; + right: 0.75em; + transform: translate(0, -50%); + } +} + + +@media screen and (min-width: 48em) { + .mappage.has-survey-banner { + $mappage-header-height: 4em !default; + $banner-height: 3.5em; + + .survey-banner { + p { + display: flex; + justify-content: center; + align-items: center; + height: $banner-height; + padding-top: 0; + padding-bottom: 0; + } + } + + #site-header { + top: 0 + $banner-height; + } + + #map_box, + #map_sidebar { + top: $mappage-header-height + $banner-height; + } + + .nav-wrapper { + @if ($header-top-border) { + top: $header-top-border-width + $banner-height; + } @else { + top: 0 + $banner-height; + } + } + } +} diff --git a/web/cobrands/fixmystreet.com/base.scss b/web/cobrands/fixmystreet.com/base.scss index f261e677d..e17a7e4cf 100644 --- a/web/cobrands/fixmystreet.com/base.scss +++ b/web/cobrands/fixmystreet.com/base.scss @@ -176,6 +176,7 @@ svg|g.site-logo__svg { border-bottom: none; } +@import "survey-banner"; $mysoc-footer-background-color: #222; $mysoc-footer-text-color: #acacac; |