Handle hostnames with upper-case letters
[webmin.git] / pap / acl_security.pl
1
2 require 'pap-lib.pl';
3
4 # acl_security_form(&options)
5 # Output HTML for editing security options for the pap module
6 sub acl_security_form
7 {
8 print "<tr> <td valign=top><b>$text{'acl_pages'}</b></td> <td colspan=3>\n";
9 foreach $a ('mgetty', 'options', 'dialin', 'secrets', 'sync') {
10         print "&nbsp;&nbsp;\n" if ($a eq 'sync');
11         printf "<input type=checkbox name=%s value=1 %s> %s<br>\n",
12                 $a, $_[0]->{$a} ? "checked" : "", $text{$a."_title"};
13         }
14 print "</td> </tr>\n";
15
16 print "<tr> <td><b>$text{'acl_direct'}</b></td>\n";
17 printf "<td><input type=radio name=direct value=1 %s> %s\n",
18         $_[0]->{'direct'} ? "checked" : "", $text{'yes'};
19 printf "<input type=radio name=direct value=0 %s> %s</td> </tr>\n",
20         $_[0]->{'direct'} ? "" : "checked", $text{'no'};
21 }
22
23 # acl_security_save(&options)
24 # Parse the form for security options for the squid module
25 sub acl_security_save
26 {
27 foreach $a ('mgetty', 'options', 'dialin', 'secrets', 'sync') {
28         $_[0]->{$a} = $in{$a};
29         }
30 $_[0]->{'direct'} = $in{'direct'};
31 }
32