diff options
author | Struan Donald <struan@exo.org.uk> | 2014-03-21 17:34:57 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2014-04-08 13:21:13 +0100 |
commit | ee474f3340c02bc1b9e75accf303e16257d86882 (patch) | |
tree | 9149703d53e18d0b0b2fc888ebea7ae241d10043 | |
parent | 5c871b7093ac2fd137b980979bb210cc1cad59a7 (diff) |
Changes to alert-update formatting for ZeroTB
Include date in alerts
Remove everything apart from the update text as we don't need it
-rw-r--r-- | perllib/FixMyStreet/Cobrand/ZeroTB.pm | 13 | ||||
-rw-r--r-- | templates/email/zerotb/alert-update.txt | 9 |
2 files changed, 22 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/ZeroTB.pm b/perllib/FixMyStreet/Cobrand/ZeroTB.pm index c774610c4..32d14d0f6 100644 --- a/perllib/FixMyStreet/Cobrand/ZeroTB.pm +++ b/perllib/FixMyStreet/Cobrand/ZeroTB.pm @@ -29,6 +29,7 @@ sub allow_photo_upload{ return 0; } sub send_questionnaires { return 0; } sub on_map_default_max_pin_age { return 0; } sub never_confirm_updates { 1; } +sub include_time_in_update_alerts { 1; } sub get_clinic_list { my $self = shift; @@ -36,5 +37,17 @@ sub get_clinic_list { return $self->problems->search({ state => 'confirmed' }, { order_by => 'title' }); } +sub prettify_dt { + my ( $self, $dt, $type ) = @_; + $type ||= ''; + + if ( $type eq 'alert' ) { + return $dt->strftime('%H:%M %Y-%m-%d'); + } else { + return Utils::prettify_dt( $dt, $type ); + } + +} + 1; diff --git a/templates/email/zerotb/alert-update.txt b/templates/email/zerotb/alert-update.txt new file mode 100644 index 000000000..ee32524f9 --- /dev/null +++ b/templates/email/zerotb/alert-update.txt @@ -0,0 +1,9 @@ +Subject: New stockout report for Clinic - '<?=$values['title']?>' + +The following stockouts have been reported for this clinic: + +<?=$values['data']?> + +You cannot contact anyone by replying to this email. + +<?=$values['signature']?> |