Handle hostnames with upper-case letters
[webmin.git] / nis / edit_client.cgi
1 #!/usr/local/bin/perl
2 # edit_client.cgi
3 # Display NIS client options
4
5 require './nis-lib.pl';
6 &ui_print_header(undef, $text{'client_title'}, "");
7
8 if (!(&get_nis_support() & 1)) {
9         print "<p>$text{'client_enis'}<p>\n";
10         &ui_print_footer("", $text{'index_return'});
11         exit;
12         }
13
14 $nis = &get_client_config();
15
16 print "<form action=save_client.cgi method=post>\n";
17 print "<table border>\n";
18 print "<tr $tb> <td><b>$text{'client_header'}</b></td> </tr>\n";
19 print "<tr $cb> <td><table>\n";
20
21 print "<tr> <td><b>$text{'client_domain'}</b></td>\n";
22 printf "<td valign=top><input type=radio name=domain_def value=1 %s> %s\n",
23         $nis->{'domain'} ? '' : 'checked', $text{'client_none'};
24 printf "<input type=radio name=domain_def value=0 %s>\n",
25         $nis->{'domain'} ? 'checked' : '';
26 printf "<input name=domain size=35 value='%s'></td> </tr>\n",
27         $nis->{'domain'};
28
29 print "<tr> <td valign=top><b>$text{'client_servers'}</b></td>\n";
30 printf "<td><input type=radio name=broadcast value=1 %s> %s\n",
31         $nis->{'broadcast'} ? 'checked' : '', $text{'client_broadcast'};
32 printf "<input type=radio name=broadcast value=0 %s> %s<br>\n",
33         $nis->{'broadcast'} ? '' : 'checked', $text{'client_listed'};
34 print "<textarea name=servers rows=3 cols=35>",
35       join("\n", &unique(@{$nis->{'servers'}})),"</textarea></td> </tr>\n";
36
37 print "</table></td></tr></table>\n";
38 print "<input type=submit value='$text{'client_ok'}'></form>\n";
39 &ui_print_footer("", $text{'index_return'});
40