diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-06-13 18:39:05 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-06-20 15:02:11 +0100 |
commit | e57cbf483790bedfef6496be3c7ffa42882c3ffc (patch) | |
tree | d01788502457f801a846cdac78213df5ecdf1ea5 /templates | |
parent | a5f311e5147621f285cf31647ce675c502095882 (diff) |
[UK] Remove requirement for fixed body IDs.
Historically in UK cobrands, bodies have had IDs the same as the MapIt
area ID they cover. This can be confusing (if you are setting up a dev
environment, say) and should not be necessary. This commit removes the
requirement entirely, by switching any ID checks to either the name of
the body, or the actual area it covers.
One note: the body name in the test has to match so that we do not get
two bodies both covering 2237 created. This will not be necessary when
the tests are compartmentalized in the next commit.
Diffstat (limited to 'templates')
3 files changed, 3 insertions, 3 deletions
diff --git a/templates/email/fixmystreet.com/update-confirm-donotsend.txt b/templates/email/fixmystreet.com/update-confirm-donotsend.txt index 43be8fe26..8ab91836b 100644 --- a/templates/email/fixmystreet.com/update-confirm-donotsend.txt +++ b/templates/email/fixmystreet.com/update-confirm-donotsend.txt @@ -1,4 +1,4 @@ -[% IF update.problem.bodies_str != 2482 AND update.problem.bodies_str != 2347 %] +[% IF NOT update.problem.to_body_named('Bromley|Stevenage') %] Note that we do not send updates to [% update.problem.body %] - they are intended as a place for [% site_name %] users to discuss, support, and offer advice. diff --git a/templates/web/fixmystreet.com/report/banner.html b/templates/web/fixmystreet.com/report/banner.html index 6fd74a7fe..0a1af38f2 100644 --- a/templates/web/fixmystreet.com/report/banner.html +++ b/templates/web/fixmystreet.com/report/banner.html @@ -14,7 +14,7 @@ [% INCLUDE banner, id = 'closed', text = loc('Closed') %] [% END %] -[% IF NOT problem.bodies_str == '2482' %] +[% IF NOT problem.to_body_named('Bromley') %] [% IF problem.is_open AND date.now - problem.lastupdate.epoch > 8 * 7 * 24 * 60 * 60 %] [% INCLUDE banner, id = 'unknown', text = loc('Unknown') %] diff --git a/templates/web/fixmystreet.com/report/updates-sidebar-notes.html b/templates/web/fixmystreet.com/report/updates-sidebar-notes.html index 276ab4106..90e88d86c 100644 --- a/templates/web/fixmystreet.com/report/updates-sidebar-notes.html +++ b/templates/web/fixmystreet.com/report/updates-sidebar-notes.html @@ -1,5 +1,5 @@ <p> - [% IF problem.send_method_used != 'Open311' OR ( NOT problem.bodies_str.match('2482|2347') ) %] + [% IF problem.send_method_used != 'Open311' OR NOT problem.to_body_named('Bromley|Stevenage') %] [% loc( 'Please note that updates are not sent to the council.' ) %] [% END %] [% loc( 'Your information will only be used in accordance with our <a href="/privacy">privacy policy</a>' ) %] |