From f0c1e25cd4774996d6e523bdad73ae3d8f6cabae Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Wed, 19 Mar 2014 12:26:18 +0000 Subject: Allow comments to be confirmed with no confirmation Add never_confirm_updates setting to cobrand that, when set to 0 means that comments are confirmed with no confirmation step. Essentially behaves as it would if the user was logged in. Also add a flag to the flash that indicates the comment was accepted to you can display a message on the report page if required --- perllib/FixMyStreet/Cobrand/Default.pm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'perllib/FixMyStreet/Cobrand/Default.pm') diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index 2de3eae5f..60ed216d7 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -829,6 +829,14 @@ sub show_unconfirmed_reports { 0; } +=head2 never_confirm_updates + +If true then we never send an email to confirm an update + +=cut + +sub never_confirm_updates { 0; } + =head2 prettify_dt my $date = $c->prettify_dt( $datetime ); -- cgit v1.2.3 From 5c871b7093ac2fd137b980979bb210cc1cad59a7 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Fri, 21 Mar 2014 17:30:07 +0000 Subject: Add Cobrand config to include update date in email alerts This is useful for sites where the updates aren't published on the site so you need a bit more context in the email alerts. Add inlude_time_in_update_alerts to default cobrand, off as default If this is set then the date is added after the name string in the email, passing in 'alert' as the type to dt_prettify in order to allow the cobrand to format it accordingly. This does require pulling out the alert confirmed time from the database in the send_alerts code where it wasn't before. --- perllib/FixMyStreet/Cobrand/Default.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'perllib/FixMyStreet/Cobrand/Default.pm') diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index 60ed216d7..d2af4949e 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -837,6 +837,8 @@ If true then we never send an email to confirm an update sub never_confirm_updates { 0; } +sub include_time_in_update_alerts { 0; } + =head2 prettify_dt my $date = $c->prettify_dt( $datetime ); -- cgit v1.2.3