summaryrefslogtreecommitdiff
path: root/httemplate/browse
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2014-12-28 23:26:26 -0800
committerMark Wells <mark@freeside.biz>2014-12-28 23:26:39 -0800
commita52edcc909e5873a2c8790ce33b03917d6e1d29c (patch)
treed1ead7d87e2b60d6eef4787852eb58dac1c52700 /httemplate/browse
parent7e07d384748a5d0c5307fd711e4af520bf3b3802 (diff)
voip.ms export, #31834
Diffstat (limited to 'httemplate/browse')
-rwxr-xr-xhttemplate/browse/part_export.cgi24
1 files changed, 14 insertions, 10 deletions
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;
+% }
<TR>
- <TD ALIGN="right" VALIGN="top" WIDTH="33%"><% $opt %>:&nbsp;</TD>
- <TD ALIGN="left" WIDTH="67%"><% encode_entities($opt{$opt}) %></TD>
+ <TD ALIGN="right" VALIGN="top" WIDTH="33%"><% $optname %>:&nbsp;</TD>
+ <TD ALIGN="left" WIDTH="67%"><% encode_entities($value) %></TD>
</TR>
-% delete $opt{$opt};
+% delete $opt{$optname};
% }
% }
% # now any that are somehow not in the options list