Handle hostnames with upper-case letters
[webmin.git] / init / acl_security.pl
1
2 require 'init-lib.pl';
3
4 # acl_security_form(&options)
5 # Output HTML for editing security options for the init module
6 sub acl_security_form
7 {
8 if ($config{'local_script'}) {
9         print "<tr> <td><b>$text{'acl_script'}</b></td> <td colspan=3>\n";
10         }
11 else {
12         print "<tr> <td><b>$text{'acl_actions'}</b></td> <td colspan=3>\n";
13         }
14 printf "<input type=radio name=bootup value=1 %s> $text{'yes'}\n",
15         $_[0]->{'bootup'} == 1 ? "checked" : "";
16 if (!$config{'local_script'}) {
17         printf "<input type=radio name=bootup value=2 %s> $text{'acl_runonly'}\n",
18                 $_[0]->{'bootup'} == 2 ? "checked" : "";
19         }
20 printf "<input type=radio name=bootup value=0 %s> $text{'no'}</td> </tr>\n",
21         $_[0]->{'bootup'} == 0 ? "checked" : "";
22
23 print "<tr> <td><b>$text{'acl_reboot'}</b></td> <td>\n";
24 printf "<input type=radio name=reboot value=1 %s> $text{'yes'}\n",
25         $_[0]->{'reboot'} ? "checked" : "";
26 printf "<input type=radio name=reboot value=0 %s> $text{'no'}</td>\n",
27         $_[0]->{'reboot'} ? "" : "checked";
28
29 print "<td><b>$text{'acl_shutdown'}</b></td> <td>\n";
30 printf "<input type=radio name=shutdown value=1 %s> $text{'yes'}\n",
31         $_[0]->{'shutdown'} ? "checked" : "";
32 printf "<input type=radio name=shutdown value=0 %s> $text{'no'}</td> </tr>\n",
33         $_[0]->{'shutdown'} ? "" : "checked";
34 }
35
36 # acl_security_save(&options)
37 # Parse the form for security options for the init module
38 sub acl_security_save
39 {
40 $_[0]->{'bootup'} = $in{'bootup'};
41 $_[0]->{'reboot'} = $in{'reboot'};
42 $_[0]->{'shutdown'} = $in{'shutdown'};
43 }
44