X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Ftr-fixed.html;h=373c0ab3a6ef89198eee5c74ea622a068587d42d;hb=e151a538a611ed5aa3c08164cebc7230e5fa0da1;hp=095e1bce9dc9addf00c788f8a327eaf8745f712a;hpb=b0003b80600bb73625465e8e80bd654a863a43ad;p=freeside.git diff --git a/httemplate/elements/tr-fixed.html b/httemplate/elements/tr-fixed.html index 095e1bce9..373c0ab3a 100644 --- a/httemplate/elements/tr-fixed.html +++ b/httemplate/elements/tr-fixed.html @@ -1,6 +1,6 @@ <% include('tr-td-label.html', @_ ) %> - ><% $opt{'formatted_value'} || $opt{'curr_value'} || $opt{'value'} |h %> + <% $colspan %>><% $value %> @@ -10,6 +10,21 @@ my %opt = @_; -my $style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : ''; +my $style = $opt{'cell_style'} ? ' STYLE="'. $opt{'cell_style'}. '" ' : ''; + +my $colspan = $opt{'colspan'} ? ' COLSPAN="'. $opt{'colspan'}. '" ' : ''; + +my $value = $opt{'formatted_value'} || $opt{'curr_value'} || $opt{'value'}; +$value = $opt{'prefix'} . $value if defined($opt{'prefix'}); + +unless ( $opt{'noescape'} ) { + #compatibility with select-table and friends + if ( $opt{'multiple'} ) { + $value = [ split(/\s*,\s*/, $value) ] if !ref $value; + $value = join('
', map {encode_entities($_)} @$value); + } else { + $value = encode_entities($value) + } +}