Handle hostnames with upper-case letters
[webmin.git] / samba / edit_gsync.cgi
1 #!/usr/local/bin/perl
2 # edit_gsync.cgi
3 # Allow the user to edit auto updating of Samba groups by useradmin
4
5 require './samba-lib.pl';
6
7 $access{'maint_gsync'} || &error($text{'gsync_ecannot'});
8 &ui_print_header(undef, $text{'gsync_title'}, "");
9
10 &check_group_enabled($text{'gsync_cannot'});
11
12 print $text{'gsync_msg'}, "<p>\n";
13
14 print "<form action=save_gsync.cgi>\n";
15 printf "<input type=checkbox name=add value=1 %s>\n",
16         $config{'gsync_add'} ? "checked" : "";
17 print "$text{'gsync_add'}\n";
18 print "<table>\n";
19 print "<tr> <td width=20></td> <td>$text{'gsync_type'}</td>\n";
20 print "<td><select name=type>\n";
21 foreach $t ('l', 'd', 'b', 'u') {
22         printf "<option value=%s %s>%s\n",
23                 $t, $config{'gsync_type'} eq $t ? "selected" : "",
24                 $text{'groups_type_'.$t};
25         }
26 print "</select></td> </tr>\n";
27 print "<tr> <td width=20></td> <td>$text{'gsync_priv'}</td>\n";
28 printf "<td><input name=priv size=40 value='%s'></td> </tr>\n",
29         $config{'gsync_priv'};
30 print "</table><p>\n";
31
32 printf "<input type=checkbox name=change value=1 %s>\n",
33         $config{'gsync_change'} ? "checked" : "";
34 print "$text{'gsync_chg'}<p>\n";
35
36 printf "<input type=checkbox name=delete value=1 %s>\n",
37         $config{'gsync_delete'} ? "checked" : "";
38 print "$text{'gsync_del'}<p>\n";
39 print "<input type=submit value=\"", $text{'gsync_apply'}, "\"></form>\n";
40
41 &ui_print_footer("", $text{'index_sharelist'});
42