Handle hostnames with upper-case letters
[webmin.git] / acl / convert_form.cgi
1 #!/usr/local/bin/perl
2 # convert_form.cgi
3 # Display a form for converting unix users to webmin users
4
5 require './acl-lib.pl';
6 $access{'sync'} && $access{'create'} || &error($text{'convert_ecannot'});
7 &ui_print_header(undef, $text{'convert_title'}, "");
8
9 @glist = &list_groups();
10 if ($access{'gassign'} ne '*') {
11         @gcan = split(/\s+/, $access{'gassign'});
12         @glist = grep { &indexof($_->{'name'}, @gcan) >= 0 } @glist;
13         }
14 if (!@glist) {
15         print "$text{'convert_nogroups'}<p>\n";
16         &ui_print_footer("", $text{'index_return'});
17         exit;
18         }
19
20 print "<form action=convert.cgi>\n";
21 print "$text{'convert_desc'}<p>\n";
22 print "<input type=radio name=conv value=0 checked> $text{'convert_0'}<br>\n";
23 print "<input type=radio name=conv value=1> $text{'convert_1'} ",
24       "<input name=users size=40> ",&user_chooser_button("users",1),"<br>\n";
25 print "<input type=radio name=conv value=2> $text{'convert_2'} ",
26       "<input name=nusers size=40> ",&user_chooser_button("nusers",1),"<br>\n";
27 print "<input type=radio name=conv value=3> $text{'convert_3'} ",
28       &unix_group_input("group"),"<br>\n";
29 print "<input type=radio name=conv value=4> $text{'convert_4'} ",
30       "<input name=min size=6> - <input name=max size=6><p>\n";
31
32 print "$text{'convert_group'} <select name=wgroup>\n";
33 foreach $g (@glist) {
34         print "<option>$g->{'name'}\n";
35         }
36 print "</select><br>\n";
37 print "<input type=checkbox name=sync value=1> $text{'convert_sync'}<br>\n";
38 print "<input type=submit value='$text{'convert_ok'}'></form>\n";
39
40 &ui_print_footer("", $text{'index_return'});
41