Handle hostnames with upper-case letters
[webmin.git] / acl / edit_sync.cgi
1 #!/usr/local/bin/perl
2 # edit_sync.cgi
3 # Display unix/webmin user synchronization
4
5 require './acl-lib.pl';
6 $access{'sync'} && $access{'create'} && $access{'delete'} ||
7         &error($text{'sync_ecannot'});
8 &ui_print_header(undef, $text{'sync_title'}, "");
9
10 @glist = &list_groups();
11 if (!@glist) {
12         print "<p>$text{'sync_nogroups'}<p>\n";
13         &ui_print_footer("", $text{'index_return'});
14         exit;
15         }
16
17 print "<form action=save_sync.cgi>\n";
18 print "<b>$text{'sync_desc'}</b><p>\n";
19 printf "<input type=checkbox name=create value=1 %s> %s<p>\n",
20         $config{'sync_create'} ? "checked" : "", $text{'sync_create'};
21 printf "<input type=checkbox name=delete value=1 %s> %s<p>\n",
22         $config{'sync_delete'} ? "checked" : "", $text{'sync_delete'};
23 printf "<input type=checkbox name=unix value=1 %s> %s<p>\n",
24         $config{'sync_unix'} ? "checked" : "", $text{'sync_unix'};
25
26 print "$text{'sync_group'} <select name=group>\n";
27 foreach $g (@glist) {
28         printf "<option %s>%s\n",
29                 $g->{'name'} eq $config{'sync_group'} ? "selected" : "",
30                 $g->{'name'};
31         }
32 print "</select><p>\n";
33
34 print "<input type=submit value='$text{'save'}'></form>\n";
35
36 &ui_print_footer("", $text{'index_return'});
37