Optimize "Customer has a referring customer" condition, RT#74452
[freeside.git] / httemplate / elements / tr-fixed.html
1 <& tr-td-label.html, @_ &>
2
3   <TD <% $style %> <% $colspan %>><% $value %></TD>
4
5 </TR>
6
7 <& hidden.html, %opt &>
8
9 <%init>
10
11 my %opt = @_;
12
13 my $style = $opt{'cell_style'}
14               ? ' STYLE="'. $opt{'cell_style'}. '" '
15               : ' STYLE="color:#666666" ';
16
17 my $colspan = $opt{'colspan'} ? ' COLSPAN="'. $opt{'colspan'}. '" ' : '';
18
19 my $value = $opt{'formatted_value'} || $opt{'curr_value'} || $opt{'value'};
20 $value = $opt{'prefix'} . $value if defined($opt{'prefix'});
21
22 unless ( $opt{'noescape'} ) {
23   #compatibility with select-table and friends
24   if ( $opt{'multiple'} ) {
25     $value = [ split(/\s*,\s*/, $value) ] if !ref $value;
26     $value = join('<BR>', map {encode_entities($_)} @$value);
27   } else {
28     $value = encode_entities($value)
29   }
30 }
31
32 </%init>