mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
another html,js cleanup
This commit is contained in:
@@ -15,7 +15,7 @@ print "<form action=allmanual_form.cgi>\n";
|
||||
print "<input type=submit value='$text{'manual_file'}'>\n";
|
||||
print "<select name=file>\n";
|
||||
foreach $f (@files) {
|
||||
printf "<option %s>%s\n",
|
||||
printf "<option %s>%s</option>\n",
|
||||
$f eq $in{'file'} ? 'selected' : '', $f;
|
||||
$found++ if ($f eq $in{'file'});
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ for($i=0; $i<=@all; $i++) {
|
||||
$rv .="<td><input name=AddIcon_alt_$i size=10 value=\"$alt\"></td>\n";
|
||||
$rv .="<td><select name=AddIcon_mode_$i>\n";
|
||||
for($j=0; $j<@AddIcon_descs; $j++) {
|
||||
$rv .= sprintf "<option value=$j %s>%s\n",
|
||||
$rv .= sprintf "<option value=$j %s>%s</option>\n",
|
||||
$mode == $j ? "selected" : "", $AddIcon_descs[$j];
|
||||
}
|
||||
$rv .="</select></td>\n";
|
||||
@@ -89,7 +89,7 @@ for($i=0; $i<=@all; $i++) {
|
||||
$rv .="<td><input name=AddAlt_alt_$i size=20 value=\"$alt\"></td>\n";
|
||||
$rv .="<td><select name=AddAlt_mode_$i>\n";
|
||||
for($j=0; $j<@AddAlt_descs; $j++) {
|
||||
$rv .= sprintf "<option value=$j %s>%s\n",
|
||||
$rv .= sprintf "<option value=$j %s>%s</option>\n",
|
||||
$mode == $j ? "selected" : "", $AddAlt_descs[$j];
|
||||
}
|
||||
$rv .="</select></td>\n";
|
||||
|
||||
@@ -881,7 +881,7 @@ sub edit_AuthType
|
||||
local($rv, $a);
|
||||
$rv = "<select name=AuthType>\n";
|
||||
foreach $a ("", "Basic", "Digest") {
|
||||
$rv .= sprintf "<option %s>$a\n",
|
||||
$rv .= sprintf "<option %s>$a</option>\n",
|
||||
lc($_[0]->{'value'}) eq lc($a) ? "selected" : "";
|
||||
}
|
||||
$rv .= "</select>";
|
||||
|
||||
@@ -64,10 +64,10 @@ for($i=0; $i<$len; $i++) {
|
||||
else { $meth = $cgi = ""; }
|
||||
$rv .= "<tr $cb><td><select name=Script_meth_$i>\n";
|
||||
foreach $m ("", "GET", "POST", "PUT", "DELETE") {
|
||||
$rv .= sprintf "<option %s>$m\n", $meth eq $m ? "selected" : "";
|
||||
$rv .= sprintf "<option %s>$m</option>\n", $meth eq $m ? "selected" : "";
|
||||
$found++ if ($meth eq $m);
|
||||
}
|
||||
printf "<option selected>$meth\n" if (!$found);
|
||||
printf "<option selected>$meth</option>\n" if (!$found);
|
||||
$rv .= "</select></td>\n";
|
||||
$rv .= "<td><input name=Script_cgi_$i size=40 value=\"$cgi\"></td>\n";
|
||||
$rv .= "</tr>\n";
|
||||
|
||||
@@ -24,26 +24,21 @@ local $rv = sprintf
|
||||
$rv .= sprintf "<input type=radio name=IndexOrderDefault_def value=0 %s>\n",
|
||||
$_[0] ? "checked" : "";
|
||||
$rv .= "<select name=IndexOrderDefault_asc>\n";
|
||||
$rv .= sprintf "<option value=Ascending %s>$text{'mod_autoindex_asc'}\n",
|
||||
$_[0]->{'words'}->[0] eq "Ascending" ? "selected" : "",
|
||||
"</option>";
|
||||
$rv .= sprintf "<option value=Descending %s>$text{'mod_autoindex_descend'}\n",
|
||||
$_[0]->{'words'}->[0] eq "Descending" ? "selected" : "",
|
||||
"</option>";
|
||||
$rv .= sprintf "<option value=Ascending %s>$text{'mod_autoindex_asc'}</option>\n",
|
||||
$_[0]->{'words'}->[0] eq "Ascending" ? "selected" : "";
|
||||
$rv .= sprintf "<option value=Descending %s>$text{'mod_autoindex_descend'}</option>\n",
|
||||
$_[0]->{'words'}->[0] eq "Descending" ? "selected" : "";
|
||||
$rv .= "</select>\n";
|
||||
$rv .= "<select name=IndexOrderDefault_what>\n";
|
||||
$rv .= sprintf "<option value=Name %s>$text{'mod_autoindex_name'}\n",
|
||||
$_[0]->{'words'}->[1] eq "Name" ? "selected" : "",
|
||||
"</option>";
|
||||
$rv .= sprintf "<option value=Name %s>$text{'mod_autoindex_name'}</option>\n",
|
||||
$_[0]->{'words'}->[1] eq "Name" ? "selected" : "";
|
||||
$rv .= sprintf "<option value=Date %s>$text{'mod_autoindex_date'}\n",
|
||||
$_[0]->{'words'}->[1] eq "Date" ? "selected" : "",
|
||||
"</option>";
|
||||
$rv .= sprintf "<option value=Size %s>$text{'mod_autoindex_size'}\n",
|
||||
$_[0]->{'words'}->[1] eq "Size" ? "selected" : "",
|
||||
"</option>";
|
||||
$rv .= sprintf "<option value=Description %s>$text{'mod_autoindex_desc'}\n",
|
||||
$_[0]->{'words'}->[1] eq "Description" ? "selected" : "",
|
||||
"</option>";
|
||||
$rv .= sprintf "<option value=Size %s>$text{'mod_autoindex_size'}</option>\n",
|
||||
$_[0]->{'words'}->[1] eq "Size" ? "selected" : "";
|
||||
$rv .= sprintf "<option value=Description %s>$text{'mod_autoindex_desc'}</option>\n",
|
||||
$_[0]->{'words'}->[1] eq "Description" ? "selected" : "";
|
||||
$rv .= "</select>\n";
|
||||
return (2, "$text{'mod_autoindex_sort'}", $rv);
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ print "<td align=right>",&ui_submit($text{'show_edit'}),"\n";
|
||||
print "<select name=type>\n";
|
||||
foreach $e (@elist) {
|
||||
print "<option value=",$e->{'edit'}->{'type'},">",
|
||||
$e->{'name'},"\n";
|
||||
$e->{'name'},"</option>\n";
|
||||
}
|
||||
print "</select></td>\n";
|
||||
print "</form></tr></table>\n";
|
||||
|
||||
@@ -152,7 +152,7 @@ sub show_backup_destination
|
||||
{
|
||||
my ($mode, $user, $pass, $server, $path, $port) = &parse_backup_url($_[1]);
|
||||
my $rv;
|
||||
$rv .= "<table cellpadding=1 cellspacing=0>";
|
||||
$rv .= "<table id='show_backup_destination' cellpadding=1 cellspacing=0>";
|
||||
|
||||
# Local file field
|
||||
$rv .= "<tr><td>".&ui_oneradio("$_[0]_mode", 0, undef, $mode == 0)."</td>\n";
|
||||
|
||||
@@ -417,9 +417,9 @@ sub tape_select
|
||||
local $t;
|
||||
print "<select name=tape>\n";
|
||||
foreach $t (split(/\s+/, $config{'tape_device'})) {
|
||||
print "<option>",&text('index_tapedev', $t),"\n";
|
||||
print "<option>",&text('index_tapedev', $t),"</option>\n";
|
||||
}
|
||||
print "<option value=''>$text{'index_other'}\n";
|
||||
print "<option value=''>$text{'index_other'}</option>\n";
|
||||
print "</select>\n";
|
||||
print "<input name=other size=40> ",&file_chooser_button("other", 1),"\n";
|
||||
}
|
||||
@@ -444,10 +444,10 @@ else {
|
||||
}
|
||||
$cmd->execute();
|
||||
print "<select name=job>\n";
|
||||
print "<option value=''>$text{'job_any'}\n";
|
||||
print "<option value=''>$text{'job_any'}</option>\n";
|
||||
while(my ($id, $name, $when) = $cmd->fetchrow()) {
|
||||
$when =~ s/ .*$//;
|
||||
print "<option value=$id>$name ($id) ($when)\n";
|
||||
print "<option value=$id>$name ($id) ($when)</option>\n";
|
||||
}
|
||||
print "</select>\n";
|
||||
}
|
||||
@@ -459,7 +459,7 @@ local $cmd = $_[0]->prepare("select ClientId,Name from Client order by ClientId
|
||||
$cmd->execute();
|
||||
print "<select name=client>\n";
|
||||
while(my ($id, $name) = $cmd->fetchrow()) {
|
||||
print "<option value=$name>$name ($id)\n";
|
||||
print "<option value=$name>$name ($id)</option>\n";
|
||||
}
|
||||
print "</select>\n";
|
||||
}
|
||||
|
||||
@@ -29,13 +29,13 @@ foreach $v (@views) {
|
||||
local ($z, %zcan);
|
||||
map { $zcan{$_}++ } split(/\s+/, $_[0]->{'zones'});
|
||||
foreach $z (sort { $a->{'value'} cmp $b->{'value'} } @zones) {
|
||||
printf "<option value='%s' %s>%s\n",
|
||||
printf "<option value='%s' %s>%s</option>\n",
|
||||
$z->{'value'},
|
||||
$zcan{$z->{'value'}} ? "selected" : "",
|
||||
&arpa_to_ip($z->{'value'});
|
||||
}
|
||||
foreach $v (sort { $a->{'value'} cmp $b->{'value'} } @views) {
|
||||
printf "<option value='%s' %s>%s\n",
|
||||
printf "<option value='%s' %s>%s</option>\n",
|
||||
'view_'.$v->{'value'},
|
||||
$zcan{'view_'.$v->{'value'}} ? "selected" : "",
|
||||
&text('acl_inview', $v->{'value'});
|
||||
@@ -183,7 +183,7 @@ if (@views) {
|
||||
local ($v, %vcan);
|
||||
map { $vcan{$_}++ } split(/\s+/, $_[0]->{'vlist'});
|
||||
foreach $v (sort { $a->{'value'} cmp $b->{'value'} } @views) {
|
||||
printf "<option value='%s' %s>%s\n",
|
||||
printf "<option value='%s' %s>%s</option>\n",
|
||||
$v->{'value'},
|
||||
$vcan{$v->{'value'}} ? "selected" : "", $v->{'value'};
|
||||
}
|
||||
|
||||
@@ -14,10 +14,10 @@ print "<tr $cb> <td><table>\n";
|
||||
print "<tr> <td><b>$text{'dev_device'}</b></td>\n";
|
||||
print "<td><select name=dev>\n";
|
||||
if (!$config{'dev'}) {
|
||||
print "<option value='' checked>$text{'dev_none'}\n";
|
||||
print "<option value='' checked>$text{'dev_none'}</option>\n";
|
||||
}
|
||||
foreach $d (&list_cdrecord_devices()) {
|
||||
printf "<option value=%s %s>%s (%s)\n",
|
||||
printf "<option value=%s %s>%s (%s)</option>\n",
|
||||
$d->{'dev'}, $d->{'dev'} eq $config{'dev'} ? 'selected' : '',
|
||||
$d->{'name'}, $d->{'type'};
|
||||
}
|
||||
|
||||
@@ -135,13 +135,13 @@ elsif ($profile->{'type'} == 4) {
|
||||
print "<tr> <td><b>$text{'edit_sdev'}</b></td>\n";
|
||||
print "<td colspan=3><select name=sdev>\n";
|
||||
foreach $d (&list_cdrecord_devices()) {
|
||||
printf "<option value=%s %s>%s (%s)\n",
|
||||
printf "<option value=%s %s>%s (%s)</option>\n",
|
||||
$d->{'dev'},
|
||||
$d->{'dev'} eq $profile->{'sdev'} ? 'selected' : '',
|
||||
$d->{'name'}, $d->{'type'};
|
||||
$found++ if ($d->{'dev'} eq $profile->{'sdev'});
|
||||
}
|
||||
printf "<option value='' %s>%s\n",
|
||||
printf "<option value='' %s>%s</option>\n",
|
||||
!$found && $profile->{'sdev'} ? "selected" : "",
|
||||
$text{'edit_other'};
|
||||
print "</select>\n";
|
||||
@@ -150,20 +150,20 @@ elsif ($profile->{'type'} == 4) {
|
||||
|
||||
print "<tr> <td><b>$text{'edit_srcdrv'}</b></td>\n";
|
||||
print "<td><select name=srcdrv>\n";
|
||||
printf "<option value='' %s> %s\n",
|
||||
printf "<option value='' %s>%s</option>\n",
|
||||
$profile->{'srcdrv'} ? "" : "selected", $text{'default'};
|
||||
foreach $d (@cdr_drivers) {
|
||||
printf "<option %s>%s\n",
|
||||
printf "<option %s>%s</option>\n",
|
||||
$profile->{'srcdrv'} eq $d ? "selected" : "", $d;
|
||||
}
|
||||
print "</select></td> </tr>\n";
|
||||
|
||||
print "<tr> <td><b>$text{'edit_dstdrv'}</b></td>\n";
|
||||
print "<td><select name=dstdrv>\n";
|
||||
printf "<option value='' %s> %s\n",
|
||||
printf "<option value='' %s>%s</option>\n",
|
||||
$profile->{'dstdrv'} ? "" : "selected", $text{'default'};
|
||||
foreach $d (@cdr_drivers) {
|
||||
printf "<option %s>%s\n",
|
||||
printf "<option %s>%s</option>\n",
|
||||
$profile->{'dstdrv'} eq $d ? "selected" : "", $d;
|
||||
}
|
||||
print "</select></td> </tr>\n";
|
||||
|
||||
@@ -76,10 +76,10 @@ if ($access{'create'}) {
|
||||
print "<form action=edit_profile.cgi>\n";
|
||||
print "<input type=submit value='$text{'index_add'}'>\n";
|
||||
print "<select name=type>\n";
|
||||
print "<option value=1 checked> $text{'index_type1'}\n";
|
||||
print "<option value=2> $text{'index_type2'}\n";
|
||||
print "<option value=3> $text{'index_type3'}\n";
|
||||
print "<option value=4> $text{'index_type4'}\n";
|
||||
print "<option value=1 checked>$text{'index_type1'}</option>\n";
|
||||
print "<option value=2>$text{'index_type2'}</option>\n";
|
||||
print "<option value=3>$text{'index_type3'}</option>\n";
|
||||
print "<option value=4>$text{'index_type4'}</option>\n";
|
||||
print "</select></form>\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -321,9 +321,9 @@ if ($in{'burn'} || $in{'test'}) {
|
||||
|
||||
if ($profile->{'type'} != 4) {
|
||||
print "<br>$text{'burn_blank'} <select name=blank>\n";
|
||||
print "<option value='' selected> $text{'no'}\n";
|
||||
print "<option value=fast> $text{'burn_bfast'}\n";
|
||||
print "<option value=all> $text{'burn_ball'}\n";
|
||||
print "<option value='' selected>$text{'no'}</option>\n";
|
||||
print "<option value=fast>$text{'burn_bfast'}</option>\n";
|
||||
print "<option value=all>$text{'burn_ball'}</option>\n";
|
||||
print "</select>\n";
|
||||
}
|
||||
print "</form></center>\n";
|
||||
|
||||
@@ -59,10 +59,10 @@ print <<EOF;
|
||||
EOF
|
||||
print " <option value='' ";
|
||||
if (!$in{'cert_directory'}) {print "selected";}
|
||||
print ">$text{'import_choose'}";
|
||||
print ">$text{'import_choose'}</option>";
|
||||
foreach $f ( &getdirs($config{'ssl_dir'})) {
|
||||
if ($config{'ssl_dir'}."/".$f eq $in{'cert_directory'}) {print " <option selected>$config{'ssl_dir'}/$f\n";}
|
||||
else {print " <option>$config{'ssl_dir'}/$f\n";}
|
||||
if ($config{'ssl_dir'}."/".$f eq $in{'cert_directory'}) {print " <option selected>$config{'ssl_dir'}/$f</option>\n";}
|
||||
else {print " <option>$config{'ssl_dir'}/$f</option>\n";}
|
||||
}
|
||||
print <<EOF;
|
||||
</select></td> </tr>
|
||||
@@ -81,10 +81,10 @@ print <<EOF;
|
||||
EOF
|
||||
print " <option value='' ";
|
||||
if (!$in{'key_directory'}) {print "selected";}
|
||||
print ">$text{'import_choose'}";
|
||||
print ">$text{'import_choose'}</option>";
|
||||
foreach $f ( &getdirs($config{'ssl_dir'})) {
|
||||
if ($config{'ssl_dir'}."/".$f eq $in{'key_directory'}) {print " <option selected>$config{'ssl_dir'}/$f\n";}
|
||||
else {print " <option>$config{'ssl_dir'}/$f\n";}
|
||||
if ($config{'ssl_dir'}."/".$f eq $in{'key_directory'}) {print " <option selected>$config{'ssl_dir'}/$f</option>\n";}
|
||||
else {print " <option>$config{'ssl_dir'}/$f</option>\n";}
|
||||
}
|
||||
print <<EOF;
|
||||
</select></td> </tr>
|
||||
|
||||
@@ -142,8 +142,10 @@ print "<table border>\n<tr $tb> <td><center><b>$text{'view_select'}</b></center>
|
||||
print "<tr $cb><td><table border=0><td>$text{'view_wildcard'}:</td><td><input name=wildcard value=\"$in{'wildcard'}\"></td>";
|
||||
print "<td><input type=submit name=update value=\"$text{'view_update'}\"></td></tr>\n";
|
||||
print "<tr><td colspan=2><select name=filename>\n";
|
||||
print "<option value='' selected>$text{'view_choose'}\n";
|
||||
foreach $f ( grep { /^(.*\/)*$wildcard_pattern$/ && -f "$config{'ssl_dir'}/$_" } &getfiles($config{'ssl_dir'})) { print "<option value=\"$f\">$config{'ssl_dir'}/$f\n"; }
|
||||
print "<option value='' selected>$text{'view_choose'}</option>\n";
|
||||
foreach $f ( grep { /^(.*\/)*$wildcard_pattern$/ && -f "$config{'ssl_dir'}/$_" } &getfiles($config{'ssl_dir'})) {
|
||||
print "<option value=\"$f\">$config{'ssl_dir'}/$f</option>\n";
|
||||
}
|
||||
print "</select>\n";
|
||||
print "</td><td><input type=submit name=view value=\"$text{'view_view'}\"></td></tr></table></td></tr></table>\n";
|
||||
print "</form>\n";
|
||||
|
||||
@@ -590,7 +590,7 @@ foreach $s ($_[0] ? @known_cfd_sections : @known_sections) {
|
||||
next if (!$tt);
|
||||
local $t = $text{"section_".$s."_".$_[0]};
|
||||
$t = $text{"section_".$s} if (!$t);
|
||||
print "<option value=$s>$t ($s)\n";
|
||||
print "<option value=$s>$t ($s)</option>\n";
|
||||
}
|
||||
print "</select></form>\n";
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ elsif ($type eq "control" && !$in{'cfd'}) {
|
||||
next if ($s eq "control");
|
||||
local $t = $text{"section_".$s."_".$in{'cfd'}};
|
||||
$t = $text{"section_".$s} if (!$t);
|
||||
printf "<option value=$s>$t ($s)\n";
|
||||
printf "<option value=$s>$t ($s)</option>\n";
|
||||
}
|
||||
print "</select><br>\n";
|
||||
print "<input type=button value='$text{'edit_actionadd'}' onClick='document.forms[0].seq.value += document.forms[0].add.options[document.forms[0].add.selectedIndex].value+\"\\n\"'>\n";
|
||||
@@ -354,14 +354,14 @@ elsif ($type eq "files") {
|
||||
local @acts = ( "fixall", "fixdirs", "fixplain", "warnall", "warndirs", "warnplain", "touch", "linkchildren", "create", "compress", "alert" );
|
||||
print "<td><b>$text{'edit_filesact'}</b></td>\n";
|
||||
print "<td><select name=act_$i>\n";
|
||||
printf "<option value='' %s> %s\n",
|
||||
printf "<option value='' %s>%s</option>\n",
|
||||
$action ? "" : "selected", $text{'default'};
|
||||
foreach $a (@acts) {
|
||||
printf "<option value=%s %s> %s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$a, $action eq $a ? "selected" : "",
|
||||
$text{"edit_files_$a"};
|
||||
}
|
||||
print "<option selected>$action\n"
|
||||
print "<option selected>$action</option>\n"
|
||||
if ($action && &indexof($action, @acts) < 0);
|
||||
print "</select></td> </tr>\n";
|
||||
|
||||
@@ -490,14 +490,14 @@ elsif ($type eq "copy") {
|
||||
local @acts = ( "fix", "silent", "warn" );
|
||||
print "<td><b>$text{'edit_copyact'}</b></td>\n";
|
||||
print "<td><select name=act_$i>\n";
|
||||
printf "<option value='' %s> %s\n",
|
||||
printf "<option value='' %s>%s</option>\n",
|
||||
$action ? "" : "selected", $text{'default'};
|
||||
foreach $a (@acts) {
|
||||
printf "<option value=%s %s> %s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$a, $action eq $a ? "selected" : "",
|
||||
$text{"edit_copy_$a"};
|
||||
}
|
||||
print "<option selected>$action\n"
|
||||
print "<option selected>$action</option>\n"
|
||||
if ($action && &indexof($action, @acts) < 0);
|
||||
print "</select></td> </tr>\n";
|
||||
|
||||
@@ -539,14 +539,14 @@ elsif ($type eq "disable") {
|
||||
local @types = ( "plain", "file", "link" );
|
||||
print "<tr> <td><b>$text{'edit_distype'}</b></td>\n";
|
||||
print "<td><select name=type_$i>\n";
|
||||
printf "<option value='' %s> %s\n",
|
||||
printf "<option value='' %s>%s</option>\n",
|
||||
$type ? "" : "selected", $text{'edit_dis_all'};
|
||||
foreach $t (@types) {
|
||||
printf "<option value=%s %s> %s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$t, $type eq $t ? "selected" : "",
|
||||
$text{"edit_dis_$t"};
|
||||
}
|
||||
print "<option selected>$type\n"
|
||||
print "<option selected>$type</option>\n"
|
||||
if ($type && &indexof($type, @types) < 0);
|
||||
print "</select></td>\n";
|
||||
|
||||
@@ -647,10 +647,10 @@ elsif ($type eq "processes") {
|
||||
local $sig = &sname("signal", $p);
|
||||
print "<tr> <td><b>$text{'edit_procsig'}</b></td>\n";
|
||||
print "<td><select name=sig_$i>\n";
|
||||
printf "<option value='' %s>%s\n",
|
||||
printf "<option value='' %s>%s</option>\n",
|
||||
$sig ? "" : "selected", $text{'edit_none'};
|
||||
foreach $s (split(/\s+/, $Config{sig_name})) {
|
||||
printf "<option value=%s %s> $s\n",
|
||||
printf "<option value=%s %s>$s</option>\n",
|
||||
lc($s), lc($s) eq $sig ? "selected" : "", $s;
|
||||
}
|
||||
print "</select></td>\n";
|
||||
@@ -658,13 +658,13 @@ elsif ($type eq "processes") {
|
||||
local $act = &sname("action", $p);
|
||||
print "<td><b>$text{'edit_procact'}</b></td>\n";
|
||||
print "<td><select name=act_$i>\n";
|
||||
printf "<option value='' %s>%s\n",
|
||||
printf "<option value='' %s>%s</option>\n",
|
||||
!$act || $act eq 'signal' || $act eq 'do' ?
|
||||
"selected" : "", $text{"edit_proc_signal"};
|
||||
printf "<option value=bymatch %s>%s\n",
|
||||
printf "<option value=bymatch %s>%s</option>\n",
|
||||
$act eq "bymatch" ? "selected" : "",
|
||||
$text{"edit_proc_bymatch"};
|
||||
printf "<option value=warn %s>%s\n",
|
||||
printf "<option value=warn %s>%s</option>\n",
|
||||
$act eq "warn" ? "selected" : "",
|
||||
$text{"edit_proc_warn"};
|
||||
print "</select></td> </tr>\n";
|
||||
@@ -798,12 +798,12 @@ elsif ($type eq "tidy") {
|
||||
printf "<input type=radio name=age_def_$i value=0 %s>\n",
|
||||
$age eq '' ? "" : "checked";
|
||||
local $asel = "<select name=type_$i>";
|
||||
$asel .= sprintf "<option value='' %s>%s\n",
|
||||
$asel .= sprintf "<option value='' %s>%s</option>\n",
|
||||
$type eq 'atime' || !$type ? "selected" : "",
|
||||
$text{'edit_tidyatime'};
|
||||
$asel .= sprintf "<option value=mtime %s>%s\n",
|
||||
$asel .= sprintf "<option value=mtime %s>%s</option>\n",
|
||||
$type eq 'mtime' ? "selected" : "", $text{'edit_tidymtime'};
|
||||
$asel .= sprintf "<option value=ctime %s>%s\n",
|
||||
$asel .= sprintf "<option value=ctime %s>%s</option>\n",
|
||||
$type eq 'ctime' ? "selected" : "", $text{'edit_tidyctime'};
|
||||
$asel .= "</select>\n";
|
||||
local $afield = "<input name=age_$i size=5 value='$age'>\n";
|
||||
|
||||
@@ -34,7 +34,7 @@ if (@addservers) {
|
||||
print "<td><input type=submit name=add value='$text{'hosts_add'}'>\n";
|
||||
print "<select name=server>\n";
|
||||
foreach $s (@addservers) {
|
||||
print "<option value=$s->{'id'}>",&server_name($s),"\n";
|
||||
print "<option value=$s->{'id'}>",&server_name($s),"</option>\n";
|
||||
}
|
||||
print "</select></td>\n";
|
||||
}
|
||||
@@ -44,7 +44,7 @@ if (@groups) {
|
||||
"value='$text{'hosts_gadd'}'>\n";
|
||||
print "<select name=group>\n";
|
||||
foreach $g (@groups) {
|
||||
print "<option>$g->{'name'}\n";
|
||||
print "<option>$g->{'name'}</option>\n";
|
||||
}
|
||||
print "</select></td>\n";
|
||||
}
|
||||
|
||||
@@ -34,21 +34,21 @@ print "<td><input name=user size=8 value=\"$job->{'cluster_user'}\"> ",
|
||||
%serv = map { $_, 1 } split(/ /, $job->{'cluster_server'});
|
||||
print "<td rowspan=4 valign=top><b>$text{'edit_servers'}</b></td>\n";
|
||||
print "<td rowspan=4 valign=top><select multiple size=8 name=server>\n";
|
||||
printf "<option value=ALL %s>%s\n",
|
||||
printf "<option value=ALL %s>%s</option>\n",
|
||||
$serv{'ALL'} ? 'selected' : '', $text{'edit_all'};
|
||||
printf "<option value=* %s>%s\n",
|
||||
printf "<option value=* %s>%s</option>\n",
|
||||
$serv{'*'} ? 'selected' : '', $text{'edit_this'};
|
||||
foreach $s (grep { $_->{'user'} }
|
||||
sort { $a->{'host'} cmp $b->{'host'} }
|
||||
&servers::list_servers()) {
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$s->{'host'}, $serv{$s->{'host'}} ? "selected" : "",
|
||||
$s->{'host'}.($s->{'desc'} ? " ($s->{'desc'})" : "");
|
||||
}
|
||||
foreach $g (sort { $a->{'name'} cmp $b->{'name'} }
|
||||
&servers::list_all_groups()) {
|
||||
$gn = "group_".$g->{'name'};
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$gn, $serv{$gn} ? "selected" : "",
|
||||
&text('edit_group', $g->{'name'});
|
||||
}
|
||||
|
||||
@@ -63,7 +63,8 @@ if (!$pinfo[8]) {
|
||||
print "<select name=server>\n";
|
||||
foreach $s (@got) {
|
||||
print "<option value='$s->{'id'}'>",
|
||||
$s->{'desc'} || $s->{'realhost'} || $s->{'host'};
|
||||
$s->{'desc'} || $s->{'realhost'} || $s->{'host'},
|
||||
"</option>";
|
||||
}
|
||||
print "</select></td>\n";
|
||||
print "</form>\n";
|
||||
@@ -77,10 +78,11 @@ if (!$pinfo[7]) {
|
||||
print "<td align=right>\n";
|
||||
print "<input type=submit value=\"$text{'edit_uninst'}\">\n";
|
||||
print "<select name=server>\n";
|
||||
print "<option value=-1>$text{'edit_all'}\n";
|
||||
print "<option value=-1>$text{'edit_all'}</option>\n";
|
||||
foreach $s (@got) {
|
||||
print "<option value='$s->{'id'}'>",
|
||||
$s->{'desc'} || $s->{'realhost'} || $s->{'host'};
|
||||
$s->{'desc'} || $s->{'realhost'} || $s->{'host'},
|
||||
"</option>";
|
||||
}
|
||||
print "</select></td>\n";
|
||||
print "</form>\n";
|
||||
|
||||
@@ -76,7 +76,7 @@ if (@addservers && $access{'add'}) {
|
||||
print "<select name=server>\n";
|
||||
foreach $s (sort { $a->{'host'} cmp $b->{'host'} } @addservers) {
|
||||
print "<option value=$s->{'id'}>",
|
||||
$s->{'host'}.($s->{'desc'} ? " ($s->{'desc'})" : ""),"\n";
|
||||
$s->{'host'}.($s->{'desc'} ? " ($s->{'desc'})" : ""),"</option>\n";
|
||||
}
|
||||
print "</select></td>\n";
|
||||
print "</form>\n";
|
||||
@@ -99,7 +99,7 @@ if (@groups && $access{'add'}) {
|
||||
print "<input type=submit name=gadd value='$text{'index_gadd'}'>\n";
|
||||
print "<select name=group>\n";
|
||||
foreach $g (@groups) {
|
||||
print "<option>$g->{'name'}\n";
|
||||
print "<option>$g->{'name'}</option>\n";
|
||||
}
|
||||
print "</select></td>\n";
|
||||
print "</form>\n";
|
||||
|
||||
@@ -133,15 +133,15 @@ if ($_[2]) {
|
||||
else {
|
||||
print "<select name=server>\n";
|
||||
}
|
||||
print "<option value=-1>$text{'uedit_all'}\n";
|
||||
print "<option value=-2>$text{'uedit_donthave'}\n" if (!$_[1]);
|
||||
print "<option value=-1>$text{'uedit_all'}</option>\n";
|
||||
print "<option value=-2>$text{'uedit_donthave'}</option>\n" if (!$_[1]);
|
||||
local @groups = &servers::list_all_groups(\@servers);
|
||||
local $h;
|
||||
foreach $h (@hosts) {
|
||||
local ($s) = grep { $_->{'id'} == $h->{'id'} } @servers;
|
||||
if ($s) {
|
||||
print "<option value='$s->{'id'}'>",
|
||||
$s->{'desc'} ? $s->{'desc'} : $s->{'host'},"\n";
|
||||
$s->{'desc'} ? $s->{'desc'} : $s->{'host'},"</option>\n";
|
||||
$gothost{$s->{'host'}}++;
|
||||
}
|
||||
}
|
||||
@@ -152,7 +152,7 @@ foreach $g (@groups) {
|
||||
($found++, last) if ($gothost{$m});
|
||||
}
|
||||
print "<option value='group_$g->{'name'}'>",
|
||||
&text('uedit_group', $g->{'name'}),"\n" if ($found);
|
||||
&text('uedit_group', $g->{'name'}),"</option>\n" if ($found);
|
||||
}
|
||||
print "</select>\n";
|
||||
if ($_[0]) {
|
||||
|
||||
@@ -131,7 +131,7 @@ printf "<input type=radio name=shell_def value=0> %s\n",
|
||||
print "<select name=shell>\n";
|
||||
@shlist = &unique(@shlist);
|
||||
foreach $s (@shlist) {
|
||||
printf "<option value='%s'>%s\n", $s,
|
||||
printf "<option value='%s'>%s</option>\n", $s,
|
||||
$s eq "" ? "<None>" : $s;
|
||||
}
|
||||
print "</select></td>\n";
|
||||
@@ -446,7 +446,7 @@ print "<input name=$_[3]d size=3 value='$_[0]'>";
|
||||
print "/<select name=$_[3]m>\n";
|
||||
local $m;
|
||||
foreach $m (1..12) {
|
||||
printf "<option value=%d %s>%s\n",
|
||||
printf "<option value=%d %s>%s</option>\n",
|
||||
$m, $_[1] eq $m ? 'selected' : '', $text{"smonth_$m"};
|
||||
}
|
||||
print "</select>";
|
||||
|
||||
@@ -71,7 +71,7 @@ if (@addservers) {
|
||||
print "<select name=server>\n";
|
||||
foreach $s (@addservers) {
|
||||
print "<option value=$s->{'id'}>",
|
||||
$s->{'desc'} ? $s->{'desc'} : $s->{'host'},"\n";
|
||||
$s->{'desc'} ? $s->{'desc'} : $s->{'host'},"</option>\n";
|
||||
}
|
||||
print "</select></td>\n";
|
||||
}
|
||||
@@ -81,7 +81,7 @@ if (@groups) {
|
||||
"value='$text{'index_gadd'}'>\n";
|
||||
print "<select name=group>\n";
|
||||
foreach $g (@groups) {
|
||||
print "<option>$g->{'name'}\n";
|
||||
print "<option>$g->{'name'}</option>\n";
|
||||
}
|
||||
print "</select></td>\n";
|
||||
}
|
||||
@@ -95,17 +95,17 @@ if (@hosts) {
|
||||
print "<table width=100%><tr>\n";
|
||||
print "<form action=search_user.cgi><td>\n";
|
||||
print "<b>$text{'index_finduser'}</b> <select name=field>\n";
|
||||
print "<option value=user checked>$text{'user'}\n";
|
||||
print "<option value=real>$text{'real'}\n";
|
||||
print "<option value=shell>$text{'shell'}\n";
|
||||
print "<option value=home>$text{'home'}\n";
|
||||
print "<option value=uid>$text{'uid'}\n";
|
||||
print "<option value=user checked>$text{'user'}</option>\n";
|
||||
print "<option value=real>$text{'real'}</option>\n";
|
||||
print "<option value=shell>$text{'shell'}</option>\n";
|
||||
print "<option value=home>$text{'home'}</option>\n";
|
||||
print "<option value=uid>$text{'uid'}</option>\n";
|
||||
print "</select> <select name=match>\n";
|
||||
print "<option value=0 checked>$text{'index_equals'}\n";
|
||||
print "<option value=4>$text{'index_contains'}\n";
|
||||
print "<option value=1>$text{'index_matches'}\n";
|
||||
print "<option value=5>$text{'index_ncontains'}\n";
|
||||
print "<option value=3>$text{'index_nmatches'}\n";
|
||||
print "<option value=0 checked>$text{'index_equals'}</option>\n";
|
||||
print "<option value=4>$text{'index_contains'}</option>\n";
|
||||
print "<option value=1>$text{'index_matches'}</option>\n";
|
||||
print "<option value=5>$text{'index_ncontains'}</option>\n";
|
||||
print "<option value=3>$text{'index_nmatches'}</option>\n";
|
||||
print "</select> <input name=what size=15> \n";
|
||||
print "<input type=submit value=\"$text{'find'}\"></td></form>\n";
|
||||
|
||||
@@ -116,15 +116,15 @@ if (@hosts) {
|
||||
|
||||
print "<tr><form action=search_group.cgi><td>\n";
|
||||
print "<b>$text{'index_findgroup'}</b> <select name=field>\n";
|
||||
print "<option value=group checked>$text{'gedit_group'}\n";
|
||||
print "<option value=members>$text{'gedit_members'}\n";
|
||||
print "<option value=gid>$text{'gedit_gid'}\n";
|
||||
print "<option value=group checked>$text{'gedit_group'}</option>\n";
|
||||
print "<option value=members>$text{'gedit_members'}</option>\n";
|
||||
print "<option value=gid>$text{'gedit_gid'}</option>\n";
|
||||
print "</select> <select name=match>\n";
|
||||
print "<option value=0 checked>$text{'index_equals'}\n";
|
||||
print "<option value=4>$text{'index_contains'}\n";
|
||||
print "<option value=1>$text{'index_matches'}\n";
|
||||
print "<option value=5>$text{'index_ncontains'}\n";
|
||||
print "<option value=3>$text{'index_nmatches'}\n";
|
||||
print "<option value=0 checked>$text{'index_equals'}</option>\n";
|
||||
print "<option value=4>$text{'index_contains'}</option>\n";
|
||||
print "<option value=1>$text{'index_matches'}</option>\n";
|
||||
print "<option value=5>$text{'index_ncontains'}</option>\n";
|
||||
print "<option value=3>$text{'index_nmatches'}</option>\n";
|
||||
print "</select> <input name=what size=15> \n";
|
||||
print "<input type=submit value=\"$text{'find'}\"></td></form>\n";
|
||||
|
||||
|
||||
@@ -85,10 +85,10 @@ print "<tr> <td valign=top><b>$text{'shell'}</b></td>\n";
|
||||
print "<td valign=top><select name=shell>\n";
|
||||
@shlist = &unique(@shlist);
|
||||
foreach $s (@shlist) {
|
||||
printf "<option value='%s'>%s\n", $s,
|
||||
printf "<option value='%s'>%s</option>\n", $s,
|
||||
$s eq "" ? "<None>" : $s;
|
||||
}
|
||||
print "<option value=*>$text{'uedit_other'}\n";
|
||||
print "<option value=*>$text{'uedit_other'}</option>\n";
|
||||
print "</select></td>\n";
|
||||
|
||||
&seed_random();
|
||||
@@ -214,7 +214,7 @@ print "<td><select name=sgid multiple size=5>\n";
|
||||
if ($uconfig{'sort_mode'});
|
||||
foreach $g (@glist) {
|
||||
@mems = split(/,/ , $g->{'members'});
|
||||
print "<option value=\"$g->{'gid'}\">$g->{'group'} ($g->{'gid'})\n";
|
||||
print "<option value=\"$g->{'gid'}\">$g->{'group'} ($g->{'gid'})</option>\n";
|
||||
}
|
||||
print "</select></td> </tr>\n";
|
||||
print "</table></td></tr></table><p>\n";
|
||||
@@ -261,7 +261,7 @@ print "<input name=$_[3]d size=3 value='$_[0]'>";
|
||||
print "/<select name=$_[3]m>\n";
|
||||
local $m;
|
||||
foreach $m (1..12) {
|
||||
printf "<option value=%d %s>%s\n",
|
||||
printf "<option value=%d %s>%s</option>\n",
|
||||
$m, $_[1] eq $m ? 'selected' : '', $text{"smonth_$m"};
|
||||
}
|
||||
print "</select>";
|
||||
|
||||
@@ -150,16 +150,16 @@ if ($_[3]) {
|
||||
else {
|
||||
print "<select name=server>\n";
|
||||
}
|
||||
print "<option value=-1>$text{'user_all'}\n";
|
||||
print "<option value=-2>$text{'user_donthave'}\n" if (!$_[1]);
|
||||
print "<option value=-3>$text{'user_have'}\n" if (!$_[2]);
|
||||
print "<option value=-1>$text{'user_all'}</option>\n";
|
||||
print "<option value=-2>$text{'user_donthave'}</option>\n" if (!$_[1]);
|
||||
print "<option value=-3>$text{'user_have'}</option>\n" if (!$_[2]);
|
||||
local @groups = &servers::list_all_groups(\@servers);
|
||||
local $h;
|
||||
foreach $h (@hosts) {
|
||||
local ($s) = grep { $_->{'id'} == $h->{'id'} } @servers;
|
||||
if ($s) {
|
||||
print "<option value='$s->{'id'}'>",
|
||||
$s->{'desc'} ? $s->{'desc'} : $s->{'host'},"\n";
|
||||
$s->{'desc'} ? $s->{'desc'} : $s->{'host'},"</option>\n";
|
||||
$gothost{$s->{'host'}}++;
|
||||
}
|
||||
}
|
||||
@@ -170,7 +170,7 @@ foreach $g (@groups) {
|
||||
($found++, last) if ($gothost{$m});
|
||||
}
|
||||
print "<option value='group_$g->{'name'}'>",
|
||||
&text('user_ofgroup', $g->{'name'}),"\n" if ($found);
|
||||
&text('user_ofgroup', $g->{'name'}),"</option>\n" if ($found);
|
||||
}
|
||||
print "</select>\n";
|
||||
if ($_[0]) {
|
||||
|
||||
@@ -175,9 +175,9 @@ print "<input type=hidden name=type value=\"$type\">\n";
|
||||
print "<input type=hidden name=mod value=\"$name\">\n";
|
||||
print "<td><input type=submit value='",$text{"edit_uninst_$type"},"'>\n";
|
||||
print "<select name=server>\n";
|
||||
print "<option value=-1>$text{'edit_all'}\n";
|
||||
print "<option value=-1>$text{'edit_all'}</option>\n";
|
||||
foreach $s (@got) {
|
||||
print "<option value='$s->{'id'}'>",&server_name($s),"\n";
|
||||
print "<option value='$s->{'id'}'>",&server_name($s),"</option>\n";
|
||||
}
|
||||
print "</select></td></form>\n";
|
||||
|
||||
|
||||
@@ -62,16 +62,16 @@ else {
|
||||
# Build common selectors
|
||||
@wgroups = &all_groups(\@hosts);
|
||||
$modsel2 = $modsel = "<select name=mod>\n";
|
||||
$modsel2 .= "<option value=''>$text{'index_gacl'}\n";
|
||||
$modsel2 .= "<option value=''>$text{'index_gacl'}</option>\n";
|
||||
foreach $m (&all_modules(\@hosts)) {
|
||||
$modsel .= "<option value=$m->{'dir'}>$m->{'desc'}\n";
|
||||
$modsel2 .= "<option value=$m->{'dir'}>$m->{'desc'}\n";
|
||||
$modsel .= "<option value=$m->{'dir'}>$m->{'desc'}</option>\n";
|
||||
$modsel2 .= "<option value=$m->{'dir'}>$m->{'desc'}</option>\n";
|
||||
}
|
||||
$modsel .= "</select>\n";
|
||||
$modsel2 .= "</select>\n";
|
||||
$themesel = "<select name=theme>\n";
|
||||
foreach $t (&all_themes(\@hosts)) {
|
||||
$themesel .= "<option value=$t->{'dir'}>$t->{'desc'}\n";
|
||||
$themesel .= "<option value=$t->{'dir'}>$t->{'desc'}</option>\n";
|
||||
}
|
||||
$themesel .= "</select>\n";
|
||||
|
||||
@@ -83,7 +83,7 @@ if (@addservers) {
|
||||
print "<input type=submit name=add value='$text{'index_add'}'>\n";
|
||||
print "<select name=server>\n";
|
||||
foreach $s (@addservers) {
|
||||
print "<option value=$s->{'id'}>",&server_name($s),"\n";
|
||||
print "<option value=$s->{'id'}>",&server_name($s),"</option>\n";
|
||||
}
|
||||
print "</select>\n";
|
||||
print "</td></form>\n";
|
||||
@@ -98,7 +98,7 @@ if (@groups) {
|
||||
print "<input type=submit name=gadd value='$text{'index_gadd'}'>\n";
|
||||
print "<select name=group>\n";
|
||||
foreach $g (@groups) {
|
||||
print "<option>$g->{'name'}\n";
|
||||
print "<option>$g->{'name'}</option>\n";
|
||||
}
|
||||
print "</select>\n";
|
||||
print "</td></form>\n";
|
||||
|
||||
@@ -181,16 +181,16 @@ if ($_[3]) {
|
||||
else {
|
||||
print "<select name=server>\n";
|
||||
}
|
||||
print "<option value=-1>$text{'user_all'}\n";
|
||||
print "<option value=-2>$text{'user_donthave'}\n" if (!$_[1]);
|
||||
print "<option value=-3>$text{'user_have'}\n" if (!$_[2]);
|
||||
print "<option value=-1>$text{'user_all'}</option>\n";
|
||||
print "<option value=-2>$text{'user_donthave'}</option>\n" if (!$_[1]);
|
||||
print "<option value=-3>$text{'user_have'}</option>\n" if (!$_[2]);
|
||||
local @groups = &servers::list_all_groups(\@servers);
|
||||
local $h;
|
||||
foreach $h (@hosts) {
|
||||
local ($s) = grep { $_->{'id'} == $h->{'id'} } @servers;
|
||||
if ($s) {
|
||||
print "<option value='$s->{'id'}'>",
|
||||
$s->{'desc'} ? $s->{'desc'} : $s->{'host'},"\n";
|
||||
$s->{'desc'} ? $s->{'desc'} : $s->{'host'},"</option>\n";
|
||||
$gothost{$s->{'host'}}++;
|
||||
}
|
||||
}
|
||||
@@ -201,7 +201,7 @@ foreach $g (@groups) {
|
||||
($found++, last) if ($gothost{$m});
|
||||
}
|
||||
print "<option value='group_$g->{'name'}'>",
|
||||
&text('user_ofgroup', $g->{'name'}),"\n" if ($found);
|
||||
&text('user_ofgroup', $g->{'name'}),"</option>\n" if ($found);
|
||||
}
|
||||
print "</select>\n";
|
||||
if ($_[0]) {
|
||||
|
||||
@@ -60,9 +60,9 @@ printf "<input type=radio name=group_def value=1 checked> %s (%s)\n",
|
||||
printf "<input type=radio name=group_def value=0> %s\n",
|
||||
$text{'user_set'};
|
||||
print "<select name=group>\n";
|
||||
print "<option selected value=''>$text{'user_nogroup'}\n";
|
||||
print "<option selected value=''>$text{'user_nogroup'}</option>\n";
|
||||
foreach $g (@wgroups) {
|
||||
print "<option>$g->{'name'}\n";
|
||||
print "<option>$g->{'name'}</option>\n";
|
||||
}
|
||||
print "</select></td> </tr>\n";
|
||||
|
||||
@@ -79,21 +79,21 @@ print "<input type=radio name=mods_def value=0> $text{'user_moddel'}\n";
|
||||
print "<br>\n";
|
||||
print "<select name=mods1 size=$mp multiple>\n";
|
||||
for($i=0; $i<$mp; $i++) {
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$mods[$i]->{'dir'}, $umods{$mods[$i]->{'dir'}} ? "selected" : "",
|
||||
$mods[$i]->{'desc'};
|
||||
}
|
||||
print "</select>\n";
|
||||
print "<select name=mods2 size=$mp multiple>\n";
|
||||
for($i=$mp; $i<$mp*2; $i++) {
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$mods[$i]->{'dir'}, $umods{$mods[$i]->{'dir'}} ? "selected" : "",
|
||||
$mods[$i]->{'desc'};
|
||||
}
|
||||
print "</select>\n";
|
||||
print "<select name=mods3 size=$mp multiple>\n";
|
||||
for($i=$mp*2; $i<@mods; $i++) {
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$mods[$i]->{'dir'}, $umods{$mods[$i]->{'dir'}} ? "selected" : "",
|
||||
$mods[$i]->{'desc'};
|
||||
}
|
||||
@@ -120,14 +120,14 @@ foreach $h (@hosts) {
|
||||
next if (!$g);
|
||||
local ($s) = grep { $_->{'id'} == $h->{'id'} } @servers;
|
||||
local $d = &server_name($s);
|
||||
$sel .= "<option value='$h->{'id'},'>".&text('user_aclhg', $d)."\n"
|
||||
$sel .= "<option value='$h->{'id'},'>".&text('user_aclhg', $d)."</option>\n"
|
||||
if (!$ingroup{$in{'group'}});
|
||||
foreach $m (@{$h->{'modules'}}) {
|
||||
local @gm = $ingroup{$in{'group'}} ? @{$g->{'ownmods'}}
|
||||
: @{$g->{'modules'}};
|
||||
next if (&indexof($m->{'dir'}, @gm) < 0);
|
||||
$sel .= "<option value='$h->{'id'},$m->{'dir'}'>".
|
||||
&text('user_aclh', $m->{'desc'}, $d)."\n";
|
||||
&text('user_aclh', $m->{'desc'}, $d)."</option>\n";
|
||||
}
|
||||
}
|
||||
if ($sel) {
|
||||
|
||||
@@ -182,9 +182,9 @@ print "<input type=hidden name=type value=\"$type\">\n";
|
||||
print "<input type=hidden name=mod value=\"$name\">\n";
|
||||
print "<td><input type=submit value='",$text{"edit_uninst_$type"},"'>\n";
|
||||
print "<select name=server>\n";
|
||||
print "<option value=-1>$text{'edit_all'}\n";
|
||||
print "<option value=-1>$text{'edit_all'}</option>\n";
|
||||
foreach $s (@got) {
|
||||
print "<option value='$s->{'id'}'>",&server_name($s),"\n";
|
||||
print "<option value='$s->{'id'}'>",&server_name($s),"</option>\n";
|
||||
}
|
||||
print "</select></td></form>\n";
|
||||
|
||||
@@ -216,14 +216,14 @@ if ($type eq 'mod') {
|
||||
local @m = $ingroup{$u->{'name'}} ? @{$u->{'ownmods'}}
|
||||
: @{$u->{'modules'}};
|
||||
print "<option value='$h->{'id'},$u->{'name'}'>",
|
||||
&text('edit_uacl', $u->{'name'}, $d),"\n"
|
||||
&text('edit_uacl', $u->{'name'}, $d),"</option>\n"
|
||||
if (&indexof($name, @m) >= 0);
|
||||
}
|
||||
foreach $g (@{$h->{'groups'}}) {
|
||||
local @m = $ingroup{$g->{'name'}} ? @{$g->{'ownmods'}}
|
||||
: @{$g->{'modules'}};
|
||||
print "<option value='$h->{'id'},$g->{'name'}'>",
|
||||
&text('edit_gacl', $g->{'name'}, $d),"\n"
|
||||
&text('edit_gacl', $g->{'name'}, $d),"</option>\n"
|
||||
if (&indexof($name, @m) >= 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,19 +57,19 @@ printf "<input type=radio name=group_def value=1 checked> %s (%s)\n",
|
||||
printf "<input type=radio name=group_def value=0> %s\n",
|
||||
$text{'user_set'};
|
||||
print "<select name=group>\n";
|
||||
print "<option selected value=''>$text{'user_nogroup'}\n";
|
||||
print "<option selected value=''>$text{'user_nogroup'}</option>\n";
|
||||
foreach $g (@wgroups) {
|
||||
print "<option>$g->{'name'}\n";
|
||||
print "<option>$g->{'name'}</option>\n";
|
||||
}
|
||||
print "</select></td> </tr>\n";
|
||||
|
||||
print "<tr> <td><b>$text{'user_pass'}</b></td> <td>\n";
|
||||
print "<select name=pass_def>\n";
|
||||
print "<option value=1 checked> $text{'user_leave'}\n";
|
||||
print "<option value=0> $text{'user_set'} ..\n";
|
||||
print "<option value=3> $text{'user_unix'}\n";
|
||||
print "<option value=4> $text{'user_lock'}\n";
|
||||
print "<option value=5> $text{'user_extauth'}\n";
|
||||
print "<option value=1 checked>$text{'user_leave'}</option>\n";
|
||||
print "<option value=0>$text{'user_set'} ..</option>\n";
|
||||
print "<option value=3>$text{'user_unix'}</option>\n";
|
||||
print "<option value=4>$text{'user_lock'}</option>\n";
|
||||
print "<option value=5>$text{'user_extauth'}</option>\n";
|
||||
print "</select><input type=password name=pass size=25></td> </tr>\n";
|
||||
|
||||
@langs = &list_languages();
|
||||
@@ -81,9 +81,9 @@ printf "<input type=radio name=lang_def value=1 checked> %s (%s)\n",
|
||||
printf "<input type=radio name=lang_def value=0> %s\n",
|
||||
$text{'user_set'};
|
||||
print "<select name=lang>\n";
|
||||
print "<option value='' selected>$text{'user_default'}\n";
|
||||
print "<option value='' selected>$text{'user_default'}</option>\n";
|
||||
foreach $l (@langs) {
|
||||
printf "<option value=%s>%s (%s)\n",
|
||||
printf "<option value=%s>%s (%s)</option>\n",
|
||||
$l->{'lang'},
|
||||
$l->{'desc'}, uc($l->{'lang'});
|
||||
}
|
||||
@@ -98,9 +98,9 @@ printf "<input type=radio name=theme_def value=1 checked> %s (%s)\n",
|
||||
printf "<input type=radio name=theme_def value=0> %s\n",
|
||||
$text{'user_set'};
|
||||
print "<select name=theme>\n";
|
||||
print "<option value=webmin selected>$text{'user_default'}\n";
|
||||
print "<option value=webmin selected>$text{'user_default'}</option>\n";
|
||||
foreach $t ( { 'desc' => $text{'user_themedef'} }, @themes) {
|
||||
printf "<option value='%s'>%s\n", $t->{'dir'}, $t->{'desc'};
|
||||
printf "<option value='%s'>%s</option>\n", $t->{'dir'}, $t->{'desc'};
|
||||
}
|
||||
print "</select></td> </tr>\n";
|
||||
|
||||
@@ -142,21 +142,21 @@ print "<input type=radio name=mods_def value=0> $text{'user_moddel'}\n";
|
||||
print "<br>\n";
|
||||
print "<select name=mods1 size=$mp multiple>\n";
|
||||
for($i=0; $i<$mp; $i++) {
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$mods[$i]->{'dir'}, $umods{$mods[$i]->{'dir'}} ? "selected" : "",
|
||||
$mods[$i]->{'desc'};
|
||||
}
|
||||
print "</select>\n";
|
||||
print "<select name=mods2 size=$mp multiple>\n";
|
||||
for($i=$mp; $i<$mp*2; $i++) {
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$mods[$i]->{'dir'}, $umods{$mods[$i]->{'dir'}} ? "selected" : "",
|
||||
$mods[$i]->{'desc'};
|
||||
}
|
||||
print "</select>\n";
|
||||
print "<select name=mods3 size=$mp multiple>\n";
|
||||
for($i=$mp*2; $i<@mods; $i++) {
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$mods[$i]->{'dir'}, $umods{$mods[$i]->{'dir'}} ? "selected" : "",
|
||||
$mods[$i]->{'desc'};
|
||||
}
|
||||
@@ -183,14 +183,14 @@ foreach $h (@hosts) {
|
||||
next if (!$u);
|
||||
local ($s) = grep { $_->{'id'} == $h->{'id'} } @servers;
|
||||
local $d = &server_name($s);
|
||||
$sel .= "<option value='$h->{'id'},'>".&text('user_aclhg', $d)."\n"
|
||||
$sel .= "<option value='$h->{'id'},'>".&text('user_aclhg', $d)."</option>\n"
|
||||
if (!$ingroup{$in{'user'}});
|
||||
foreach $m (@{$h->{'modules'}}) {
|
||||
local @um = $ingroup{$in{'user'}} ? @{$u->{'ownmods'}}
|
||||
: @{$u->{'modules'}};
|
||||
next if (&indexof($m->{'dir'}, @um) < 0);
|
||||
$sel .= "<option value='$h->{'id'},$m->{'dir'}'>".
|
||||
&text('user_aclh', $m->{'desc'}, $d)."\n";
|
||||
&text('user_aclh', $m->{'desc'}, $d)."</option>\n";
|
||||
}
|
||||
}
|
||||
if ($sel) {
|
||||
|
||||
@@ -19,9 +19,9 @@ print "<td><input name=name size=15></td>\n";
|
||||
|
||||
print "<td><b>$text{'user_group'}</b></td>\n";
|
||||
print "<td><select name=group>\n";
|
||||
print "<option selected value=''>$text{'user_nogroup'}\n";
|
||||
print "<option selected value=''>$text{'user_nogroup'}</option>\n";
|
||||
foreach $g (@wgroups) {
|
||||
print "<option>$g->{'name'}\n";
|
||||
print "<option>$g->{'name'}</option>\n";
|
||||
}
|
||||
print "</select></td> </tr>\n";
|
||||
|
||||
@@ -30,17 +30,17 @@ print "<tr> <td valign=top><b>$text{'user_mods'}</b><br>",
|
||||
"$text{'user_groupmods'}</td> <td colspan=3 nowrap>\n";
|
||||
print "<select name=mods1 size=$mp multiple>\n";
|
||||
for($i=0; $i<$mp; $i++) {
|
||||
print "<option value=$mods[$i]->{'dir'}>$mods[$i]->{'desc'}\n";
|
||||
print "<option value=$mods[$i]->{'dir'}>$mods[$i]->{'desc'}</option>\n";
|
||||
}
|
||||
print "</select>\n";
|
||||
print "<select name=mods2 size=$mp multiple>\n";
|
||||
for($i=$mp; $i<$mp*2; $i++) {
|
||||
print "<option value=$mods[$i]->{'dir'}>$mods[$i]->{'desc'}\n";
|
||||
print "<option value=$mods[$i]->{'dir'}>$mods[$i]->{'desc'}</option>\n";
|
||||
}
|
||||
print "</select>\n";
|
||||
print "<select name=mods3 size=$mp multiple>\n";
|
||||
for($i=$mp*2; $i<@mods; $i++) {
|
||||
print "<option value=$mods[$i]->{'dir'}>$mods[$i]->{'desc'}\n";
|
||||
print "<option value=$mods[$i]->{'dir'}>$mods[$i]->{'desc'}</option>\n";
|
||||
}
|
||||
print "</select>\n";
|
||||
|
||||
|
||||
@@ -65,26 +65,26 @@ else {
|
||||
# Build common selectors
|
||||
@wgroups = &all_groups(\@hosts);
|
||||
$modsel2 = $modsel = "<select name=mod>\n";
|
||||
$modsel2 .= "<option value=''>$text{'index_gacl'}\n";
|
||||
$modsel2 .= "<option value=''>$text{'index_gacl'}</option>\n";
|
||||
foreach $m (&all_modules(\@hosts)) {
|
||||
$modsel .= "<option value=$m->{'dir'}>$m->{'desc'}\n";
|
||||
$modsel2 .= "<option value=$m->{'dir'}>$m->{'desc'}\n";
|
||||
$modsel .= "<option value=$m->{'dir'}>$m->{'desc'}</option>\n";
|
||||
$modsel2 .= "<option value=$m->{'dir'}>$m->{'desc'}</option>\n";
|
||||
}
|
||||
$modsel .= "</select>\n";
|
||||
$modsel2 .= "</select>\n";
|
||||
$themesel = "<select name=theme>\n";
|
||||
foreach $t (&all_themes(\@hosts)) {
|
||||
$themesel .= "<option value=$t->{'dir'}>$t->{'desc'}\n";
|
||||
$themesel .= "<option value=$t->{'dir'}>$t->{'desc'}</option>\n";
|
||||
}
|
||||
$themesel .= "</select>\n";
|
||||
$usersel = "<select name=user>\n";
|
||||
foreach $u (&all_users(\@hosts)) {
|
||||
$usersel .= "<option>$u->{'name'}\n";
|
||||
$usersel .= "<option>$u->{'name'}</option>\n";
|
||||
}
|
||||
$usersel .= "</select>\n";
|
||||
$groupsel = "<select name=group>\n";
|
||||
foreach $u (@wgroups) {
|
||||
$groupsel .= "<option>$u->{'name'}\n";
|
||||
$groupsel .= "<option>$u->{'name'}</option>\n";
|
||||
}
|
||||
$groupsel .= "</select>\n";
|
||||
|
||||
@@ -95,7 +95,7 @@ if (@addservers) {
|
||||
print "<input type=submit name=add value='$text{'index_add'}'>\n";
|
||||
print "<select name=server>\n";
|
||||
foreach $s (@addservers) {
|
||||
print "<option value=$s->{'id'}>",&server_name($s),"\n";
|
||||
print "<option value=$s->{'id'}>",&server_name($s),"</option>\n";
|
||||
}
|
||||
print "</select>\n";
|
||||
print "</td></form>\n";
|
||||
@@ -109,7 +109,7 @@ if (@groups) {
|
||||
print "<input type=submit name=gadd value='$text{'index_gadd'}'>\n";
|
||||
print "<select name=group>\n";
|
||||
foreach $g (@groups) {
|
||||
print "<option>$g->{'name'}\n";
|
||||
print "<option>$g->{'name'}</option>\n";
|
||||
}
|
||||
print "</select>\n";
|
||||
print "</td></form>\n";
|
||||
|
||||
@@ -20,25 +20,25 @@ print "<td><input name=name size=15></td>\n";
|
||||
|
||||
print "<td><b>$text{'user_group'}</b></td>\n";
|
||||
print "<td><select name=group>\n";
|
||||
print "<option selected value=''>$text{'user_nogroup'}\n";
|
||||
print "<option selected value=''>$text{'user_nogroup'}</option>\n";
|
||||
foreach $g (@wgroups) {
|
||||
print "<option>$g->{'name'}\n";
|
||||
print "<option>$g->{'name'}</option>\n";
|
||||
}
|
||||
print "</select></td> </tr>\n";
|
||||
|
||||
print "<tr> <td><b>$text{'user_pass'}</b></td> <td colspan=3>\n";
|
||||
print "<select name=pass_def>\n";
|
||||
print "<option value=0 selected> $text{'user_set'} ..\n";
|
||||
print "<option value=3> $text{'user_unix'}\n";
|
||||
print "<option value=4> $text{'user_lock'}\n";
|
||||
print "<option value=5> $text{'user_extauth'}\n";
|
||||
print "<option value=0 selected>$text{'user_set'} ..</option>\n";
|
||||
print "<option value=3>$text{'user_unix'}</option>\n";
|
||||
print "<option value=4>$text{'user_lock'}</option>\n";
|
||||
print "<option value=5>$text{'user_extauth'}</option>\n";
|
||||
print "</select><input type=password name=pass size=25></td> </tr>\n";
|
||||
|
||||
print "<tr> <td><b>$text{'user_lang'}</b></td> <td>\n";
|
||||
print "<select name=lang>\n";
|
||||
print "<option value='' selected>$text{'user_default'}\n";
|
||||
print "<option value='' selected>$text{'user_default'}</option>\n";
|
||||
foreach $l (&list_languages()) {
|
||||
printf "<option value=%s>%s (%s)\n",
|
||||
printf "<option value=%s>%s (%s)</option>\n",
|
||||
$l->{'lang'},
|
||||
$l->{'desc'}, uc($l->{'lang'});
|
||||
}
|
||||
@@ -46,9 +46,9 @@ print "</select></td>\n";
|
||||
|
||||
print "<td><b>$text{'user_theme'}</b></td> <td>\n";
|
||||
print "<select name=theme>\n";
|
||||
print "<option value=webmin selected>$text{'user_default'}\n";
|
||||
print "<option value=webmin selected>$text{'user_default'}</option>\n";
|
||||
foreach $t ( { 'desc' => $text{'user_themedef'} }, @themes) {
|
||||
printf "<option value='%s'>%s\n", $t->{'dir'}, $t->{'desc'};
|
||||
printf "<option value='%s'>%s</option>\n", $t->{'dir'}, $t->{'desc'};
|
||||
}
|
||||
print "</select></td> </tr>\n";
|
||||
|
||||
@@ -66,17 +66,17 @@ print "<tr> <td valign=top><b>$text{'user_mods'}</b><br>",
|
||||
"$text{'user_groupmods'}</td> <td colspan=3 nowrap>\n";
|
||||
print "<select name=mods1 size=$mp multiple>\n";
|
||||
for($i=0; $i<$mp; $i++) {
|
||||
print "<option value=$mods[$i]->{'dir'}>$mods[$i]->{'desc'}\n";
|
||||
print "<option value=$mods[$i]->{'dir'}>$mods[$i]->{'desc'}</option>\n";
|
||||
}
|
||||
print "</select>\n";
|
||||
print "<select name=mods2 size=$mp multiple>\n";
|
||||
for($i=$mp; $i<$mp*2; $i++) {
|
||||
print "<option value=$mods[$i]->{'dir'}>$mods[$i]->{'desc'}\n";
|
||||
print "<option value=$mods[$i]->{'dir'}>$mods[$i]->{'desc'}</option>\n";
|
||||
}
|
||||
print "</select>\n";
|
||||
print "<select name=mods3 size=$mp multiple>\n";
|
||||
for($i=$mp*2; $i<@mods; $i++) {
|
||||
print "<option value=$mods[$i]->{'dir'}>$mods[$i]->{'desc'}\n";
|
||||
print "<option value=$mods[$i]->{'dir'}>$mods[$i]->{'desc'}</option>\n";
|
||||
}
|
||||
print "</select>\n";
|
||||
|
||||
|
||||
@@ -772,7 +772,7 @@ if ($config{'vixie_cron'} && (!$_[1] || $_[0]->{'special'})) {
|
||||
local $sp = $job->{'special'} eq 'midnight' ? 'daily' :
|
||||
$job->{'special'} eq 'annually' ? 'yearly' : $job->{'special'};
|
||||
foreach $s ('hourly', 'daily', 'weekly', 'monthly', 'yearly', 'reboot'){
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$s, $sp eq $s ? "selected" : "", $text{'edit_special_'.$s};
|
||||
}
|
||||
print "</select>\n";
|
||||
@@ -868,7 +868,7 @@ foreach $arr ("mins", "hours", "days", "months", "weekdays") {
|
||||
foreach $v (@sec) {
|
||||
if ($v =~ /^(.*)=(.*)$/) { $disp = $1; $code = $2; }
|
||||
else { $disp = $code = $v; }
|
||||
printf "<option value=\"$code\" %s>$disp\n",
|
||||
printf "<option value=\"$code\" %s>$disp</option>\n",
|
||||
$inuse{$code} ? "selected" : "";
|
||||
}
|
||||
print "</select></td>\n";
|
||||
|
||||
@@ -19,7 +19,7 @@ local @cmds = &sort_commands(&list_commands());
|
||||
local ($c, %ccan);
|
||||
map { $ccan{$_}++ } split(/\s+/, $_[0]->{'cmds'});
|
||||
foreach $c (@cmds) {
|
||||
printf "<option value=%s %s> %s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$c->{'id'},
|
||||
$ccan{$c->{'id'}} ? "selected" : "",
|
||||
$c->{'desc'};
|
||||
|
||||
@@ -52,12 +52,12 @@ close();
|
||||
<tr> <td colspan=7 align=center><select name=year onChange='newyear(this)'>
|
||||
EOF
|
||||
for($i=$in{'year'}-10; $i<=$in{'year'}+10; $i++) {
|
||||
printf "<option %s>%s\n",
|
||||
printf "<option %s>%s</option>\n",
|
||||
$i == $in{'year'} ? 'selected' : '', $i;
|
||||
}
|
||||
print "</select> <select name=month onChange='newmonth(this)'>\n";
|
||||
for($i=0; $i<12; $i++) {
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$i, $i == $in{'month'} ? 'selected' : '',
|
||||
$text{"month_".($i+1)};
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ foreach $g (&find("group", $mems)) {
|
||||
@host = sort { $a->{'values'}->[0] cmp $b->{'values'}->[0] } @host;
|
||||
foreach $h (@host) {
|
||||
next if !&can('r', \%access, $h);
|
||||
printf "<option value=\"%s,%s\" %s>%s\n",
|
||||
printf "<option value=\"%s,%s\" %s>%s</option>\n",
|
||||
$h->{'index'}, $ingroup{$h},
|
||||
(!$in{'new'}) && $ingroup{$h} eq $group->{'index'} ? "selected" : "",
|
||||
$h->{'values'}->[0];
|
||||
@@ -140,7 +140,7 @@ if (!defined($in{'ret'})) {
|
||||
else {
|
||||
print "<select name=assign onChange='setparent(0)'>\n";
|
||||
for ($i = 0; $i <= 2; $i++) {
|
||||
printf "<option value=$i %s>%s\n",
|
||||
printf "<option value=$i %s>%s</option>\n",
|
||||
$assign == $i ? "selected" : "",
|
||||
$labels[$i];
|
||||
}
|
||||
@@ -150,7 +150,7 @@ if (!defined($in{'ret'})) {
|
||||
if ($assign == 2) {
|
||||
$iu = 0;
|
||||
foreach $u (@subn) {
|
||||
printf "<option value=\"%s\" %s>%s\n",
|
||||
printf "<option value=\"%s\" %s>%s</option>\n",
|
||||
defined($shared{$u}) ? "$shared{$u},$u->{'index'}" : $u->{'index'},
|
||||
$iu == $sel_parent ? "selected" : "",
|
||||
$subn_desc[$iu]
|
||||
@@ -161,7 +161,7 @@ if (!defined($in{'ret'})) {
|
||||
elsif ($assign == 1) {
|
||||
$is = 0;
|
||||
foreach $s (@shar) {
|
||||
printf "<option value=\"%s\" %s>%s\n",
|
||||
printf "<option value=\"%s\" %s>%s</option>\n",
|
||||
$s->{'index'},
|
||||
$is == $sel_parent ? "selected" : "",
|
||||
$shar_desc[$is]
|
||||
|
||||
@@ -185,7 +185,7 @@ if (!defined($in{'ret'})) {
|
||||
else {
|
||||
print "<select name=assign onChange='setparent(0)'>\n";
|
||||
for ($i = 0; $i <= 3; $i++) {
|
||||
printf "<option value=$i %s>%s\n",
|
||||
printf "<option value=$i %s>%s</option>\n",
|
||||
$assign == $i ? "selected" : "",
|
||||
$labels[$i];
|
||||
}
|
||||
@@ -195,7 +195,7 @@ if (!defined($in{'ret'})) {
|
||||
if ($assign == 3) {
|
||||
$ig = 0;
|
||||
foreach $g (@group) {
|
||||
printf "<option value=\"%s\" %s>%s\n",
|
||||
printf "<option value=\"%s\" %s>%s</option>\n",
|
||||
(defined($shared{$g}) ? "$shared{$g}," : "").
|
||||
(defined($subnet{$g}) ? "$subnet{$g}," : "").
|
||||
$g->{'index'},
|
||||
@@ -208,7 +208,7 @@ if (!defined($in{'ret'})) {
|
||||
elsif ($assign == 2) {
|
||||
$iu = 0;
|
||||
foreach $u (@subn) {
|
||||
printf "<option value=\"%s\" %s>%s\n",
|
||||
printf "<option value=\"%s\" %s>%s</option>\n",
|
||||
defined($shared{$u}) ? "$shared{$u},$u->{'index'}" : $u->{'index'},
|
||||
$iu == $sel_parent ? "selected" : "",
|
||||
$subn_desc[$iu]
|
||||
@@ -219,7 +219,7 @@ if (!defined($in{'ret'})) {
|
||||
elsif ($assign == 1) {
|
||||
$is = 0;
|
||||
foreach $s (@shar) {
|
||||
printf "<option value=\"%s\" %s>%s\n",
|
||||
printf "<option value=\"%s\" %s>%s</option>\n",
|
||||
$s->{'index'},
|
||||
$is == $sel_parent ? "selected" : "",
|
||||
$shar_desc[$is]
|
||||
@@ -240,11 +240,11 @@ else {
|
||||
$hard = $hconf ? &find("hardware", $hconf) : undef;
|
||||
print "<td><b>$text{'ehost_hwaddr'}</b></td>\n";
|
||||
print "<td nowrap><select name=hardware_type>\n";
|
||||
printf "<option %s>ethernet\n",
|
||||
printf "<option %s>ethernet</option>\n",
|
||||
$hard && $hard->{'values'}->[0] eq "ethernet" ? "selected" : "";
|
||||
printf "<option %s>token-ring\n",
|
||||
printf "<option %s>token-ring</option>\n",
|
||||
$hard && $hard->{'values'}->[0] eq "token-ring" ? "selected" : "";
|
||||
printf "<option %s>fddi\n",
|
||||
printf "<option %s>fddi</option>\n",
|
||||
$hard && $hard->{'values'}->[0] eq "fddi" ? "selected" : "";
|
||||
print "</select>";
|
||||
printf "<input name=hardware size=18 value=\"%s\"></td> </tr>\n",
|
||||
|
||||
@@ -100,7 +100,7 @@ if (&foreign_check("net")) {
|
||||
print "<td><select name=iface multiple size=$sz>\n";
|
||||
foreach $i (@ifaces) {
|
||||
$n = $i->{'fullname'};
|
||||
printf "<option value=%s %s>%s (%s)\n",
|
||||
printf "<option value=%s %s>%s (%s)</option>\n",
|
||||
$n, $got{$n} ? 'selected' : '', $n, &net::iface_type($n);
|
||||
}
|
||||
print "</select></td>\n";
|
||||
|
||||
@@ -41,10 +41,10 @@ for($i=0; $i<@keys; $i++) {
|
||||
print "<td><select name=alg_$i>\n";
|
||||
local $found;
|
||||
foreach $a (@algs) {
|
||||
printf "<option %s>%s\n", $alg eq $a ? "selected" : "", $a;
|
||||
printf "<option %s>%s</option>\n", $alg eq $a ? "selected" : "", $a;
|
||||
$found++ if ($alg eq $a);
|
||||
}
|
||||
print "<option selected>$alg\n" if (!$found && $alg);
|
||||
print "<option selected>$alg</option>\n" if (!$found && $alg);
|
||||
print "</select></td>\n";
|
||||
|
||||
printf "<td><input name=secret_$i size=64 value='%s'></td> </tr>\n",
|
||||
|
||||
@@ -74,7 +74,7 @@ print "<td valign=top align=right><b>$text{'esh_hosts'}</b></td>\n";
|
||||
print "<td><select name=hosts size=3 multiple>\n";
|
||||
foreach $h (@host) {
|
||||
next if !&can('r', \%access, $h);
|
||||
printf "<option value=\"%s,%s\" %s>%s\n",
|
||||
printf "<option value=\"%s,%s\" %s>%s</option>\n",
|
||||
$h->{'index'}, $inshar{$h},
|
||||
(!$in{'new'}) && $inshar{$h} eq $sha->{'index'} ? "selected" : "",
|
||||
$h->{'values'}->[0];
|
||||
@@ -89,7 +89,7 @@ foreach $g (@group) {
|
||||
foreach $h (@{$g->{'members'}}) {
|
||||
if ($h->{'name'} eq "host") { $gm++; }
|
||||
}
|
||||
printf "<option value=\"%s,%s\" %s>%s\n",
|
||||
printf "<option value=\"%s,%s\" %s>%s</option>\n",
|
||||
$g->{'index'}, $inshar{$g},
|
||||
(!$in{'new'}) && $inshar{$g} eq $sha->{'index'} ? "selected" : "",
|
||||
&group_name($gm, $g);
|
||||
@@ -100,7 +100,7 @@ print "<td valign=top align=right><b>$text{'esh_subn'}</b></td>\n";
|
||||
print "<td><select name=subnets size=3 multiple>\n";
|
||||
foreach $s (@subn) {
|
||||
next if !&can('r', \%access, $s);
|
||||
printf "<option value=\"%s,%s\" %s>%s\n",
|
||||
printf "<option value=\"%s,%s\" %s>%s</option>\n",
|
||||
$s->{'index'}, $inshar{$s},
|
||||
(!$in{'new'}) && $inshar{$s} eq $sha->{'index'} ? "selected" : "",
|
||||
$s->{'values'}->[0];
|
||||
|
||||
@@ -71,10 +71,10 @@ print "</td> </tr>\n";
|
||||
if (!defined($in{'ret'})) {
|
||||
print "<tr> <td><b>$text{'esub_shnet'}</b></td>\n";
|
||||
print "<td><select name=parent>\n";
|
||||
printf "<option value=\"\" '%s'><%s>\n",
|
||||
printf "<option value=\"\" '%s'><%s></option>\n",
|
||||
$s_parent ? "" : "checked", $text{'esub_none'};
|
||||
foreach $s (&find("shared-network", $conf)) {
|
||||
printf "<option value=\"%s\" %s>%s\n",
|
||||
printf "<option value=\"%s\" %s>%s</option>\n",
|
||||
$s->{'index'},
|
||||
$s eq $s_parent ? "selected" : "",
|
||||
$s->{'values'}->[0]
|
||||
@@ -116,7 +116,7 @@ print "<tr> <td valign=top><b>$text{'esub_hosts'}</b></td>\n";
|
||||
print "<td><select name=hosts size=3 multiple>\n";
|
||||
foreach $h (@host) {
|
||||
next if !&can('r', \%access, $h);
|
||||
printf "<option value=\"%s,%s\" %s>%s\n",
|
||||
printf "<option value=\"%s,%s\" %s>%s</option>\n",
|
||||
$h->{'index'}, $insubn{$h},
|
||||
(!$in{'new'}) && $insubn{$h} eq $sub->{'index'} ? "selected" : "",
|
||||
$h->{'values'}->[0];
|
||||
@@ -131,7 +131,7 @@ foreach $g (@group) {
|
||||
foreach $h (@{$g->{'members'}}) {
|
||||
if ($h->{'name'} eq "host") { $gm++; }
|
||||
}
|
||||
printf "<option value=\"%s,%s\" %s>%s\n",
|
||||
printf "<option value=\"%s,%s\" %s>%s</option>\n",
|
||||
$g->{'index'}, $insubn{$g},
|
||||
(!$in{'new'}) && $insubn{$g} eq $sub->{'index'} ? "selected" : "",
|
||||
&group_name($gm, $g);
|
||||
|
||||
@@ -73,9 +73,9 @@ if ($st[7] != $config{'dhcpd_size'} || $st[9] != $config{'dhcpd_mtime'}) {
|
||||
# Create lookup type HTML
|
||||
# XXX change text, add to lookup_*
|
||||
$match = "<select name=match>\n";
|
||||
$match .= "<option value=0 checked>$text{'index_match0'}\n";
|
||||
$match .= "<option value=1>$text{'index_match1'}\n";
|
||||
$match .= "<option value=2>$text{'index_match2'}\n";
|
||||
$match .= "<option value=0 checked>$text{'index_match0'}</option>\n";
|
||||
$match .= "<option value=1>$text{'index_match1'}</option>\n";
|
||||
$match .= "<option value=2>$text{'index_match2'}</option>\n";
|
||||
$match .= "</select>\n";
|
||||
|
||||
# get top-level hosts
|
||||
|
||||
@@ -19,7 +19,7 @@ local ($z, %zcan);
|
||||
map { $zcan{$_}++ } split(/\s+/, $_[0]->{'zones'});
|
||||
foreach $z (sort { $a->{'value'} cmp $b->{'value'} } @zones) {
|
||||
local $v = $z->{'values'}->[0];
|
||||
printf "<option value='%s' %s>%s\n",
|
||||
printf "<option value='%s' %s>%s</option>\n",
|
||||
$v, $zcan{$v} ? "selected" : "",
|
||||
&arpa_to_ip($v);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ printf "<input type=radio name=disks_def value=0 %s> %s<br>\n",
|
||||
$_[0]->{'disks'} eq '*' ? '' : 'checked', $text{'acl_dsel'};
|
||||
print "<select name=disks size=4 multiple>\n";
|
||||
foreach $d (@dlist) {
|
||||
printf "<option value='%s' %s>%s\n",
|
||||
printf "<option value='%s' %s>%s</option>\n",
|
||||
$d->{'device'},
|
||||
$dcan{$d->{'device'}} ? "selected" : "",
|
||||
&text('select_device', uc($d->{'type'}), uc(substr($d->{'device'}, -1))).($d->{'model'} ? " ($d->{'model'})" : "");
|
||||
|
||||
@@ -35,7 +35,7 @@ print "<td><input name=email size=25 value='$gconfig{'feedback_email'}'></td> </
|
||||
|
||||
print "<tr> <td><b>$text{'feedback_module'}</b></td>\n";
|
||||
print "<td><select name=module>\n";
|
||||
printf "<option value='' %s>%s\n",
|
||||
printf "<option value='' %s>%s</option>\n",
|
||||
$in{'module'} ? "" : "selected", $text{'feedback_all'};
|
||||
@modules = ( );
|
||||
foreach $minfo (&get_all_module_infos()) {
|
||||
@@ -45,7 +45,7 @@ foreach $minfo (&get_all_module_infos()) {
|
||||
}
|
||||
}
|
||||
foreach $m (sort { $a->{'desc'} cmp $b->{'desc'} } @modules) {
|
||||
printf "<option %s value=%s>%s\n",
|
||||
printf "<option %s value=%s>%s</option>\n",
|
||||
$in{'module'} eq $m->{'dir'} ? "selected" : "",
|
||||
$m->{'dir'}, $m->{'desc'};
|
||||
}
|
||||
|
||||
@@ -33,14 +33,14 @@ print "<tr $cb> <td><table width=100%>\n";
|
||||
|
||||
print "<tr> <td><b>$text{'poll_proto'}</b></td>\n";
|
||||
print "<td><select name=proto>\n";
|
||||
printf "<option value='' %s> %s\n",
|
||||
printf "<option value='' %s>%s</option>\n",
|
||||
$poll->{'proto'} ? '' : 'selected', $text{'default'};
|
||||
foreach $p ('pop3', 'pop2', 'imap', 'imap-k4', 'imap-gss', 'apop', 'kpop') {
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$p, lc($poll->{'proto'}) eq $p ? 'selected' : '', uc($p);
|
||||
$found++ if (lc($poll->{'proto'}) eq $p);
|
||||
}
|
||||
printf "<option value=%s selected>%s\n", $poll->{'proto'}, uc($poll->{'proto'})
|
||||
printf "<option value=%s selected>%s</option>\n", $poll->{'proto'}, uc($poll->{'proto'})
|
||||
if (!$found && $poll->{'proto'});
|
||||
print "</select></td>\n";
|
||||
|
||||
|
||||
@@ -54,14 +54,14 @@ printf "<input name=via size=30 value='%s'></td> </tr>\n",
|
||||
|
||||
print "<tr> <td><b>$text{'poll_proto'}</b></td>\n";
|
||||
print "<td><select name=proto>\n";
|
||||
printf "<option value='' %s> %s\n",
|
||||
printf "<option value='' %s>%s</option>\n",
|
||||
$poll->{'proto'} ? '' : 'selected', $text{'default'};
|
||||
foreach $p ('pop3', 'pop2', 'imap', 'imap-k4', 'imap-gss', 'apop', 'kpop') {
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$p, lc($poll->{'proto'}) eq $p ? 'selected' : '', uc($p);
|
||||
$found++ if (lc($poll->{'proto'}) eq $p);
|
||||
}
|
||||
printf "<option value=%s selected>%s\n", $poll->{'proto'}, uc($poll->{'proto'})
|
||||
printf "<option value=%s selected>%s</option>\n", $poll->{'proto'}, uc($poll->{'proto'})
|
||||
if (!$found && $poll->{'proto'});
|
||||
print "</select></td>\n";
|
||||
|
||||
@@ -76,14 +76,14 @@ printf "<input name=port size=8 value='%s'></td> </tr>\n",
|
||||
|
||||
print "<tr> <td><b>$text{'poll_auth'}</b></td>\n";
|
||||
print "<td><select name=auth>\n";
|
||||
printf "<option value='' %s> %s\n",
|
||||
printf "<option value='' %s>%s</option>\n",
|
||||
$poll->{'auth'} ? '' : 'selected', $text{'default'};
|
||||
foreach $p ('password', 'kerberos_v5', 'kerberos_v4', 'gssapi', 'cram-md5', 'otp', 'ntlm', 'ssh') {
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$p, lc($poll->{'auth'}) eq $p ? 'selected' : '', uc($p);
|
||||
$found++ if (lc($poll->{'auth'}) eq $p);
|
||||
}
|
||||
printf "<option value=%s selected>%s\n", $poll->{'auth'}, uc($poll->{'auth'})
|
||||
printf "<option value=%s selected>%s</option>\n", $poll->{'auth'}, uc($poll->{'auth'})
|
||||
if (!$found && $poll->{'auth'});
|
||||
print "</select></td> </tr>\n";
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ if (@addservers) {
|
||||
print "<select name=server>\n";
|
||||
foreach $s (@addservers) {
|
||||
print "<option value=$s->{'id'}>",
|
||||
$s->{'desc'} ? $s->{'desc'} : $s->{'host'},"\n";
|
||||
$s->{'desc'} ? $s->{'desc'} : $s->{'host'},"</option>\n";
|
||||
}
|
||||
print "</select></td>\n";
|
||||
}
|
||||
@@ -56,7 +56,7 @@ if (@groups) {
|
||||
"value='$text{'cluster_gadd'}'>\n";
|
||||
print "<select name=group>\n";
|
||||
foreach $g (@groups) {
|
||||
print "<option>$g->{'name'}\n";
|
||||
print "<option>$g->{'name'}</option>\n";
|
||||
}
|
||||
print "</select></td>\n";
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ else {
|
||||
print "<select name=table onChange='form.submit()'>\n";
|
||||
foreach $t (@tables) {
|
||||
if (&can_edit_table($t->{'name'})) {
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$t->{'index'}, $t eq $table ? "selected" : "",
|
||||
&text('index_table_'.$t->{'name'}) || $t->{'name'};
|
||||
}
|
||||
@@ -289,7 +289,7 @@ else {
|
||||
&ui_submit($text{'index_policy'}),"\n";
|
||||
print "<select name=policy>\n";
|
||||
foreach $t ('ACCEPT','DROP','QUEUE','RETURN') {
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$t, $d eq $t ? "selected" : "",
|
||||
$text{"index_policy_".lc($t)};
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ printf "<input type=radio name=disks_def value=0 %s> %s<br>\n",
|
||||
print "<select name=disks size=4 multiple>\n";
|
||||
foreach $d (@dlist) {
|
||||
$d->{'device'} =~ s/^.*\///;
|
||||
printf "<option value='%s' %s>%s\n",
|
||||
printf "<option value='%s' %s>%s</option>\n",
|
||||
$d->{'device'},
|
||||
$dcan{$d->{'device'}} ? "selected" : "",
|
||||
"$d->{'desc'} ($d->{'type'})";
|
||||
|
||||
@@ -29,7 +29,7 @@ print "<tr> <td><b>$text{'edit_dev'}</b></td> <td><tt>$dev</tt></td> </tr>\n";
|
||||
|
||||
print "<tr> <td><b>$text{'edit_type'}</b></td> <td><select name=tag>\n";
|
||||
foreach $t (&list_tags()) {
|
||||
printf "<option %s>$t\n", $t eq $pinfo->{'tag'} ? "selected" : "";
|
||||
printf "<option %s>$t</option>\n", $t eq $pinfo->{'tag'} ? "selected" : "";
|
||||
}
|
||||
print "</select></td> </tr>\n";
|
||||
|
||||
|
||||
@@ -319,7 +319,7 @@ foreach $d (@dlist) {
|
||||
if ($_[0] > 2) {
|
||||
local $name = $d->{'desc'};
|
||||
$name .= " ($d->{'type'})" if ($d->{'type'});
|
||||
$rv .= sprintf "<option value=%s %s>%s\n",
|
||||
$rv .= sprintf "<option value=%s %s>%s</option>\n",
|
||||
$d->{'device'},
|
||||
$_[1] eq $d->{'device'} ? "selected" : "", $name;
|
||||
$found++ if ($_[1] eq $d->{'device'});
|
||||
@@ -330,7 +330,7 @@ foreach $d (@dlist) {
|
||||
local $name = $p->{'desc'};
|
||||
next if (!$p->{'end'});
|
||||
$name .= " ($p->{'tag'})" if ($p->{'tag'});
|
||||
$rv .= sprintf "<option %s value=%s>%s\n",
|
||||
$rv .= sprintf "<option %s value=%s>%s</option>\n",
|
||||
$_[1] eq $p->{'device'} ? "selected" : "",
|
||||
$p->{'device'}, $name;
|
||||
$found++ if ($_[1] eq $p->{'device'});
|
||||
@@ -338,7 +338,7 @@ foreach $d (@dlist) {
|
||||
}
|
||||
}
|
||||
if (!$found && $_[1] && !$_[3]) {
|
||||
$rv .= "<option selected>$_[1]\n";
|
||||
$rv .= "<option selected>$_[1]</option>\n";
|
||||
}
|
||||
if ($_[3]) {
|
||||
${$_[3]} = $found;
|
||||
|
||||
@@ -30,9 +30,9 @@ print "<tr $cb> <td><table width=100%>\n";
|
||||
&opt_input("ufs_n", "", 0);
|
||||
print "<tr> <td align=right><b>$text{'ufs_o'}</b></td>\n";
|
||||
print "<td><select name=ufs_o>\n";
|
||||
print "<option value=''> $text{'default'}\n";
|
||||
print "<option value=space> $text{'newfs_space'}\n";
|
||||
print "<option value=time> $text{'newfs_time'}\n";
|
||||
print "<option value=''>$text{'default'}</option>\n";
|
||||
print "<option value=space>$text{'newfs_space'}</option>\n";
|
||||
print "<option value=time>$text{'newfs_time'}</option>\n";
|
||||
print "</select></td>\n";
|
||||
&opt_input("ufs_r", "rpm", 0);
|
||||
&opt_input("ufs_s", "sectors", 1);
|
||||
|
||||
@@ -23,9 +23,9 @@ print "<tr $cb> <td><table width=100%>\n";
|
||||
&opt_input("tunefs_m", "%", 0);
|
||||
print "<tr> <td align=right><b>$text{'tunefs_opt'}</b></td>\n";
|
||||
print "<td><select name=tunefs_o>\n";
|
||||
print "<option value=''> $text{'default'}\n";
|
||||
print "<option value=space> $text{'tunefs_space'}\n";
|
||||
print "<option value=time> $text{'tunefs_time'}\n";
|
||||
print "<option value=''>$text{'default'}</option>\n";
|
||||
print "<option value=space>$text{'tunefs_space'}</option>\n";
|
||||
print "<option value=time>$text{'tunefs_time'}</option>\n";
|
||||
print "</select></td>\n";
|
||||
print "</table></td></tr></table><br>\n";
|
||||
|
||||
|
||||
@@ -215,11 +215,15 @@ if ($ref) {
|
||||
sub theme_post_change_modules
|
||||
{
|
||||
print <<EOF;
|
||||
<script>
|
||||
<script type='text/javascript'>
|
||||
var url = '' + top.left.location;
|
||||
if (url.indexOf('mode=webmin') > 0) {
|
||||
top.left.location = url;
|
||||
if ( url.match(/mode=.*/) ) {
|
||||
if ( url.indexOf('mode=webmin') > 0) {
|
||||
top.left.location = url;
|
||||
}
|
||||
} else {
|
||||
top.left.location = url;
|
||||
}
|
||||
</script>
|
||||
EOF
|
||||
}
|
||||
|
||||
@@ -18,16 +18,16 @@ for($i=0; $i<=@serials; $i++) {
|
||||
local $sfound;
|
||||
print "<select name=serial_$i>\n";
|
||||
opendir(DIR, "/dev");
|
||||
printf "<option value='' %s>%s\n",
|
||||
printf "<option value='' %s>%s</option>\n",
|
||||
$serials[$i] ? "" : "selected",
|
||||
$i ? " " : $text{'conf_none'};
|
||||
foreach $p (glob($config{'serials'})) {
|
||||
printf "<option %s>%s\n",
|
||||
printf "<option %s>%s</option>\n",
|
||||
$p eq $serials[$i] ? "selected" : "", $p;
|
||||
$sfound++ if ($p eq $serials[$i]);
|
||||
}
|
||||
closedir(DIR);
|
||||
print "<option selected>$serials[$i]\n" if ($serials[$i] && !$sfound);
|
||||
print "<option selected>$serials[$i]</option>\n" if ($serials[$i] && !$sfound);
|
||||
print "</select>\n";
|
||||
}
|
||||
print "</td> </tr>\n";
|
||||
@@ -67,9 +67,9 @@ printf "<input type=radio name=mcast_def value=0 %s>\n",
|
||||
$mcast ? "checked" : "";
|
||||
@mcast = split(/\s+/, $mcast);
|
||||
$mloop = "<select name=mcast_loop>\n";
|
||||
$mloop .= sprintf "<option value=0 %s>%s\n",
|
||||
$mloop .= sprintf "<option value=0 %s>%s</option>\n",
|
||||
$mcast[4] ? "" : "selected", $text{'conf_disabled'};
|
||||
$mloop .= sprintf "<option value=1 %s>%s\n",
|
||||
$mloop .= sprintf "<option value=1 %s>%s</option>\n",
|
||||
$mcast[4] ? "selected" : "", $text{'conf_enabled'};
|
||||
$mloop .= "</select>\n";
|
||||
print &text('conf_mcastv',
|
||||
@@ -129,7 +129,7 @@ if (&foreign_check("syslog")) {
|
||||
local %sconfig = &foreign_config("syslog");
|
||||
print "<select name=logfacility>\n";
|
||||
foreach $f (split(/\s+/, $sconfig{'facilities'})) {
|
||||
printf "<option %s>%s\n",
|
||||
printf "<option %s>%s</option>\n",
|
||||
$f eq $logfacility ? "selected" : "", $f;
|
||||
}
|
||||
print "</select>\n";
|
||||
|
||||
@@ -63,16 +63,16 @@ $i = 0;
|
||||
foreach $a (@{$res->{'servs'}}, "") {
|
||||
local @a = split(/::/, $a);
|
||||
print "<tr $cb> <td><select name=serv_$i>\n";
|
||||
printf "<option value='' %s> \n",
|
||||
printf "<option value='' %s> </option>\n",
|
||||
$a[0] ? "" : "selected";
|
||||
local $found;
|
||||
foreach $s (@acts) {
|
||||
printf "<option %s>%s\n",
|
||||
printf "<option %s>%s</option>\n",
|
||||
$a[0] eq $s ? "selected" : "", $s;
|
||||
$found++ if ($a[0] eq $s);
|
||||
}
|
||||
if (!$found && $a[0]) {
|
||||
print "<option selected>$a[0]\n";
|
||||
print "<option selected>$a[0]</option>\n";
|
||||
}
|
||||
print "</select></td>\n";
|
||||
printf "<td><input name=args_$i size=40 value='%s'></td> </tr>\n",
|
||||
|
||||
@@ -16,7 +16,7 @@ print "<td><input type=radio name=all value=1 checked> $text{'index_all'}\n";
|
||||
print " <input type=radio name=all value=0> $text{'index_sel'}<br>\n";
|
||||
print " <select name=mods size=5 multiple>\n";
|
||||
foreach $m (&list_modules()) {
|
||||
printf "<option value=%s>%s\n",
|
||||
printf "<option value=%s>%s</option>\n",
|
||||
$m->[0], $m->[1]->{'desc'};
|
||||
}
|
||||
print "</select></td> </tr>\n";
|
||||
|
||||
@@ -117,7 +117,12 @@ if ($ty == 1) {
|
||||
print "<td><input size=60 name=uses value=\"\"></td></tr>\n";
|
||||
|
||||
print "<tr>", &hostconfig_createtext("OrderPreference","");
|
||||
print "<td><SELECT name=order><option value=First>First<option value=Early>Early<option value=None selected>None<option value=Late>Late<option value=Last>Last</select></td></tr>\n";
|
||||
print "<td><SELECT name=order><option value=First>First</option>",
|
||||
"<option value=Early>Early</option>",
|
||||
"<option value='None selected'>None</option>",
|
||||
"<option value=Late>Late</option>",
|
||||
"<option value=Last>Last</option>",
|
||||
"</select></td></tr>\n";
|
||||
|
||||
print "<tr>", &hostconfig_createtext("Start Message","");
|
||||
print "<td><input size=60 name=start value=\"\"></td></tr>\n";
|
||||
|
||||
@@ -45,7 +45,7 @@ if (@addservers) {
|
||||
print "<select name=server>\n";
|
||||
foreach $s (@addservers) {
|
||||
print "<option value=$s->{'id'}>",
|
||||
$s->{'desc'} ? $s->{'desc'} : $s->{'host'},"\n";
|
||||
$s->{'desc'} ? $s->{'desc'} : $s->{'host'},"</option>\n";
|
||||
}
|
||||
print "</select></td>\n";
|
||||
}
|
||||
@@ -55,7 +55,7 @@ if (@groups) {
|
||||
"value='$text{'cluster_gadd'}'>\n";
|
||||
print "<select name=group>\n";
|
||||
foreach $g (@groups) {
|
||||
print "<option>$g->{'name'}\n";
|
||||
print "<option>$g->{'name'}</option>\n";
|
||||
}
|
||||
print "</select></td>\n";
|
||||
}
|
||||
|
||||
@@ -263,7 +263,7 @@ print &ui_table_row($text{'edit_gid'},
|
||||
$icmptypes = "<select name=icmptypes size=5 multiple>\n";
|
||||
for($i=0; $i<@icmptypes; $i++) {
|
||||
if ($icmptypes[$i] || $gottypes{$i}) {
|
||||
$icmptypes .= sprintf "<option value=%d %s>%s\n",
|
||||
$icmptypes .= sprintf "<option value=%d %s>%s</option>\n",
|
||||
$i, $gottypes{$i} ? "selected" : "",
|
||||
$icmptypes[$i] || "Type $i";
|
||||
}
|
||||
@@ -275,11 +275,11 @@ print &ui_table_row($text{'edit_icmptypes'}, $icmptypes, 1, \@tds);
|
||||
%gotflags = map { $_, 1 } split(/,/, $rule->{'tcpflags'});
|
||||
$tcpflags = "<select name=tcpflags size=5 multiple>\n";
|
||||
foreach $i (@tcpflags) {
|
||||
$tcpflags .= sprintf "<option value=%s %s>%s\n",
|
||||
$tcpflags .= sprintf "<option value=%s %s>%s</option>\n",
|
||||
$i, $gotflags{$i} ? "selected" : "", $i;
|
||||
}
|
||||
foreach $i (@tcpflags) {
|
||||
$tcpflags .= sprintf "<option value=!%s %s>%s\n",
|
||||
$tcpflags .= sprintf "<option value=!%s %s>%s</option>\n",
|
||||
$i, $gotflags{"!$i"} ? "selected" : "", &text('edit_not', $i);
|
||||
}
|
||||
$tcpflags .= "</select>\n";
|
||||
|
||||
@@ -40,25 +40,25 @@ foreach $ifc (@iflist, "") {
|
||||
|
||||
$found = 0;
|
||||
print "<td><select name=ri_$n>\n";
|
||||
print "<option value=''> \n";
|
||||
print "<option value=''> </option>\n";
|
||||
foreach $r (@allifaces) {
|
||||
next if ($r =~ /^ipsec/ || $r =~ /:/);
|
||||
printf "<option value=%s %s>%s (%s)\n",
|
||||
printf "<option value=%s %s>%s (%s)</option>\n",
|
||||
$r, $ri eq $r ? "selected" : "", $r,
|
||||
&net::iface_type($r);
|
||||
$found++ if ($ri eq $r);
|
||||
}
|
||||
print "<option value=$ri selected>$ri\n" if (!$found && $ri);
|
||||
print "<option value=$ri selected>$ri</option>\n" if (!$found && $ri);
|
||||
print "</select></td>\n";
|
||||
|
||||
$found = 0;
|
||||
print "<td><select name=ii_$n>\n";
|
||||
foreach $k (0 .. 4) {
|
||||
printf "<option value=ipsec%d %s>ipsec%d\n",
|
||||
printf "<option value=ipsec%d %s>ipsec%d</option>\n",
|
||||
$k, $ii eq "ipsec$k" ? "selected" : "", $k;
|
||||
$found++ if ($ii eq "ipsec$k");
|
||||
}
|
||||
print "<option value=$ii selected>$ii\n" if (!$found && $ii);
|
||||
print "<option value=$ii selected>$ii</option>\n" if (!$found && $ii);
|
||||
print "</select></td>\n";
|
||||
|
||||
print "</tr>\n";
|
||||
@@ -80,12 +80,12 @@ $pri =~ s/panic$/emerg/;
|
||||
$pri =~ s/error$/err/;
|
||||
print "<select name=fac>\n";
|
||||
foreach $f (split(/\s+/, $syslog::config{'facilities'})) {
|
||||
printf "<option %s>%s\n", $f eq $fac ? "selected" : "", $f;
|
||||
printf "<option %s>%s</option>\n", $f eq $fac ? "selected" : "", $f;
|
||||
}
|
||||
print "</select> $text{'config_pri'}\n";
|
||||
print "<select name=pri>\n";
|
||||
foreach $p (&syslog::list_priorities()) {
|
||||
printf "<option %s>%s\n", $p eq $pri ? "selected" : "", $p;
|
||||
printf "<option %s>%s</option>\n", $p eq $pri ? "selected" : "", $p;
|
||||
}
|
||||
print "</select></td> </tr>\n";
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ else {
|
||||
"value='$text{'index_up'}'>\n";
|
||||
print "<select name=conn>\n";
|
||||
foreach $s (@start) {
|
||||
printf "<option %s>%s\n",
|
||||
printf "<option %s>%s</option>\n",
|
||||
$config{'conn'} eq $s ? "selected"
|
||||
: "", $s;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ foreach $w ([ \@edit, "features", "all" ],
|
||||
printf "<select name=$w->[1] multiple size=%d>\n",
|
||||
scalar(@opts);
|
||||
foreach $o (@opts, 'apply', 'bootup') {
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$o, $can{$o} ? "selected" : "",
|
||||
$text{"acl_".$o} || $text{$o."_title"};
|
||||
}
|
||||
|
||||
@@ -155,14 +155,14 @@ print "<select name=pos>\n";
|
||||
foreach $br (@rules) {
|
||||
next if ($br eq $rule);
|
||||
if ($br->{'sep'}) {
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$br->{'index'},
|
||||
!$in{'new'} &&
|
||||
$rule->{'index'} == $br->{'index'}-1 ? "selected" : "",
|
||||
&text('rule_spos', $br->{'desc'});
|
||||
}
|
||||
else {
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$br->{'index'},
|
||||
!$in{'new'} &&
|
||||
$rule->{'index'} == $br->{'index'}-1 ? "selected" : "",
|
||||
@@ -171,7 +171,7 @@ foreach $br (@rules) {
|
||||
&group_name($br->{'dest'}));
|
||||
}
|
||||
}
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
-1, $in{'new'} || $rule eq $rules[$#rules] ? "selected" : "",
|
||||
$text{'rule_end'};
|
||||
print "</select></td> </tr>\n";
|
||||
|
||||
@@ -37,14 +37,14 @@ print "<select name=pos>\n";
|
||||
foreach $br (@rules) {
|
||||
next if ($br eq $rule);
|
||||
if ($br->{'sep'}) {
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$br->{'index'},
|
||||
!$in{'new'} &&
|
||||
$rule->{'index'} == $br->{'index'}-1 ? "selected" : "",
|
||||
&text('rule_spos', $br->{'desc'});
|
||||
}
|
||||
else {
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$br->{'index'},
|
||||
!$in{'new'} &&
|
||||
$rule->{'index'} == $br->{'index'}-1 ? "selected" : "",
|
||||
@@ -53,7 +53,7 @@ foreach $br (@rules) {
|
||||
&group_name($br->{'dest'}));
|
||||
}
|
||||
}
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
-1, $in{'new'} || $rule eq $rules[$#rules] ? "selected" : "",
|
||||
$text{'rule_end'};
|
||||
print "</select></td> </tr>\n";
|
||||
|
||||
@@ -58,7 +58,7 @@ printf "<input type=radio name=days_def value=0 %s> %s<br>\n",
|
||||
%days = map { $_, 1 } split(/,/, $time->{'days'});
|
||||
print "<select name=days size=7 multiple>\n";
|
||||
for($i=0; $i<7; $i++) {
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$i, $days{$i} ? "selected" : "", $text{'day_'.$i};
|
||||
}
|
||||
print "</select></td> </tr>\n";
|
||||
|
||||
@@ -72,7 +72,7 @@ print "<tr> <td valign=top nowrap><b>$text{'user_mods'}</b></td>\n";
|
||||
@mymods = grep { $acl{$base_remote_user,$_->{'dir'}} } &get_all_module_infos();
|
||||
print "<td><select name=mods size=5 multiple>\n";
|
||||
foreach $m (sort { $a->{'desc'} cmp $b->{'desc'} } @mymods) {
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$m->{'dir'}, $gotmods{$m->{'dir'}} ? "selected" : "",
|
||||
$m->{'desc'};
|
||||
}
|
||||
|
||||
@@ -332,13 +332,13 @@ return undef if (!@groups);
|
||||
local $rv = $_[3] ? "<select name=$_[0] size=5 multiple>"
|
||||
: "<select name=$_[0]>\n";
|
||||
if ($_[2]) {
|
||||
$rv .= sprintf "<option value='' %s>%s\n",
|
||||
$rv .= sprintf "<option value='' %s>%s</option>\n",
|
||||
$_[1] ? "" : "selected", $_[2] == 2 ? $text{'other'} : " ";
|
||||
}
|
||||
local $g;
|
||||
local %vals = map { $_, 1 } split(/\s+/, $_[1]);
|
||||
foreach $g (@groups) {
|
||||
$rv .= sprintf "<option value=%s %s>%s\n",
|
||||
$rv .= sprintf "<option value=%s %s>%s</option>\n",
|
||||
$g->{'name'}, $vals{$g->{'name'}} ? "selected" : "",
|
||||
$g->{'name'};
|
||||
}
|
||||
@@ -354,7 +354,7 @@ local %got = map { $_, 1 } split(/,/, $_[1]);
|
||||
local $rv = $_[3] ? "<select name=$_[0] size=5 multiple>"
|
||||
: "<select name=$_[0]>\n";
|
||||
if ($_[2]) {
|
||||
$rv .= sprintf "<option value='' %s>%s\n",
|
||||
$rv .= sprintf "<option value='' %s>%s</option>\n",
|
||||
$_[1] ? "" : "selected", $_[2] == 2 ? $text{'other'} : " ";
|
||||
}
|
||||
local $s;
|
||||
@@ -376,7 +376,7 @@ foreach $s (@servs) {
|
||||
$desc .= ", " if ($desc);
|
||||
$desc .= $s->{'others'}->[$i];
|
||||
}
|
||||
$rv .= sprintf "<option value=%s %s>%s%s\n",
|
||||
$rv .= sprintf "<option value=%s %s>%s%s</option>\n",
|
||||
$s->{'name'}, $got{$s->{'name'}} ? "selected" : "",
|
||||
$s->{'name'}, $_[4] ? "" : " ($desc)";
|
||||
}
|
||||
@@ -392,7 +392,7 @@ local $a;
|
||||
if ($_[2]) {
|
||||
$rv .= "<select name=$_[0]>\n";
|
||||
foreach $a (@actions) {
|
||||
$rv .= sprintf "<option value=%s %s>%s\n",
|
||||
$rv .= sprintf "<option value=%s %s>%s</option>\n",
|
||||
$a, $_[1] eq $a ? "selected" : "",
|
||||
$text{"rule_".$a};
|
||||
}
|
||||
@@ -422,10 +422,10 @@ local @protos = ( 'tcp', 'udp', 'icmp', 'ip' );
|
||||
#close(PROTOS);
|
||||
local $p;
|
||||
local $rv = "<select name=$_[0]>\n";
|
||||
$rv .= sprintf "<option value='' %s> \n",
|
||||
$rv .= sprintf "<option value='' %s> </option>\n",
|
||||
$_[1] eq '' ? "selected" : "";
|
||||
foreach $p (&unique(@protos)) {
|
||||
$rv .= sprintf "<option value='%s' %s>%s\n",
|
||||
$rv .= sprintf "<option value='%s' %s>%s</option>\n",
|
||||
$p, $_[1] eq $p && $p ? "selected" : "",
|
||||
uc($p) || "-------";
|
||||
}
|
||||
@@ -471,20 +471,20 @@ if (@ifaces) {
|
||||
local $rv = "<select name=$_[0]>\n";
|
||||
local ($i, $found);
|
||||
if ($_[4]) {
|
||||
$rv .= sprintf "<option value='' %s>%s\n",
|
||||
$rv .= sprintf "<option value='' %s>%s</option>\n",
|
||||
$_[1] eq "" ? "selected" : "", "<None>";
|
||||
$found++ if ($_[1] eq "");
|
||||
}
|
||||
foreach $i (@ifaces) {
|
||||
$rv .= sprintf "<option value=%s %s>%s\n",
|
||||
$rv .= sprintf "<option value=%s %s>%s</option>\n",
|
||||
$i, $_[1] eq $i ? "selected" : "", $i;
|
||||
$found++ if ($_[1] eq $i);
|
||||
}
|
||||
if ($_[3]) {
|
||||
$rv .= "<option value=$_[1] selected>$_[1]\n" if (!$found && $_[1]);
|
||||
$rv .= "<option value=$_[1] selected>$_[1]</option>\n" if (!$found && $_[1]);
|
||||
}
|
||||
else {
|
||||
$rv .= sprintf "<option value='' %s> %s\n",
|
||||
$rv .= sprintf "<option value='' %s>%s</option>\n",
|
||||
!$found && $_[1] ? "selected" : "", $text{'rule_oifc'};
|
||||
$rv .= "</select>\n";
|
||||
$rv .= sprintf "<input name=$_[0]_other size=6 value='%s'>\n",
|
||||
@@ -505,7 +505,7 @@ return undef if (!@times);
|
||||
local $rv = "<select name=$_[0]>\n";
|
||||
local $t;
|
||||
foreach $t (@times) {
|
||||
$rv .= sprintf "<option value=%s %s>%s\n",
|
||||
$rv .= sprintf "<option value=%s %s>%s</option>\n",
|
||||
$t->{'name'}, $t->{'name'} eq $_[1] ? "selected" : "",
|
||||
$t->{'name'};
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ printf "<input type=radio name=sched_def value=0 %s> %s\n",
|
||||
$job ? "checked" : "", $text{'backup_interval'};
|
||||
print "<select name=sched>\n";
|
||||
foreach $s ("hourly", "daily", "weekly", "monthly", "yearly") {
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$s, $job && $job->{'special'} eq $s ? "selected" : "",
|
||||
ucfirst($s);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ foreach $f (@search_fields) {
|
||||
print "<td><select name=${f}_mode>\n";
|
||||
if ($f eq "first" || $f eq "last") {
|
||||
foreach $m (0 .. 1) {
|
||||
printf "<option value=%d %s>%s\n",
|
||||
printf "<option value=%d %s>%s</option>\n",
|
||||
$m, $in{"${f}_mode"} == $m ? "selected" : "",
|
||||
$text{'report_mode'.$m.$f} ||
|
||||
$text{'report_mode'.$m};
|
||||
@@ -48,7 +48,7 @@ foreach $f (@search_fields) {
|
||||
}
|
||||
else {
|
||||
foreach $m (0 .. 2) {
|
||||
printf "<option value=%d %s>%s\n",
|
||||
printf "<option value=%d %s>%s</option>\n",
|
||||
$m, $in{"${f}_mode"} == $m ? "selected" : "",
|
||||
$text{'report_mode'.$m};
|
||||
}
|
||||
@@ -108,10 +108,10 @@ if (@searches) {
|
||||
print "<tr> <td></td> </tr>\n";
|
||||
print "<tr> <td><b>$text{'report_usesaved'}</b></td>\n";
|
||||
print "<td colspan=3><select name=save_name>\n";
|
||||
printf "<option value='' %s>%s\n",
|
||||
printf "<option value='' %s>%s</option>\n",
|
||||
$in{'save_name'} eq "" ? "selected" : "", " ";
|
||||
foreach $s ( @searches) {
|
||||
printf "<option value='%s' %s>%s\n",
|
||||
printf "<option value='%s' %s>%s</option>\n",
|
||||
$s->{'save_name'},
|
||||
$in{'save_name'} eq $s->{'save_name'} ? "selected" : "",
|
||||
$s->{'save_name'};
|
||||
@@ -274,7 +274,7 @@ print "<input name=$_[3]_day size=2 value='$_[0]'>";
|
||||
print "/<select name=$_[3]_month>\n";
|
||||
local $m;
|
||||
foreach $m (1..12) {
|
||||
printf "<option value=%d %s>%s\n",
|
||||
printf "<option value=%d %s>%s</option>\n",
|
||||
$m, $_[1] eq $m ? 'selected' : '', $text{"smonth_$m"};
|
||||
}
|
||||
print "</select>";
|
||||
|
||||
@@ -53,7 +53,7 @@ $rv .= "<td colspan=3><select name=rule>\n";
|
||||
local $r;
|
||||
foreach $r (&list_rules()) {
|
||||
if ($r->{'log'}) {
|
||||
$rv .= sprintf "<option value=%s %s>%s\n",
|
||||
$rv .= sprintf "<option value=%s %s>%s</option>\n",
|
||||
$r->{'num'},
|
||||
$_[1]->{'rule'} == $r->{'num'} ? "selected" : "",
|
||||
&text('monitor_num', $r->{'num'},
|
||||
|
||||
@@ -44,15 +44,15 @@ for($i=0; $i<@karma_presets; $i++) {
|
||||
|
||||
print "<tr> <td valign=top><b>$text{'karma_mode'}</b></td>\n";
|
||||
print "<td><select name=mode>\n";
|
||||
printf "<option value=-1 %s> %s\n",
|
||||
printf "<option value=-1 %s>%s</option>\n",
|
||||
$mode == -1 ? "selected" : "", $text{'karma_none'};
|
||||
printf "<option value=0 %s> %s\n",
|
||||
printf "<option value=0 %s>%s</option>\n",
|
||||
$mode == 0 ? "selected" : "", $text{'karma_low'};
|
||||
printf "<option value=1 %s> %s\n",
|
||||
printf "<option value=1 %s>%s</option>\n",
|
||||
$mode == 1 ? "selected" : "", $text{'karma_medium'};
|
||||
printf "<option value=2 %s> %s\n",
|
||||
printf "<option value=2 %s>%s</option>\n",
|
||||
$mode == 2 ? "selected" : "", $text{'karma_high'};
|
||||
printf "<option value=3 %s> %s\n",
|
||||
printf "<option value=3 %s>%s</option>\n",
|
||||
$mode == 3 ? "selected" : "", $text{'karma_sel'};
|
||||
print "</select><br><table width=100%>\n";
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ print "<select name=default>\n";
|
||||
foreach $i (@images) {
|
||||
$l = &find_value("label", $i->{'members'});
|
||||
if ($l) {
|
||||
printf "<option %s>$l\n",
|
||||
printf "<option %s>$l</option>\n",
|
||||
$default eq $l ? "selected" : "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,26 +70,26 @@ printf "<input name=initrd size=30 value='%s'> %s</td> </tr>\n",
|
||||
$readonly = &find("read-only", $members);
|
||||
$readwrite = &find("read-write", $members);
|
||||
print "<tr> <td><b>$text{'image_mode'}</b></td> <td><select name=ro>\n";
|
||||
printf "<option value=0 %s>$text{'image_fromkern'}\n",
|
||||
printf "<option value=0 %s>$text{'image_fromkern'}</option>\n",
|
||||
$readonly || $readwrite ? "" : "selected";
|
||||
printf "<option value=1 %s>$text{'image_ro'}\n",
|
||||
printf "<option value=1 %s>$text{'image_ro'}</option>\n",
|
||||
$readonly ? "selected" : "";
|
||||
printf "<option value=2 %s>$text{'image_rw'}\n",
|
||||
printf "<option value=2 %s>$text{'image_rw'}</option>\n",
|
||||
$readwrite ? "selected" : "";
|
||||
print "</select></td>\n";
|
||||
|
||||
$vga = lc(&find_value("vga", $members));
|
||||
print "<td><b>$text{'image_vga'}</b></td>\n";
|
||||
print "<td><select name=vga>\n";
|
||||
printf "<option value='' %s>$text{'image_fromkern'}\n",
|
||||
printf "<option value='' %s>$text{'image_fromkern'}</option>\n",
|
||||
$vga ? "" : "selected";
|
||||
printf "<option value=normal %s>80x25\n",
|
||||
printf "<option value=normal %s>80x25</option>\n",
|
||||
$vga eq "normal" ? "selected" : "";
|
||||
printf "<option value=ext %s>80x50\n",
|
||||
printf "<option value=ext %s>80x50</option>\n",
|
||||
$vga eq "ext" || $vga eq "extended" ? "selected" : "";
|
||||
printf "<option value=ask %s>$text{'image_ask'}\n",
|
||||
printf "<option value=ask %s>$text{'image_ask'}</option>\n",
|
||||
$vga eq "ask" ? "selected" : "";
|
||||
printf "<option value=other %s>$text{'image_other'}\n",
|
||||
printf "<option value=other %s>$text{'image_other'}</option>\n",
|
||||
$vga =~ /\d/ ? "selected" : "";
|
||||
printf "</select><input name=vgaother size=6 value='%s'></td> </tr>\n",
|
||||
$vga =~ /\d/ ? $vga : "";
|
||||
|
||||
@@ -17,7 +17,7 @@ local ($p, %pcan);
|
||||
map { $pcan{$_}++ } split(/\s+/, $_[0]->{'printers'});
|
||||
foreach $p (@plist) {
|
||||
local $prn = &get_printer($p);
|
||||
printf "<option value=%s %s>%s (%s)\n",
|
||||
printf "<option value=%s %s>%s (%s)</option>\n",
|
||||
$p, $pcan{$p} ? 'selected' : '',
|
||||
$prn->{'desc'}, $p;
|
||||
}
|
||||
@@ -34,7 +34,7 @@ print "<select name=jobs multiple size=4 width=15>\n";
|
||||
map { $jcan{$_}++ } split(/\s+/, $_[0]->{'jobs'});
|
||||
foreach $p (@plist) {
|
||||
local $prn = &get_printer($p);
|
||||
printf "<option value=%s %s>%s (%s)\n",
|
||||
printf "<option value=%s %s>%s (%s)</option>\n",
|
||||
$p, $jcan{$p} ? 'selected' : '',
|
||||
$prn->{'desc'}, $p;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ if (@addservers) {
|
||||
print "<select name=server>\n";
|
||||
foreach $s (@addservers) {
|
||||
print "<option value=$s->{'id'}>",
|
||||
$s->{'desc'} ? $s->{'desc'} : $s->{'host'},"\n";
|
||||
$s->{'desc'} ? $s->{'desc'} : $s->{'host'},"</option>\n";
|
||||
}
|
||||
print "</select></td>\n";
|
||||
}
|
||||
@@ -56,7 +56,7 @@ if (@groups) {
|
||||
"value='$text{'cluster_gadd'}'>\n";
|
||||
print "<select name=group>\n";
|
||||
foreach $g (@groups) {
|
||||
print "<option>$g->{'name'}\n";
|
||||
print "<option>$g->{'name'}</option>\n";
|
||||
}
|
||||
print "</select></td>\n";
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ opendir(DIR, $config{'model_path'});
|
||||
while($f = readdir(DIR)) {
|
||||
if ($f =~ /^\./) { next; }
|
||||
$path = "$config{'model_path'}/$f";
|
||||
printf "<option value=\"$path\" %s>$f\n",
|
||||
printf "<option value=\"$path\" %s>$f</option>\n",
|
||||
$path eq $prn{'iface'} ? "selected" : "";
|
||||
}
|
||||
closedir(DIR);
|
||||
@@ -73,17 +73,17 @@ if (&has_ghostscript()) {
|
||||
print "<select name=driver size=7>\n";
|
||||
foreach $d (&list_webmin_drivers()) {
|
||||
if ($drvsupp{$d->[0]}) {
|
||||
printf "<option %s>%s\n",
|
||||
printf "<option %s>%s</option>\n",
|
||||
$d->[1] eq $drv->{'type'} ? "selected" : "",
|
||||
$d->[1];
|
||||
}
|
||||
}
|
||||
print "</select> ";
|
||||
print "<select name=dpi size=7>\n";
|
||||
printf "<option value=\"\" %s>Default\n",
|
||||
printf "<option value=\"\" %s>Default</option>\n",
|
||||
$drv->{'dpi'} ? "" : "selected";
|
||||
foreach $d (75, 100, 150, 200, 300, 600) {
|
||||
printf "<option value=\"$d\" %s>$d DPI\n",
|
||||
printf "<option value=\"$d\" %s>$d DPI</option>\n",
|
||||
$drv->{'dpi'} == $d ? "selected" : "";
|
||||
}
|
||||
print "</select></td> </tr>\n";
|
||||
|
||||
@@ -258,7 +258,7 @@ foreach $r (@rhs) {
|
||||
$drv->{'rhsname'} eq $r->{'name'});
|
||||
}
|
||||
}
|
||||
printf "<option value='%s' %s>%s\n",
|
||||
printf "<option value='%s' %s>%s</option>\n",
|
||||
$r->{'name'}.";".join(";", @res),
|
||||
$drv->{'rhsname'} eq $r->{'name'} ? 'selected' : '',
|
||||
$r->{'desc'};
|
||||
@@ -274,7 +274,7 @@ printf "<input type=radio name=eof value=no %s> $text{'no'}</td>\n",
|
||||
|
||||
print "<td><b>$text{'redhat_paper'}</b></td> <td><select name=paper>\n";
|
||||
foreach $p (sort { $a cmp $b } keys %paper_sizes) {
|
||||
printf "<option value='%s' %s>%s\n",
|
||||
printf "<option value='%s' %s>%s</option>\n",
|
||||
$p, $drv->{'paper'} eq $p ? 'selected' : '',
|
||||
$paper_sizes{$p};
|
||||
}
|
||||
@@ -283,7 +283,7 @@ print "</select></td> </tr>\n";
|
||||
print "<tr> <td><b>$text{'redhat_pages'}</b></td>\n";
|
||||
print "<td><select name=nup>\n";
|
||||
foreach $p (1, 2, 4, 8) {
|
||||
printf "<option %s>%s\n",
|
||||
printf "<option %s>%s</option>\n",
|
||||
$drv->{'nup'} == $p ? 'selected' : '', $p;
|
||||
}
|
||||
print "</select></td>\n";
|
||||
|
||||
@@ -193,12 +193,12 @@ if ($drv->{'mode'} == 2 || 1) {
|
||||
|
||||
print "<tr> <td valign=top><b>$text{'suse_printer'}</b></td>\n";
|
||||
print "<td colspan=3><select size=10 name=device>\n";
|
||||
printf "<option value=ps %s>Postscript\n",
|
||||
printf "<option value=ps %s>Postscript</option>\n",
|
||||
$drv->{'device'} =~ /^PS_/ ? 'selected' : '';
|
||||
$found++ if ($drv->{'device'} =~ /^PS_/);
|
||||
foreach $d (&list_uniprint()) {
|
||||
local $u = "$d->[0].upp";
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$u, $drv->{'device'} eq $u ? 'selected' : '', $d->[1];
|
||||
$found++ if ($drv->{'device'} eq $u);
|
||||
}
|
||||
@@ -206,13 +206,13 @@ if ($drv->{'mode'} == 2 || 1) {
|
||||
$out =~ /Available devices:\n((\s+.*\n)+)/i;
|
||||
foreach $d (split(/\s+/, $1)) {
|
||||
if ($driver{$d}) {
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$d, $drv->{'device'} eq $d ? 'selected' : '',
|
||||
$driver{$d};
|
||||
$found++ if ($drv->{'device'} eq $d);
|
||||
}
|
||||
}
|
||||
print "<option selected value=$drv->{'device'}>$drv->{'device'}\n"
|
||||
print "<option selected value=$drv->{'device'}>$drv->{'device'}</option>\n"
|
||||
if (!$found && $drv->{'device'});
|
||||
print "</select></td> </tr>\n";
|
||||
|
||||
@@ -228,7 +228,7 @@ if ($drv->{'mode'} == 2 || 1) {
|
||||
print "<tr> <td><b>$text{'suse_paper'}</b></td>\n";
|
||||
print "<td><select name=paper>\n";
|
||||
foreach $p (@paper_sizes) {
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$p->[0], $drv->{'paper'} eq $p->[0] ? 'selected' : '',
|
||||
$p->[1];
|
||||
}
|
||||
@@ -252,14 +252,14 @@ else {
|
||||
|
||||
print "<tr> <td valign=top><b>$text{'suse_printer'}</b></td>\n";
|
||||
print "<td colspan=3><select size=10 name=device>\n";
|
||||
printf "<option value=ps %s>Postscript\n",
|
||||
printf "<option value=ps %s>Postscript</option>\n",
|
||||
$drv->{'device'} eq 'PS' ? 'selected' : '';
|
||||
$found++ if ($drv->{'device'} eq 'PS');
|
||||
local $out = &backquote_command("$config{'gs_path'} -help 2>&1", 1);
|
||||
$out =~ /Available devices:\n((\s+.*\n)+)/i;
|
||||
foreach $d (split(/\s+/, $1)) {
|
||||
if ($d ne 'stp' && $driver{$d}) {
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$d, $drv->{'device'} eq $d ? 'selected' : '',
|
||||
$driver{$d};
|
||||
$found++ if ($drv->{'device'} eq $d);
|
||||
@@ -267,18 +267,18 @@ else {
|
||||
}
|
||||
foreach $d (&list_uniprint()) {
|
||||
local $u = "$d->[0].upp";
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$u, $drv->{'device'} eq $u ? 'selected' : '', $d->[1];
|
||||
$found++ if ($drv->{'device'} eq $u);
|
||||
}
|
||||
foreach $s (sort { $a cmp $b } keys %stp) {
|
||||
printf "<option value=%s.stp %s>%s\n",
|
||||
printf "<option value=%s.stp %s>%s</option>\n",
|
||||
$s, $drv->{'device'} eq 'stp' &&
|
||||
$drv->{'model'} eq $s ? 'selected' : '', $stp{$s};
|
||||
$found++ if ($drv->{'device'} eq 'stp' &&
|
||||
$drv->{'model'} eq $s);
|
||||
}
|
||||
print "<option selected value=$drv->{'device'}>$drv->{'device'}\n"
|
||||
print "<option selected value=$drv->{'device'}>$drv->{'device'}</option>\n"
|
||||
if (!$found && $drv->{'device'});
|
||||
print "</select></td> </tr>\n";
|
||||
|
||||
@@ -291,7 +291,7 @@ else {
|
||||
print "<td><b>$text{'suse_paper'}</b></td>\n";
|
||||
print "<td><select name=paper>\n";
|
||||
foreach $p (@paper_sizes) {
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$p->[0], $drv->{'paper'} eq $p->[0] ? 'selected' : '',
|
||||
$p->[1];
|
||||
}
|
||||
@@ -307,7 +307,7 @@ else {
|
||||
print "<td><b>$text{'suse_method'}</b></td>\n";
|
||||
print "<td><select name=method>\n";
|
||||
foreach $m ('auto', 'ascii', 'raw') {
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$m, $drv->{'method'} eq $m ? 'selected' : '',
|
||||
$text{"suse_$m"};
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ elsif ($type eq "time") {
|
||||
'A', $text{'acl_dsat'} );
|
||||
print "<select name=day multiple size=7>\n";
|
||||
foreach $d ('S', 'M', 'T', 'W', 'H', 'F', 'A') {
|
||||
printf "<option value=$d %s> $day_name{$d}\n",
|
||||
printf "<option value=$d %s>$day_name{$d}</option>\n",
|
||||
$day{$d} ? "selected" : "";
|
||||
}
|
||||
print "</select></td> </tr>\n";
|
||||
@@ -320,7 +320,7 @@ elsif ($type eq "external") {
|
||||
print "<tr> <td valign=top><b>$text{'acl_extclass'}</b></td>\n";
|
||||
print "<td><select name=class>\n";
|
||||
foreach $c (&find_config("external_acl_type", $conf)) {
|
||||
printf "<option %s>%s\n",
|
||||
printf "<option %s>%s</option>\n",
|
||||
$c->{'values'}->[0] eq $vals[0] ? "selected" : "",
|
||||
$c->{'values'}->[0];
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ sub acl_security_form
|
||||
print "<tr> <td valign=top><b>$text{'acl_sections'}</b></td>\n";
|
||||
print "<td colspan=3><select name=sections multiple size=6>\n";
|
||||
foreach $s (@accopts) {
|
||||
printf "<option value=%s %s>%s\n",
|
||||
printf "<option value=%s %s>%s</option>\n",
|
||||
$s, $_[0]->{$s} ? 'selected' : '', $text{"index_${s}"};
|
||||
}
|
||||
print "</select></td> </tr>\n";
|
||||
|
||||
@@ -39,7 +39,7 @@ $r = @acls; $r = 10 if ($r > 10);
|
||||
print "<tr> <td valign=top><b>$text{'ahttp_ma'}</b></td>\n";
|
||||
print "<td valign=top><select name=yes multiple size=$r width=100>\n";
|
||||
foreach $a (@acls) {
|
||||
printf "<option %s>%s\n",
|
||||
printf "<option %s>%s</option>\n",
|
||||
$match{$a->{'values'}->[0]} ? "selected" : "",
|
||||
$a->{'values'}->[0];
|
||||
}
|
||||
@@ -48,7 +48,7 @@ print "</select></td>\n";
|
||||
print "<td valign=top><b>$text{'ahttp_dma'}</b></td>\n";
|
||||
print "<td valign=top><select name=no multiple size=$r width=100>\n";
|
||||
foreach $a (@acls) {
|
||||
printf "<option %s>%s\n",
|
||||
printf "<option %s>%s</option>\n",
|
||||
$match{"!$a->{'values'}->[0]"} ? "selected" : "",
|
||||
$a->{'values'}->[0];
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ print "<form action=acl.cgi>\n";
|
||||
print "<input type=submit value=\"$text{'eacl_buttcreate'}\">\n";
|
||||
print "<select name=type>\n";
|
||||
foreach $t (sort { $acl_types{$a} cmp $acl_types{$b} } keys %acl_types) {
|
||||
print "<option value=$t>$acl_types{$t}\n";
|
||||
print "<option value=$t>$acl_types{$t}</option>\n";
|
||||
}
|
||||
print "</select></form>\n";
|
||||
print &ui_tabs_end_tab();
|
||||
|
||||
@@ -40,13 +40,13 @@ for($i=0; $i<=@dirs; $i++) {
|
||||
print "<td><input name=cache_dir_$i size=30 ",
|
||||
"value=\"$dv[1]\"></td>\n";
|
||||
print "<td><select name=cache_type_$i>\n";
|
||||
printf "<option value=ufs %s>$text{'ec_u'}\n",
|
||||
printf "<option value=ufs %s>$text{'ec_u'}</option>\n",
|
||||
$dv[0] eq 'ufs' ? 'selected' : '';
|
||||
printf "<option value=diskd %s>$text{'ec_diskd'}\n",
|
||||
printf "<option value=diskd %s>$text{'ec_diskd'}</option>\n",
|
||||
$dv[0] eq 'diskd' ? 'selected' : '';
|
||||
printf "<option value=aufs %s>$text{'ec_ua'}\n",
|
||||
printf "<option value=aufs %s>$text{'ec_ua'}</option>\n",
|
||||
$dv[0] eq 'aufs' ? 'selected' : '';
|
||||
printf "<option value=coss %s>$text{'ec_coss'}\n",
|
||||
printf "<option value=coss %s>$text{'ec_coss'}</option>\n",
|
||||
$dv[0] eq 'coss' ? 'selected' : '';
|
||||
print "</select></td>\n";
|
||||
print "<td><input name=cache_size_$i size=8 ",
|
||||
@@ -62,9 +62,9 @@ for($i=0; $i<=@dirs; $i++) {
|
||||
print "<td><input name=cache_dir_$i size=30 ",
|
||||
"value=\"$dv[1]\"></td>\n";
|
||||
print "<td><select name=cache_type_$i>\n";
|
||||
printf "<option value=ufs %s>$text{'ec_u'}\n",
|
||||
printf "<option value=ufs %s>$text{'ec_u'}</option>\n",
|
||||
$dv[0] eq 'ufs' ? 'selected' : '';
|
||||
printf "<option value=asyncufs %s>$text{'ec_ua'}\n",
|
||||
printf "<option value=asyncufs %s>$text{'ec_ua'}</option>\n",
|
||||
$dv[0] eq 'asyncufs' ? 'selected' : '';
|
||||
print "</select></td>\n";
|
||||
print "<td><input name=cache_size_$i size=8 ",
|
||||
|
||||
@@ -36,7 +36,7 @@ print "<td><input name=host size=20 value=\"$ch[0]\"></td>\n";
|
||||
print "<td><b>$text{'ech_t'}</b></td>\n";
|
||||
print "<td><select name=type>\n";
|
||||
foreach $t (keys %ts) {
|
||||
printf "<option value=$t %s>$ts{$t}\n", $t eq $ch[1] ? "selected" : "";
|
||||
printf "<option value=$t %s>$ts{$t}</option>\n", $t eq $ch[1] ? "selected" : "";
|
||||
}
|
||||
print "</select></td> </tr>\n";
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ $r = @acls; $r = 10 if ($r > 10);
|
||||
print "<tr> <td valign=top><b>$text{'ahttp_ma'}</b></td>\n";
|
||||
print "<td valign=top><select name=yes multiple size=$r width=100>\n";
|
||||
foreach $a (@acls) {
|
||||
printf "<option %s>%s\n",
|
||||
printf "<option %s>%s</option>\n",
|
||||
$match{$a->{'values'}->[0]} ? "selected" : "",
|
||||
$a->{'values'}->[0];
|
||||
}
|
||||
@@ -53,7 +53,7 @@ print "</select></td>\n";
|
||||
print "<td valign=top><b>$text{'ahttp_dma'}</b></td>\n";
|
||||
print "<td valign=top><select name=no multiple size=$r width=100>\n";
|
||||
foreach $a (@acls) {
|
||||
printf "<option %s>%s\n",
|
||||
printf "<option %s>%s</option>\n",
|
||||
$match{"!$a->{'values'}->[0]"} ? "selected" : "",
|
||||
$a->{'values'}->[0];
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ $cls = $pool->{'values'}->[1] || 1;
|
||||
print "<tr> <td><b>$text{'pool_class'}</b></td>\n";
|
||||
print "<td><select name=class>\n";
|
||||
foreach $c (1 .. ($squid_version >= 3 ? 5 : 3)) {
|
||||
printf "<option value=%s %s>%s - %s\n",
|
||||
printf "<option value=%s %s>%s - %s</option>\n",
|
||||
$c, $cls == $c ? "selected" : "",
|
||||
$c, $text{"delay_class_$c"};
|
||||
}
|
||||
@@ -169,7 +169,7 @@ $rv .= sprintf "<input name=%s_n size=8 value='%s'>\n",
|
||||
$_[0], $_[1] > 0 ? $_[1]/$ud[$u] : $_[1];
|
||||
$rv .= "<select name=$_[0]_u>\n";
|
||||
for($i=0; $i<@ud; $i++) {
|
||||
$rv .= sprintf "<option value=%s %s>%s\n",
|
||||
$rv .= sprintf "<option value=%s %s>%s</option>\n",
|
||||
$i, $i == $u ? "selected" : "", $text{'pool_unit'.$i};
|
||||
}
|
||||
$rv .= "</select>\n";
|
||||
|
||||
@@ -70,11 +70,11 @@ for($i=0; $i<=@dirs; $i++) {
|
||||
print "<td><input name=cache_dir_$i size=30 ",
|
||||
"value=\"$dv[1]\"></td>\n";
|
||||
print "<td><select name=cache_type_$i>\n";
|
||||
printf "<option value=ufs %s>$text{'ec_u'}\n",
|
||||
printf "<option value=ufs %s>$text{'ec_u'}</option>\n",
|
||||
$dv[0] eq 'ufs' ? 'selected' : '';
|
||||
printf "<option value=diskd %s>$text{'ec_diskd'}\n",
|
||||
printf "<option value=diskd %s>$text{'ec_diskd'}</option>\n",
|
||||
$dv[0] eq 'diskd' ? 'selected' : '';
|
||||
printf "<option value=aufs %s>$text{'ec_ua'}\n",
|
||||
printf "<option value=aufs %s>$text{'ec_ua'}</option>\n",
|
||||
$dv[0] eq 'aufs' ? 'selected' : '';
|
||||
print "</select></td>\n";
|
||||
print "<td><input name=cache_size_$i size=8 ",
|
||||
@@ -90,9 +90,9 @@ for($i=0; $i<=@dirs; $i++) {
|
||||
print "<td><input name=cache_dir_$i size=30 ",
|
||||
"value=\"$dv[1]\"></td>\n";
|
||||
print "<td><select name=cache_type_$i>\n";
|
||||
printf "<option value=ufs %s>$text{'ec_u'}\n",
|
||||
printf "<option value=ufs %s>$text{'ec_u'}</option>\n",
|
||||
$dv[0] eq 'ufs' ? 'selected' : '';
|
||||
printf "<option value=asyncufs %s>$text{'ec_ua'}\n",
|
||||
printf "<option value=asyncufs %s>$text{'ec_ua'}</option>\n",
|
||||
$dv[0] eq 'asyncufs' ? 'selected' : '';
|
||||
print "</select></td>\n";
|
||||
print "<td><input name=cache_size_$i size=8 ",
|
||||
|
||||
@@ -39,7 +39,7 @@ $r = @acls; $r = 10 if ($r > 10);
|
||||
print "<tr> <td valign=top><b>$text{'ahttp_ma'}</b></td>\n";
|
||||
print "<td valign=top><select name=yes multiple size=$r width=100>\n";
|
||||
foreach $a (@acls) {
|
||||
printf "<option %s>%s\n",
|
||||
printf "<option %s>%s</option>\n",
|
||||
$match{$a->{'values'}->[0]} ? "selected" : "",
|
||||
$a->{'values'}->[0];
|
||||
}
|
||||
@@ -48,7 +48,7 @@ print "</select></td>\n";
|
||||
print "<td valign=top><b>$text{'ahttp_dma'}</b></td>\n";
|
||||
print "<td valign=top><select name=no multiple size=$r width=100>\n";
|
||||
foreach $a (@acls) {
|
||||
printf "<option %s>%s\n",
|
||||
printf "<option %s>%s</option>\n",
|
||||
$match{"!$a->{'values'}->[0]"} ? "selected" : "",
|
||||
$a->{'values'}->[0];
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ $r = @acls; $r = 10 if ($r > 10);
|
||||
print "<tr> <td valign=top><b>$text{'ahttp_ma'}</b></td>\n";
|
||||
print "<td valign=top><select name=yes multiple size=$r width=100>\n";
|
||||
foreach $a (@acls) {
|
||||
printf "<option %s>%s\n",
|
||||
printf "<option %s>%s</option>\n",
|
||||
$match{$a->{'values'}->[0]} ? "selected" : "",
|
||||
$a->{'values'}->[0];
|
||||
}
|
||||
@@ -48,7 +48,7 @@ print "</select></td>\n";
|
||||
print "<td valign=top><b>$text{'ahttp_dma'}</b></td>\n";
|
||||
print "<td valign=top><select name=no multiple size=$r width=100>\n";
|
||||
foreach $a (@acls) {
|
||||
printf "<option %s>%s\n",
|
||||
printf "<option %s>%s</option>\n",
|
||||
$match{"!$a->{'values'}->[0]"} ? "selected" : "",
|
||||
$a->{'values'}->[0];
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ $r = @acls; $r = 10 if ($r > 10);
|
||||
print "<tr> <td valign=top><b>$text{'aicp_ma'}</b></td>\n";
|
||||
print "<td><select name=yes multiple rows=$r width=100>\n";
|
||||
foreach $a (@acls) {
|
||||
printf "<option %s>%s\n",
|
||||
printf "<option %s>%s</option>\n",
|
||||
$match{$a->{'values'}->[0]} ? "selected" : "",
|
||||
$a->{'values'}->[0];
|
||||
}
|
||||
@@ -48,7 +48,7 @@ print "</select></td>\n";
|
||||
print "<td valign=top><b>$text{'aicp_dma'}</b></td>\n";
|
||||
print "<td><select name=no multiple rows=$r width=100>\n";
|
||||
foreach $a (@acls) {
|
||||
printf "<option %s>%s\n",
|
||||
printf "<option %s>%s</option>\n",
|
||||
$match{"!$a->{'values'}->[0]"} ? "selected" : "",
|
||||
$a->{'values'}->[0];
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ $r = @acls; $r = 10 if ($r > 10);
|
||||
print "<tr> <td valign=top><b>$text{'ahttp_ma'}</b></td>\n";
|
||||
print "<td valign=top><select name=yes multiple size=$r width=100>\n";
|
||||
foreach $a (@acls) {
|
||||
printf "<option %s>%s\n",
|
||||
printf "<option %s>%s</option>\n",
|
||||
$match{$a->{'values'}->[0]} ? "selected" : "",
|
||||
$a->{'values'}->[0];
|
||||
}
|
||||
@@ -48,7 +48,7 @@ print "</select></td>\n";
|
||||
print "<td valign=top><b>$text{'ahttp_dma'}</b></td>\n";
|
||||
print "<td valign=top><select name=no multiple size=$r width=100>\n";
|
||||
foreach $a (@acls) {
|
||||
printf "<option %s>%s\n",
|
||||
printf "<option %s>%s</option>\n",
|
||||
$match{"!$a->{'values'}->[0]"} ? "selected" : "",
|
||||
$a->{'values'}->[0];
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ $r = @acls; $r = 10 if ($r > 10);
|
||||
print "<tr> <td valign=top><b>$text{'ahttp_ma'}</b></td>\n";
|
||||
print "<td valign=top><select name=yes multiple size=$r width=100>\n";
|
||||
foreach $a (@acls) {
|
||||
printf "<option %s>%s\n",
|
||||
printf "<option %s>%s</option>\n",
|
||||
$match{$a->{'values'}->[0]} ? "selected" : "",
|
||||
$a->{'values'}->[0];
|
||||
}
|
||||
@@ -49,7 +49,7 @@ print "</select></td>\n";
|
||||
print "<td valign=top><b>$text{'ahttp_dma'}</b></td>\n";
|
||||
print "<td valign=top><select name=no multiple size=$r width=100>\n";
|
||||
foreach $a (@acls) {
|
||||
printf "<option %s>%s\n",
|
||||
printf "<option %s>%s</option>\n",
|
||||
$match{"!$a->{'values'}->[0]"} ? "selected" : "",
|
||||
$a->{'values'}->[0];
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ $vv = $v ? $v->{'value'} : $_[3];
|
||||
$rv = "<td><b>$_[0]</b></td> <td valign=top><select name=$_[1]>";
|
||||
for($i=4; $i<@_; $i+=2) {
|
||||
$rv .= "<option value=\"".$_[$i+1]."\" ".
|
||||
($vv eq $_[$i+1] ? "selected" : "")."> $_[$i]\n";
|
||||
($vv eq $_[$i+1] ? "selected" : "").">$_[$i]</option>\n";
|
||||
}
|
||||
return $rv."</select></td>\n";
|
||||
}
|
||||
@@ -205,7 +205,7 @@ local ($rv, %ts);
|
||||
$rv .= sprintf "<input name=$_[0] size=$_[1] value=\"%s\">\n", $_[2];
|
||||
$rv .= "<select name=$_[0]_u>\n";
|
||||
foreach $u (keys %ts) {
|
||||
$rv .= sprintf "<option value=$u %s>$ts{$u}\n",
|
||||
$rv .= sprintf "<option value=$u %s>$ts{$u}</option>\n",
|
||||
$_[3] =~ /^$u/ ? "selected" : "";
|
||||
}
|
||||
$rv .= "</select>\n";
|
||||
@@ -253,10 +253,10 @@ $rv .= sprintf "<input name=$_[1] size=$_[4] value=\"%s\">\n",
|
||||
$v ? $v->{'values'}->[0] : "";
|
||||
$rv .= "<select name=$_[1]_u>\n";
|
||||
foreach $u (@ss) {
|
||||
$rv .= sprintf "<option value=$u->[0] %s>$u->[1]\n",
|
||||
$rv .= sprintf "<option value=$u->[0] %s>$u->[1]</option>\n",
|
||||
$v && $v->{'values'}->[1] eq $u->[0] ? "selected" : "";
|
||||
}
|
||||
$rv .= sprintf "<option value='' %s>bytes\n",
|
||||
$rv .= sprintf "<option value='' %s>bytes</option>\n",
|
||||
$v && $v->{'values'}->[1] eq "" ? "selected" : "";
|
||||
$rv .= "</select></td>\n";
|
||||
return $rv;
|
||||
|
||||
@@ -1132,11 +1132,14 @@ if ($label =~ /^([^<]*)(<[\000-\377]*)$/) {
|
||||
$label = $1;
|
||||
$after = $2;
|
||||
}
|
||||
return "<input class='ui_radio' type=radio name=\""."e_escape($name)."\" ".
|
||||
my $ret = "<input class='ui_radio' type=radio name=\""."e_escape($name)."\" ".
|
||||
"value=\""."e_escape($value)."\" ".
|
||||
($sel ? " checked" : "").($dis ? " disabled=true" : "").
|
||||
" id=\"$id\"".
|
||||
" $tags> <label for=\"$id\">$label</label>$after\n";
|
||||
" $tags>";
|
||||
$ret .= "<label for=\"$id\">$label</label>" if ($label ne '');
|
||||
$ret .= "$after\n";
|
||||
return $ret;
|
||||
}
|
||||
|
||||
=head2 ui_textarea(name, value, rows, cols, [wrap], [disabled?], [tags])
|
||||
|
||||
Reference in New Issue
Block a user