X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Felements%2Fsearch.html;h=a279f5327fdd4ca1fb7dc1bc9cca6cc59c376cd2;hb=c29cfb306d842c30d366d920cc74cfa73ae2f9df;hp=f136832a24b4c8c2df244076ccc99e98c5f69cc1;hpb=379c06ccd4b984bfa8130d98f862799239a8d00c;p=freeside.git diff --git a/httemplate/search/elements/search.html b/httemplate/search/elements/search.html index f136832a2..a279f5327 100644 --- a/httemplate/search/elements/search.html +++ b/httemplate/search/elements/search.html @@ -222,6 +222,18 @@ if ( !$curuser->access_right('Download report data') ) { $type = 'html'; } +# split/map aligns here before doing anything else +my %align = ( + 'l' => 'left', + 'r' => 'right', + 'c' => 'center', + ' ' => '', + '.' => '', +); + +$opt{align} = [ map $align{$_}, split(//, $opt{align}) ], + unless !$opt{align} || ref($opt{align}); + if($type =~ /csv|xls/) { my $h = $opt{'header'}; my @del; @@ -245,18 +257,6 @@ $opt{disable_download} = 0 $opt{disable_download} = 1 if $opt{really_disable_download}; -# split/map aligns here, so that agent_virt can add a column -# (search-html.html will split aligns also if they aren't already split) -my %align = ( - 'l' => 'left', - 'r' => 'right', - 'c' => 'center', - ' ' => '', - '.' => '', -); -$opt{align} = [ map $align{$_}, split(//, $opt{align}) ], - unless !$opt{align} || ref($opt{align}); - # get our queries ready my $query = $opt{query} or die "query required"; my $count_query = $opt{count_query} or die "count_query required"; @@ -348,8 +348,8 @@ if ( $opt{'disableable'} ) { sub { shift->disabled ? 'FF0000' : '00CC00'; }; splice @{ $opt{'links'} }, $pos, 0, '' if $opt{'links'}; - splice @{ $opt{'link_onlicks'} }, $pos, 0, '' - if $opt{'link_onlicks'}; + splice @{ $opt{'link_onclicks'} }, $pos, 0, '' + if $opt{'link_onclicks'}; } #add show/hide disabled links