-<% include( 'elements/search.html',
+<& elements/search.html,
'title' => $title,
'html_init' => $html_init,
'menubar' => $menubar,
#'',
FS::UI::Web::cust_styles(),
],
- )
-%>
+&>
<%once>
my $status_sub = sub {
my $cust_event = shift;
my $status = $cust_event->status;
- $status .= ': '.$cust_event->statustext
+ $status .= ': '. encode_entities($cust_event->statustext)
if $cust_event->statustext;
my $part_event = $cust_event->part_event;
|| $cgi->param('pkgnum') =~ /^(\d+)$/
);
-my $title = $cgi->param('failed') ? 'Failed billing events' : 'Billing events';
+my @statuses = $cgi->param('event_status');
+my $title = 'Billing events';
+if ( $statuses[0] eq 'failed' and !defined($statuses[1]) ) {
+ # tweak the title if we're showing only failed events
+ $title = 'Failed billing events';
+}
my %search = ();
$search{$param} = scalar( $cgi->param($param) )
if $cgi->param($param);
}
+$search{event_status} = \@statuses;
#lists
my @lists = qw( payby eventpart );