Handle hostnames with upper-case letters
[webmin.git] / nis / edit_group_shadow.cgi
1 #!/usr/local/bin/perl
2 # edit_group_shadow.cgi
3 # Edit a NIS group table entry
4
5 require './nis-lib.pl';
6 &ReadParse();
7 &ui_print_header(undef, $text{'group_title'}, "");
8
9 ($t, $lnums, $group, $shadow) = &table_edit_setup($in{'table'}, $in{'line'}, ':');
10 print "<form action=save_group_shadow.cgi method=post>\n";
11 print "<input type=hidden name=table value='$in{'table'}'>\n";
12 print "<input type=hidden name=line value='$in{'line'}'>\n";
13
14 print "<table border width=100%>\n";
15 print "<tr $tb> <td><b>$text{'group_header'}</b></td> </tr>\n";
16 print "<tr $cb> <td><table width=100%>\n";
17
18 print "<tr> <td><b>$text{'group_name'}</b></td>\n";
19 print "<td><input name=name size=15 value='$group->[0]'></td>\n";
20
21 print "<td><b>$text{'group_gid'}</b></td>\n";
22 print "<td><input name=gid size=10 value='$group->[2]'></td> </tr>\n";
23
24 print "<tr> <td valign=top><b>$text{'group_pass'}</b></td> <td>\n";
25 printf "<input type=radio name=passmode value=0 %s> $text{'group_none'}<br>\n",
26         $shadow->[1] eq "" ? "checked" : "";
27 printf "<input type=radio name=passmode value=1 %s> $text{'group_encrypted'}\n",
28         $shadow->[1] eq "" ? "" : "checked";
29 print "<input name=encpass size=13 value=\"$shadow->[1]\"><br>\n";
30 print "<input type=radio name=passmode value=2 %s> $text{'group_clear'}\n";
31 print "<input name=pass size=15></td>\n";
32
33 print "<td valign=top><b>$text{'group_members'}</b></td>\n";
34 print "<td><textarea wrap=auto name=members rows=5 cols=10>",
35         join("\n", split(/,/ , $group->[3])),"</textarea></td> </tr>\n";
36
37 print "</table></td></tr></table>\n";
38 if (defined($in{'line'})) {
39         print "<input type=submit value='$text{'save'}'>\n";
40         print "<input type=submit name=delete value='$text{'delete'}'>\n";
41         }
42 else {
43         print "<input type=submit value='$text{'create'}'>\n";
44         }
45 print "</form>\n";
46 &ui_print_footer("edit_tables.cgi?table=$in{'table'}", $text{'tables_return'},
47         "", $text{'index_return'});
48