fix perl barf, RT#73098
[freeside.git] / httemplate / search / log.html
index 7714f46..9aa3736 100644 (file)
@@ -64,14 +64,14 @@ a:visited {text-decoration: none}
 <TR>
   <TD>From 
     <& /elements/input-date-field.html, {
-      name => 'beginning',
-      value => $cgi->param('beginning'),
+      name   => 'beginning',
+      value  => scalar($cgi->param('beginning')),
     } &>
   </TD>
   <TD>To 
     <& /elements/input-date-field.html, {
-      name => 'ending',
-      value => $cgi->param('ending') || '',
+      name   => 'ending',
+      value  => scalar($cgi->param('ending')) || '',
       noinit => 1,
     } &>
   </TD>
@@ -79,17 +79,17 @@ a:visited {text-decoration: none}
 <TR>
   <TD>Level
     <& /elements/select.html,
-      field => 'min_level',
-      options => [ 0..7 ],
-      labels => { map {$_ => $FS::Log::LEVELS[$_]} 0..7 },
-      curr_value => $cgi->param('min_level'),
+      field      => 'min_level',
+      options    => [ 0..7 ],
+      labels     => { map {$_ => $FS::Log::LEVELS[$_]} 0..7 },
+      curr_value => scalar($cgi->param('min_level')),
     &>
      to
     <& /elements/select.html,
-      field => 'max_level',
-      options => [ 0..7 ],
-      labels => { map {$_ => $FS::Log::LEVELS[$_]} 0..7 },
-      curr_value => $cgi->param('max_level'),
+      field      => 'max_level',
+      options    => [ 0..7 ],
+      labels     => { map {$_ => $FS::Log::LEVELS[$_]} 0..7 },
+      curr_value => scalar($cgi->param('max_level')),
     &>
   </TD>
   <TD>
@@ -100,6 +100,12 @@ a:visited {text-decoration: none}
       labels => { map {$_, $_} @contexts },
       curr_value => ($cgi->param('context') || ''),
     &>
+    <BR><& /elements/checkbox.html,
+      'field' => 'context_height',
+      'postfix' => 'Only match most specific context',
+      'value' => 1,
+      'curr_value' => scalar($cgi->param('context_height')),
+    &>
   </TD>
 </TR>
 <TR>
@@ -210,7 +216,7 @@ $cgi->param('max_level', 7) unless defined($cgi->param('max_level'));
 my %search = ();
 $search{'date'} = [ FS::UI::Web::parse_beginning_ending($cgi) ];
 $search{'level'} = [ $cgi->param('min_level'), $cgi->param('max_level') ];
-foreach my $param (qw(agentnum context tablename tablenum custnum message)) {
+foreach my $param (qw(agentnum context context_height tablename tablenum custnum message)) {
   if ( $cgi->param($param) ) {
     $search{$param} = $cgi->param($param);
   }