Handle hostnames with upper-case letters
[webmin.git] / useradmin / gbatch_form.cgi
1 #!/usr/local/bin/perl
2 # Display a form for doing batch group creation, updates or deletion from
3 # a text file
4
5 require './user-lib.pl';
6 $access{'batch'} || &error($text{'gbatch_ecannot'});
7 &ui_print_header(undef, $text{'gbatch_title'}, "");
8
9 # Instructions
10 print &ui_hidden_start($text{'batch_instr'}, "instr", 0, "batch_form.cgi");
11 print "$text{'gbatch_desc'}<p>\n";
12 print "<tt>$text{'gbatch_desc2'}</tt><p>\n";
13 print "$text{'gbatch_descafter'}<br>\n";
14 print "$text{'gbatch_descafter2'}\n";
15 print &ui_hidden_end("instr");
16
17 print &ui_form_start("gbatch_exec.cgi", "form-data");
18 print &ui_table_start($text{'gbatch_header'}, undef, 2);
19
20 # Source file
21 print &ui_table_row($text{'batch_source'},
22         &ui_radio_table("source", 0,
23           [ [ 0, $text{'batch_source0'}, &ui_upload("file") ],
24             [ 1, $text{'batch_source1'}, &ui_textbox("local", undef, 40)." ".
25                                          &file_chooser_button("local") ],
26             [ 2, $text{'batch_source2'}, &ui_textarea("text", undef, 5, 60) ]
27           ]));
28
29 if ($access{'cothers'} == 1 || $access{'mothers'} == 1 ||
30     $access{'dothers'} == 1) {
31         # Do other modules?
32         print &ui_table_row($text{'gbatch_others'},
33                 &ui_yesno_radio("others", int($config{'default_other'})));
34         }
35
36 # Only run post-command at end?
37 print &ui_table_row($text{'gbatch_batch'},
38         &ui_yesno_radio("batch", 0));
39
40 if ($access{'chgid'}) {
41         # Update GIDs on files
42         print &ui_table_row($text{'gbatch_chgid'},
43                 &ui_radio("chgid", 0, [ [ 0, $text{'no'} ],
44                                         [ 1, $text{'home'} ],
45                                         [ 2, $text{'uedit_allfiles'} ] ]));
46         }
47
48 print &ui_table_end();
49 print &ui_form_end([ [ undef, $text{'batch_upload'} ] ]);
50
51 &ui_print_footer("", $text{'index_return'});
52