X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fbrowse%2Fpart_export.cgi;h=1f835d729586c5996cc109b34cfc94b59c3db634;hp=876633afc85aa76530d00cb3d095f651b30e1e16;hb=e3503e19a5a6c876f410903a3946dd9f1597aa46;hpb=af96802d080094c381dd06b74488adfb20396574 diff --git a/httemplate/browse/part_export.cgi b/httemplate/browse/part_export.cgi index 876633afc..1f835d729 100755 --- a/httemplate/browse/part_export.cgi +++ b/httemplate/browse/part_export.cgi @@ -60,21 +60,25 @@ function part_export_areyousure(href) { % my %opt = $part_export->options; % my $defs = $part_export->info->{options}; % my %multiples; -% foreach my $opt (keys %$defs) { # is a Tie::IxHash -% my $group = $defs->{$opt}->{multiple}; +% foreach my $optname (keys %$defs) { # is a Tie::IxHash +% my $def = $defs->{$optname}; +% my $group = $def->{multiple}; % if ( $group ) { -% my @values = split("\n", $opt{$opt}); +% my @values = split("\n", $opt{$optname}); % $multiples{$group} ||= []; -% push @{ $multiples{$group} }, [ $opt, @values ] if @values; -% delete $opt{$opt}; -% } elsif (length($opt{$opt})) { # the normal case -%# foreach my $opt ( keys %opt ) { +% push @{ $multiples{$group} }, [ $optname, @values ] if @values; +% delete $opt{$optname}; +% } elsif (length($opt{$optname})) { # the normal case +% my $value = $opt{$optname}; +% if ( $def->{option_labels} ) { +% $value = $def->{option_labels}->{$value} || $value; +% } - <% $opt %>:  - <% encode_entities($opt{$opt}) %> + <% $optname %>:  + <% encode_entities($value) %> -% delete $opt{$opt}; +% delete $opt{$optname}; % } % } % # now any that are somehow not in the options list