diff options
author | Matthew Somerville <matthew@mysociety.org> | 2013-02-11 15:33:06 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2013-02-11 15:33:06 +0000 |
commit | 29d1f70b3a2df58ba6c3212080744fc48dd4cb5f (patch) | |
tree | 785ab00fb227037629d7a14a9dd51afc829480a5 /perllib | |
parent | 603c118dca77621ce4d45a66ca8ea4bbb3ba7919 (diff) |
Allow email indent to be a cobrand parameter.
Diffstat (limited to 'perllib')
-rw-r--r-- | perllib/FixMyStreet/App.pm | 1 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Default.pm | 8 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Zurich.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/DB/ResultSet/AlertType.pm | 1 | ||||
-rw-r--r-- | perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm | 1 | ||||
-rw-r--r-- | perllib/FixMyStreet/SendReport/Email.pm | 1 |
6 files changed, 14 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm index db92736cd..4469ad1c9 100644 --- a/perllib/FixMyStreet/App.pm +++ b/perllib/FixMyStreet/App.pm @@ -315,6 +315,7 @@ sub send_email { { _template_ => $email->body, # will get line wrapped _parameters_ => {}, + _line_indent => $c->cobrand->email_indent, $email->header_pairs } ) }; diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index 8da9ec883..d99950ad0 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -810,5 +810,13 @@ sub prettify_dt { return Utils::prettify_dt( $dt, 1 ); } +=head2 email_indent + +Set to an indent string if you wish to override the default email handling. + +=cut + +sub email_indent { undef; } + 1; diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm index 236438689..c7396f0c3 100644 --- a/perllib/FixMyStreet/Cobrand/Zurich.pm +++ b/perllib/FixMyStreet/Cobrand/Zurich.pm @@ -132,6 +132,8 @@ sub overdue { } } +sub email_indent { ''; } + # Specific administrative displays sub admin_pages { diff --git a/perllib/FixMyStreet/DB/ResultSet/AlertType.pm b/perllib/FixMyStreet/DB/ResultSet/AlertType.pm index 8e9b3d17e..f2b86725d 100644 --- a/perllib/FixMyStreet/DB/ResultSet/AlertType.pm +++ b/perllib/FixMyStreet/DB/ResultSet/AlertType.pm @@ -236,6 +236,7 @@ sub _send_aggregated_alert_email(%) { { _template_ => $template, _parameters_ => \%data, + _line_indent => $cobrand->email_indent, From => [ $sender, _($cobrand->contact_name) ], To => $data{alert_email}, }, diff --git a/perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm b/perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm index 1b9521a9f..8d811180e 100644 --- a/perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm +++ b/perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm @@ -101,6 +101,7 @@ sub send_questionnaires_period { { _template_ => $template, _parameters_ => \%h, + _line_indent => $cobrand->email_indent, To => [ [ $row->user->email, $row->name ] ], From => [ $sender, $sender_name ], }, diff --git a/perllib/FixMyStreet/SendReport/Email.pm b/perllib/FixMyStreet/SendReport/Email.pm index 1ff476da3..9006e2f11 100644 --- a/perllib/FixMyStreet/SendReport/Email.pm +++ b/perllib/FixMyStreet/SendReport/Email.pm @@ -87,6 +87,7 @@ sub send { { _template_ => $self->get_template( $row ), _parameters_ => $h, + _line_indent => $row->cobrand eq 'zurich' ? '' : undef, # XXX Access to Cobrand module here? To => $self->to, From => $self->send_from( $row ), }, |