diff --git a/bind8/bind8-lib.pl b/bind8/bind8-lib.pl index eadce0fd2..e557c7751 100644 --- a/bind8/bind8-lib.pl +++ b/bind8/bind8-lib.pl @@ -463,9 +463,9 @@ elsif ($_[0]->{'type'} == 2) { # Returns a table row for a multi-value BIND option sub choice_input { -local ($rv, $v, $i, @opts); -$v = &find_value($_[1], $_[2]); -for($i=3; $i<@_; $i+=2) { +my $v = &find_value($_[1], $_[2]); +my @opts; +for(my $i=3; $i<@_; $i+=2) { push(@opts, [ $_[$i+1], $_[$i] ]); } return &ui_table_row($_[0], &ui_radio($_[1], $v, \@opts)); @@ -637,20 +637,15 @@ local $dir = { 'name' => $_[0], 'type' => 1, 'members' => \@vals }; } # opt_input(text, name, &config, default, size, units) +# Returns a table row with an optional text field sub opt_input { -local($v, $rv, $n); -$v = &find($_[1], $_[2]); +my $v = &find($_[1], $_[2]); +my $n; ($n = $_[1]) =~ s/[^A-Za-z0-9_]/_/g; -$rv = "