diff options
author | Struan Donald <struan@exo.org.uk> | 2019-03-22 12:45:43 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2019-03-25 14:31:00 +0000 |
commit | 44e52db4d0eb01e09b4c4210203eeb485c637b49 (patch) | |
tree | e12826d88e466bfcecc6c03b7e1d685d44cfb1ba | |
parent | 6ddee0561b6a91d9a82dae6a0941454dd2d2ac24 (diff) |
Allow cobrand customisation of privacy URL
Add a privacy_policy_url function to the cobrand and use that in the
templates instead of hard coding /privacy
12 files changed, 19 insertions, 11 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index 785177b5e..946523626 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -1246,4 +1246,12 @@ still be sent (because it wasn't disabled on the FixMyStreet cobrand). sub send_moderation_notifications { 1 } +=item privacy_policy_url + +The URL of the privacy policy to use on the report and update submissions forms. + +=cut + +sub privacy_policy_url { '/privacy' } + 1; diff --git a/templates/web/base/about/_sidebar.html b/templates/web/base/about/_sidebar.html index ae32dfb51..2609e4a7c 100755 --- a/templates/web/base/about/_sidebar.html +++ b/templates/web/base/about/_sidebar.html @@ -2,7 +2,7 @@ <aside> <ul class="plain-list"> <li>[% INCLUDE link h='/faq' t=loc('Frequently Asked Questions') %]</li> - <li>[% INCLUDE link h='/about/privacy' t=loc('Privacy and cookies') %]</li> + <li>[% INCLUDE link h=c.cobrand.privacy_policy_url t=loc('Privacy and cookies') %]</li> <li>[% INCLUDE link h='/contact' t=tprintf(loc("Contact %s", "%s is the site name"), site_name) %]</li> </ul> </aside> diff --git a/templates/web/base/main_nav_items.html b/templates/web/base/main_nav_items.html index 3940052a3..75fdecd9d 100644 --- a/templates/web/base/main_nav_items.html +++ b/templates/web/base/main_nav_items.html @@ -48,7 +48,7 @@ [%~ INCLUDE navitem uri='/faq' label=loc('Help') ~%] [%~ UNLESS hide_privacy_link ~%] - [%~ INCLUDE navitem uri='/privacy' label=loc('Privacy') liattrs='class="nav-menu__item--privacy"' ~%] + [%~ INCLUDE navitem uri=c.cobrand.privacy_policy_url label=loc('Privacy') liattrs='class="nav-menu__item--privacy"' ~%] [%~ END ~%] [%~ IF c.user_exists AND c.cobrand.admin_allow_user(c.user) ~%] diff --git a/templates/web/base/report/form/private_details.html b/templates/web/base/report/form/private_details.html index 5e5c23c24..4be861a19 100644 --- a/templates/web/base/report/form/private_details.html +++ b/templates/web/base/report/form/private_details.html @@ -11,7 +11,7 @@ <p class="form-section-description js-new-report-sign-in-hidden" id="js-councils_text_private"> [% IF js %] [% loc('These details will be sent to the council, but will never be shown online without your permission.') %] - (<a href="/privacy">[% loc('See our privacy policy') %]</a>.) + (<a href="[% c.cobrand.privacy_policy_url %]">[% loc('See our privacy policy') %]</a>.) [% ELSE %] [% PROCESS 'report/new/councils_text_private.html' %] [% END %] diff --git a/templates/web/base/report/new/councils_text.html b/templates/web/base/report/new/councils_text.html index bab30e8f9..5f4b113ca 100644 --- a/templates/web/base/report/new/councils_text.html +++ b/templates/web/base/report/new/councils_text.html @@ -2,7 +2,7 @@ [% 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>.'), - '/privacy') + c.cobrand.privacy_policy_url) %] [% ELSE %] [% PROCESS 'report/new/councils_text_all.html' %] diff --git a/templates/web/base/report/new/councils_text_all.html b/templates/web/base/report/new/councils_text_all.html index 3ea641cbf..d39288765 100644 --- a/templates/web/base/report/new/councils_text_all.html +++ b/templates/web/base/report/new/councils_text_all.html @@ -5,7 +5,7 @@ [% 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>.'), - list_of_names.join( '</strong>' _ loc(' or ') _ '<strong>' ), '/privacy' + list_of_names.join( '</strong>' _ loc(' or ') _ '<strong>' ), c.cobrand.privacy_policy_url ); %] diff --git a/templates/web/base/report/new/councils_text_private.html b/templates/web/base/report/new/councils_text_private.html index b6141d500..cab38c97e 100644 --- a/templates/web/base/report/new/councils_text_private.html +++ b/templates/web/base/report/new/councils_text_private.html @@ -4,5 +4,5 @@ [% ELSE %] [% loc('These details will be sent to the council, but will never be shown online without your permission.') %] [% END %] -(<a href="/privacy">[% loc('See our privacy policy') %]</a>.) +(<a href="[% c.cobrand.privacy_policy_url %]">[% loc('See our privacy policy') %]</a>.) [% END -%] diff --git a/templates/web/base/report/new/notes.html b/templates/web/base/report/new/notes.html index 8d55adc6e..bf44febed 100644 --- a/templates/web/base/report/new/notes.html +++ b/templates/web/base/report/new/notes.html @@ -1,7 +1,7 @@ <p>[% loc("Please note:") %]</p> <ul class="plain-list"> - <li>[% loc("We will only use your personal information in accordance with our <a href=\"/privacy\">privacy policy.</a>") %]</li> + <li>[% tprintf( loc("We will only use your personal information in accordance with our <a href=\"%s\">privacy policy.</a>"), c.cobrand.privacy_policy_url ) %]</li> <li>[% loc("Please be polite, concise and to the point.") %]</li> <li>[% loc("Please do not be abusive — abusing your council devalues the service for all users.") %]</li> <li>[% loc("Writing your message entirely in block capitals makes it hard to read, as does a lack of punctuation.") %]</li> diff --git a/templates/web/base/report/updates-sidebar-notes.html b/templates/web/base/report/updates-sidebar-notes.html index 1426e4d71..4f77e10b9 100644 --- a/templates/web/base/report/updates-sidebar-notes.html +++ b/templates/web/base/report/updates-sidebar-notes.html @@ -1,4 +1,4 @@ <p> [% loc( 'Please note that updates are not sent to the council.' ) %] - [% loc( 'Your information will only be used in accordance with our <a href="/privacy">privacy policy</a>' ) %] + [% tprintf( loc( 'Your information will only be used in accordance with our <a href="%s">privacy policy</a>' ), c.cobrand.privacy_policy_url ) %] </p> diff --git a/templates/web/fixmystreet-uk-councils/report/updates-sidebar-notes.html b/templates/web/fixmystreet-uk-councils/report/updates-sidebar-notes.html index e4f8dda1b..7b5bc01ae 100644 --- a/templates/web/fixmystreet-uk-councils/report/updates-sidebar-notes.html +++ b/templates/web/fixmystreet-uk-councils/report/updates-sidebar-notes.html @@ -2,5 +2,5 @@ [% IF NOT problem.updates_sent_to_body %] [% 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>' ) %] + [% tprintf( loc( 'Your information will only be used in accordance with our <a href="%s">privacy policy</a>' ), c.cobrand.privacy_policy_url ) %] </p> diff --git a/templates/web/fixmystreet.com/about/_sidebar.html b/templates/web/fixmystreet.com/about/_sidebar.html index 228639986..5cc9a0312 100644 --- a/templates/web/fixmystreet.com/about/_sidebar.html +++ b/templates/web/fixmystreet.com/about/_sidebar.html @@ -4,7 +4,7 @@ <li>[% INCLUDE link h='/faq' t=loc('Frequently Asked Questions') %]</li> <li>[% INCLUDE link h='/about/posters' t='FixMyStreet Goodies' %]</li> <li>[% INCLUDE link h='/about/house-rules' t='House Rules' %]</li> - <li>[% INCLUDE link h='/about/privacy' t=loc('Privacy and cookies') %]</li> + <li>[% INCLUDE link h=c.cobrand.privacy_policy_url t=loc('Privacy and cookies') %]</li> <li>[% INCLUDE link h='/contact' t=tprintf(loc("Contact %s", "%s is the site name"), site_name) %]</li> </ul> </aside> diff --git a/templates/web/fixmystreet.com/report/updates-sidebar-notes.html b/templates/web/fixmystreet.com/report/updates-sidebar-notes.html index e4f8dda1b..7d4375df5 100644 --- a/templates/web/fixmystreet.com/report/updates-sidebar-notes.html +++ b/templates/web/fixmystreet.com/report/updates-sidebar-notes.html @@ -2,5 +2,5 @@ [% IF NOT problem.updates_sent_to_body %] [% 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>' ) %] + [% tprintf( loc( 'Your information will only be used in accordance with our <a href="%s">privacy policy</a>' ), c.council.privacy_policy_url ) %] </p> |