Multiple leases can now be deleted at once, thanks to a suggestion from Berni Elbourn.
---- Changes since 1.540 ----
Added a Module Config option to automatically refresh the lease list every few seconds, and a link to force a manual refresh.
+---- Changes since 1.560 ----
+Added a client option for subnets and groups for DNS domains to search.
print &option_input($text{'eopt_dnsserv'}, "domain-name-servers", \@opts, 2);
print "</tr>\n";
+print "<tr>\n";
+print &option_input($text{'eopt_domsearch'}, "domain-search", \@opts, 6);
+print "</tr>\n";
+
print "<tr>\n";
print &option_input($text{'eopt_timeserv'}, "time-servers", \@opts, 2);
print &option_input($text{'eopt_logserv'}, "log-servers", \@opts, 2);
# 3 - String
# 4 - Yes/no flag
# 5 - IP address pairs
+# 6 - String list
sub option_input
{
local($rv, $v, $i);
}
}
$rv = "<td><b>$_[0]</b></td>\n";
-if ($_[3] == 5 || $_[4]) { $rv .= "<td colspan=3 nowrap>"; }
+if ($_[3] == 5 || $_[3] == 6 || $_[4]) { $rv .= "<td colspan=3 nowrap>"; }
else { $rv .= "<td nowrap>"; }
$rv .= sprintf "<input type=radio name=$_[1]_def value=1 %s> $text{'default'}\n",
$v ? "" : "checked";
}
$rv .= "\">\n";
}
+elsif ($_[3] == 6) {
+ @vl = map { s/,//g; $_ } grep { $_ ne "," } @vl;
+ $rv .= "<input name=$_[1] size=50 value=\"".join(" ", @vl)."\">\n";
+ }
if ($_[4]) {
$rv .= &ui_checkbox($_[1]."_bool", 1, $_[4], lc($bool) eq "true");
}
eopt_baddr=Broadcast address
eopt_domname=Domain name
eopt_dnsserv=DNS servers
+eopt_domsearch=DNS domains to search
eopt_timeserv=Time servers
eopt_logserv=Log servers
eopt_swapserv=Swap server
&save_option("broadcast-address", 0, $client, $indent);
&save_option("domain-name", 3, $client, $indent);
&save_option("domain-name-servers", 2, $client, $indent);
+&save_option("domain-search", 6, $client, $indent);
&save_option("time-servers", 2, $client, $indent);
&save_option("log-servers", 2, $client, $indent);
&save_option("swap-server", 2, $client, $indent);
$nv =~ /^-?\d+$/ || &error("'$nv' $text{'sopt_invalidint'}");
}
elsif ($_[1] == 2) {
- local $ip;
- foreach $ip (@nv) {
+ foreach my $ip (@nv) {
&to_ipaddress($ip) ||
&error("'$ip' $text{'sopt_invalidip'}");
}
}
$nv = join(", ", @nnv);
}
+ elsif ($_[1] == 6) {
+ $nv = join(", ", map { "\"$_\"" } @nv);
+ }
local @bool = !$_[4] ? ( ) :
$in{$_[0]."_bool"} ? ( "true" ) : ( "false" );
local $dir = { 'name' => 'option',