1 <% include('/elements/init_overlib.html') %>
2 <% include('/browse/elements/browse.html',
3 'title' => 'Log email condition configuration',
4 'name_singular' => 'condition',
5 'html_init' => '<P STYLE="margin-top: 0">'
11 'count_query' => $count_query,
19 'fields' => [ 'logemailnum',
20 sub { $_[0]->context || '(all)' },
21 sub { $FS::Log::LEVELS{$_[0]->min_level} },
26 'sort_fields' => [ 'logemailnum',
33 'links' => [ $editlink,
44 function areyousure_delete_log_email(logemailnum) {
45 if ( confirm( 'Delete log email condition #' + logemailnum )) {
48 '/elements/popup_link_onclick.html' => {
49 js_action => qq( '${fsurl}/misc/delete-log_email.html?logemailnum=' + logemailnum ),
50 actionlabel => 'Delete log email condition',
62 my $curuser = $FS::CurrentUser::CurrentUser;
65 unless $curuser->access_right([ 'View system logs', 'Configuration' ]);
67 my $add_condition_link = qq( <a href="${fsurl}edit/log_email.html">Add log email condition</a> );
69 my $system_log_link = qq(<A HREF="${p}search/log.html">System Log</A>);
72 'table' => 'log_email',
74 'addl_from' => 'LEFT JOIN msg_template USING (msgnum)',
78 my $count_query = "SELECT COUNT(*) FROM log_email";
81 my $logemailnum = shift->logemailnum;
82 qq!<A HREF="javascript:areyousure_delete_log_email($logemailnum)">(delete)</A>!;
85 my $editlink = [ $p.'edit/log_email.html?logemailnum=', 'logemailnum' ];