summaryrefslogtreecommitdiff
path: root/httemplate/edit/part_export.cgi
diff options
context:
space:
mode:
authorivan <ivan>2002-06-11 08:29:09 +0000
committerivan <ivan>2002-06-11 08:29:09 +0000
commit0ff28424ec1178ba6369d643d3b5f43d51a17514 (patch)
treedb364c5038720a0fba820400bde6b1c5ede9fcc5 /httemplate/edit/part_export.cgi
parent6a5e93685fe7d6d3ca00d389338487578a848b84 (diff)
add crypt option to (bsd|sysv)shell export
Diffstat (limited to 'httemplate/edit/part_export.cgi')
-rw-r--r--httemplate/edit/part_export.cgi23
1 files changed, 19 insertions, 4 deletions
diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi
index af89c4e..fbc698e 100644
--- a/httemplate/edit/part_export.cgi
+++ b/httemplate/edit/part_export.cgi
@@ -45,15 +45,30 @@ my $widget = new HTML::Widgets::SelectLayers(
if $layer;
foreach my $option ( keys %{$exports->{$layer}{options}} ) {
-# foreach my $option ( qw(url login password groupID ) ) {
my $optinfo = $exports->{$layer}{options}{$option};
my $label = $optinfo->{label};
+ my $type = defined($optinfo->{type}) ? $optinfo->{type} : 'text';
my $value = $cgi->param($option)
|| $part_export->option($option)
|| (exists $optinfo->{default} ? $optinfo->{default} : '');
- $html .= qq!<TR><TD ALIGN="right">$label</TD>!.
- qq!<TD><INPUT TYPE="text" NAME="$option" VALUE="$value" SIZE=64></TD>!.
- '</TR>';
+ $html .= qq!<TR><TD ALIGN="right">$label</TD><TD>!;
+ if ( $type eq 'select' ) {
+ $html .= qq!<SELECT NAME="$option">!;
+ foreach my $select_option ( @{$optinfo->{options}} ) {
+ #if ( ref($select_option) ) {
+ #} else {
+ $selected = $select_option eq $value ? ' SELECTED' : '';
+ $html .= qq!<OPTION VALUE="$select_option"$selected>!.
+ qq!$select_option</OPTION>!;
+ #}
+ }
+ $html .= '</SELECT>';
+ } elsif ( $type eq 'text' ) {
+ $html .= qq!<INPUT TYPE="text" NAME="$option" VALUE="$value" SIZE=64>!;
+ } else {
+ $html .= "unknown type $type";
+ }
+ $html .= '</TD></TR>';
}
$html .= '</TABLE>';