Handle hostnames with upper-case letters
[webmin.git] / heartbeat / edit_auth.cgi
1 #!/usr/local/bin/perl
2 # edit_auth.cgi
3 # Display authentication settings
4
5 require './heartbeat-lib.pl';
6 &ui_print_header(undef, $text{'auth_title'}, "");
7
8 $conf = &get_auth_config();
9
10 print "<form action=save_auth.cgi>\n";
11 print "<table border>\n";
12 print "<tr $tb> <td><b>$text{'auth_header'}</b></td> </tr>\n";
13 print "<tr $cb> <td><table><tr>\n";
14 print "<td valign=top><b>$text{'auth_mode'}</td> <td>\n";
15
16 $i = 1;
17 $n = $conf->{'auth'}->[0];
18 foreach $k ('crc', 'sha1', 'md5') {
19         printf "<input type=radio name=auth value=%d %s> %s\n",
20                 $i, $conf->{$n}->[0] eq $k ? "checked" : "",
21                 $text{"auth_$k"};
22         if ($k ne 'crc') {
23                 ($thisnum) = grep { $conf->{$_}->[0] eq $k } (keys %$conf);
24                 printf "<input name=%s size=20 value='%s'>\n",
25                         $k, $conf->{$thisnum}->[1];
26                 }
27         print "<br>\n";
28         $i++;
29         }
30
31 print "</td></tr></table></td></tr></table>\n";
32 print "<input type=submit value='$text{'save'}'></form>\n";
33
34 &ui_print_footer("", $text{'index_return'});
35