diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2012-05-29 19:18:26 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2012-05-29 19:18:30 +0100 |
commit | 8e00196f2ff2c465cf3dc7fc2e1e1ac63477f3dc (patch) | |
tree | 9558d4e6cad10ac3608a1d90e9a3392f49376c5e | |
parent | 5f8282bb1ef349e1444a4db4cc9aa64a42c4f916 (diff) |
Use right parameter system for right emails.
-rw-r--r-- | perllib/FixMyStreet/App.pm | 9 | ||||
-rw-r--r-- | templates/email/default/alert-problem-area.txt | 2 | ||||
-rw-r--r-- | templates/email/default/alert-problem-council.txt | 2 | ||||
-rw-r--r-- | templates/email/default/alert-problem-nearby.txt | 2 | ||||
-rw-r--r-- | templates/email/default/alert-problem-ward.txt | 2 | ||||
-rw-r--r-- | templates/email/default/alert-problem.txt | 2 | ||||
-rw-r--r-- | templates/email/default/alert-update.txt | 2 | ||||
-rw-r--r-- | templates/email/default/questionnaire.txt | 2 | ||||
-rw-r--r-- | templates/email/default/submit-brent.txt | 2 | ||||
-rw-r--r-- | templates/email/default/submit.txt | 2 |
10 files changed, 18 insertions, 9 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm index 3d9f0a511..c689ea42f 100644 --- a/perllib/FixMyStreet/App.pm +++ b/perllib/FixMyStreet/App.pm @@ -319,6 +319,15 @@ sub send_email_cron { unpack('h*', random_bytes(5, 1)) ); + $params->{_parameters_}->{signature} = $c->view('Email')->render( + $c, 'signature.txt', { + additional_template_paths => [ + FixMyStreet->path_to( 'templates', 'email', $c->cobrand->moniker, $c->stash->{lang_code} )->stringify, + FixMyStreet->path_to( 'templates', 'email', $c->cobrand->moniker )->stringify, + ] + } + ); + my $email = mySociety::Locale::in_gb_locale { mySociety::Email::construct_email($params) }; if ( FixMyStreet->test_mode ) { diff --git a/templates/email/default/alert-problem-area.txt b/templates/email/default/alert-problem-area.txt index 196f3631e..3696c87d4 100644 --- a/templates/email/default/alert-problem-area.txt +++ b/templates/email/default/alert-problem-area.txt @@ -5,7 +5,7 @@ The following new problems have been added within <?=$values['data']?> -[% INCLUDE 'signature.txt' %] +<?=$values['signature']?> To stop receiving emails when there are new problems in <?=$values['area_name']?>, please follow this link: diff --git a/templates/email/default/alert-problem-council.txt b/templates/email/default/alert-problem-council.txt index 09c8cc3f8..5544a2043 100644 --- a/templates/email/default/alert-problem-council.txt +++ b/templates/email/default/alert-problem-council.txt @@ -4,7 +4,7 @@ The following new problems have been reported to <?=$values['area_name']?>: <?=$values['data']?> -[% INCLUDE 'signature.txt' %] +<?=$values['signature']?> To stop receiving emails when there are new problems reported to <?=$values['area_name']?>, please follow this link: diff --git a/templates/email/default/alert-problem-nearby.txt b/templates/email/default/alert-problem-nearby.txt index a0a8489ca..0c88dab5a 100644 --- a/templates/email/default/alert-problem-nearby.txt +++ b/templates/email/default/alert-problem-nearby.txt @@ -4,7 +4,7 @@ The following nearby problems have been added: <?=$values['data']?> -[% INCLUDE 'signature.txt' %] +<?=$values['signature']?> To stop receiving emails when there are nearby problems, please follow this link: <?=$values['unsubscribe_url']?> diff --git a/templates/email/default/alert-problem-ward.txt b/templates/email/default/alert-problem-ward.txt index 5e75b5948..9793bcdac 100644 --- a/templates/email/default/alert-problem-ward.txt +++ b/templates/email/default/alert-problem-ward.txt @@ -5,7 +5,7 @@ within <?=$values['ward_name']?>: <?=$values['data']?> -[% INCLUDE 'signature.txt' %] +<?=$values['signature']?> To stop receiving emails when there are new problems reported to <?=$values['area_name']?> within <?=$values['ward_name']?>, diff --git a/templates/email/default/alert-problem.txt b/templates/email/default/alert-problem.txt index b2384a217..01e184e0a 100644 --- a/templates/email/default/alert-problem.txt +++ b/templates/email/default/alert-problem.txt @@ -4,7 +4,7 @@ The following new problems have been added: <?=$values['data']?> -[% INCLUDE 'signature.txt' %] +<?=$values['signature']?> To stop receiving emails when there are new problems, please follow this link: <?=$values['unsubscribe_url']?> diff --git a/templates/email/default/alert-update.txt b/templates/email/default/alert-update.txt index edbb0d5f7..1140de1fa 100644 --- a/templates/email/default/alert-update.txt +++ b/templates/email/default/alert-update.txt @@ -11,7 +11,7 @@ To view or reply to these updates, please visit the following URL: You cannot contact anyone by replying to this email. -[% INCLUDE 'signature.txt' %] +<?=$values['signature']?> To stop receiving emails when there are new updates on this problem, please follow this link: <?=$values['unsubscribe_url']?> diff --git a/templates/email/default/questionnaire.txt b/templates/email/default/questionnaire.txt index 275362d3e..88d4cc1b5 100644 --- a/templates/email/default/questionnaire.txt +++ b/templates/email/default/questionnaire.txt @@ -13,7 +13,7 @@ updating the status of your problem: Please do not reply to this email; there is a public comment box on the questionnaire. -[% INCLUDE 'signature.txt' %] +<?=$values['signature']?> Your problem was as follows: diff --git a/templates/email/default/submit-brent.txt b/templates/email/default/submit-brent.txt index e23da8065..7936af568 100644 --- a/templates/email/default/submit-brent.txt +++ b/templates/email/default/submit-brent.txt @@ -29,7 +29,7 @@ Longitude: <?=$values['longitude']?> Replies to this email will go to the user who submitted the problem. -[% INCLUDE 'signature.txt' %] +<?=$values['signature']?> This message was sent via FixMyStreet, a project of UKCOD, registered charity number 1076346. If there is a more appropriate email address for messages about diff --git a/templates/email/default/submit.txt b/templates/email/default/submit.txt index 118679d09..d40c5f055 100644 --- a/templates/email/default/submit.txt +++ b/templates/email/default/submit.txt @@ -29,7 +29,7 @@ Longitude: <?=$values['longitude']?> Replies to this email will go to the user who submitted the problem. -[% INCLUDE 'signature.txt' %] +<?=$values['signature']?> This message was sent via FixMyStreet, a project of UKCOD, registered charity number 1076346. If there is a more appropriate email address for messages about |