diff options
author | Jonathan Prykop <jonathan@freeside.biz> | 2015-10-20 20:56:13 -0500 |
---|---|---|
committer | Jonathan Prykop <jonathan@freeside.biz> | 2015-10-20 20:56:13 -0500 |
commit | 974fceaaca8e1404750a60a4daafb568b1be5159 (patch) | |
tree | bfd6943babb0551302951cc9fd3a163491b95ba1 /httemplate/misc | |
parent | b25c22890cc4523988b1dc84938d1e52bc681e25 (diff) |
RT#38217: Send email when logging conditions are met
Diffstat (limited to 'httemplate/misc')
-rw-r--r-- | httemplate/misc/delete-log_email.html | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/httemplate/misc/delete-log_email.html b/httemplate/misc/delete-log_email.html new file mode 100644 index 000000000..cc17b15a0 --- /dev/null +++ b/httemplate/misc/delete-log_email.html @@ -0,0 +1,20 @@ +% if ($error) { +<P STYLE="color: red"><% $error %></P> +% } else { +<H1>Log email condition deleted</H1> +<SCRIPT> +window.top.location.reload(); +</SCRIPT> +% } + +<%init> +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right([ 'View system logs', 'Configuration' ]); + +my $logemailnum = $cgi->param('logemailnum'); +$logemailnum =~ /^\d+$/ or die "bad logemailnum '$logemailnum'"; +my $log_email = FS::log_email->by_key($logemailnum) + or die "logemailnum '$logemailnum' not found"; +my $error = $log_email->delete; +</%init> + |