diff options
author | Jonathan Prykop <jonathan@freeside.biz> | 2015-12-23 21:46:53 -0600 |
---|---|---|
committer | Jonathan Prykop <jonathan@freeside.biz> | 2015-12-23 22:00:24 -0600 |
commit | 39565644151816e1c2f93d065c8129ea2153bf94 (patch) | |
tree | 726c96e3053271c3d0cc5fa2c9860f3e1bdd73fc /httemplate/edit/log_email.html | |
parent | c8f4149f2dc5a1f593a6ba422181c3d433cc6ef7 (diff) |
RT#38217 Send email when logging conditions are met [default template & dump-email_to upgrade]
Diffstat (limited to 'httemplate/edit/log_email.html')
-rw-r--r-- | httemplate/edit/log_email.html | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/httemplate/edit/log_email.html b/httemplate/edit/log_email.html index bbce7c708..709a24069 100644 --- a/httemplate/edit/log_email.html +++ b/httemplate/edit/log_email.html @@ -18,6 +18,7 @@ { 'field' => 'msgnum', 'type' => 'select-msg_template', 'empty_label' => 'Select template', + 'value' => $msgnum, 'required' => 1, }, ], @@ -42,4 +43,14 @@ my %opts = @_; die "access denied" unless $FS::CurrentUser::CurrentUser->access_right([ 'View system logs', 'Configuration' ]); +my $msgnum = $cgi->param('msgnum'); +unless ($msgnum) { + my ($msg_template) = qsearch('msg_template',{ msgname => 'System log' }); + # doesn't seem worth having a config just for the default selected template + # if they've deleted the system-generated one, just default to empty "Select template" + if ($msg_template) { + $msgnum = $msg_template->msgnum; + } +} + </%init> |