mirror of
https://github.com/webmin/webmin.git
synced 2026-09-14 17:40:40 +01:00
Multi-value options support
This commit is contained in:
@@ -35,3 +35,5 @@ Converted buttons on the module's main page to use the Webmin UI library.
|
||||
Expired leases are no longer counted towards usage on the DHCP Leases page.
|
||||
Added a mode to the DHCP Leases page to show usage by subnet, thanks to a suggestion by Coles.
|
||||
When applying the configuration fails with an error mentioning a line in the config file, 10 lines around that will also be displayed by Webmin in the error.
|
||||
---- Changes since 1.510 ----
|
||||
Added support for multi-value options, thanks to a patch from Luke Suchocki.
|
||||
|
||||
@@ -147,8 +147,9 @@ if ($config{'dhcpd_version'} >= 3) {
|
||||
printf "<input name=dnum_$i size=4 value='%s'>\n",
|
||||
$o->{'values'}->[2];
|
||||
print "$text{'eopt_dtype'}\n";
|
||||
my $a=scalar(@{$o->{'values'}})-1;
|
||||
printf "<input name=dtype_$i size=10 value='%s'>\n",
|
||||
$o->{'values'}->[4];
|
||||
join(" ",@{$o->{'values'}}[4..$a]);
|
||||
print "</td> </tr>\n";
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ if ($config{'dhcpd_version'} >= 3) {
|
||||
&error(&text('sopt_edname', $in{"dname_$i"}));
|
||||
$in{"dnum_$i"} =~ /^\d+$/ ||
|
||||
&error(&text('sopt_ednum', $in{"dnum_$i"}));
|
||||
$in{"dtype_$i"} =~ /^[a-z0-9\.\-\_]+$/i ||
|
||||
$in{"dtype_$i"} =~ /^[a-z0-9\s\.\-\_]+$/i ||
|
||||
&error(&text('sopt_edtype', $in{"dtype_$i"}));
|
||||
push(@newdefs, { 'name' => 'option',
|
||||
'values' => [ $in{"dname_$i"}, "code",
|
||||
|
||||
Reference in New Issue
Block a user