Handle hostnames with upper-case letters
[webmin.git] / webmin / edit_startpage.cgi
1 #!/usr/local/bin/perl
2 # edit_startpage.cgi
3 # Startpage config form
4
5 require './webmin-lib.pl';
6 &ui_print_header(undef, $text{'startpage_title'}, "");
7
8 print $text{'startpage_intro2'},"<p>\n";
9
10 print &ui_form_start("change_startpage.cgi", "post");
11 print &ui_table_start($text{'startpage_title'}, undef, 2);
12
13 print &ui_table_row($text{'startpage_nocol'},
14         &ui_opt_textbox("nocols", $gconfig{'nocols'}, 5, $text{'default'}));
15
16 print &ui_table_row($text{'startpage_tabs'},
17         &ui_radio("notabs", $gconfig{'notabs'} ? 1 : 0,
18                   [ [ 0, $text{'yes'} ], [ 1, $text{'no'} ] ]));
19
20 @modules = &get_all_module_infos();
21 %cats = &list_categories(\@modules);
22 print &ui_table_row($text{'startpage_deftab'},
23         &ui_select("deftab", $gconfig{'deftab'} || 'webmin',
24                    [ map { [ $_, $cats{$_} ] }
25                          sort { $cats{$a} cmp $cats{$b} } (keys %cats) ]));
26
27 print &ui_table_row($text{'startpage_nohost'},
28         &ui_radio("nohostname", $gconfig{'nohostname'} ? 1 : 0,
29                   [ [ 0, $text{'yes'} ], [ 1, $text{'no'} ] ]));
30
31 print &ui_table_row($text{'startpage_gotoone'},
32         &ui_yesno_radio("gotoone", int($gconfig{'gotoone'})));
33
34 print &ui_table_row($text{'startpage_gotomodule'},
35         &ui_select("gotomodule", $gconfig{'gotomodule'},
36                 [ [ "", $text{'startpage_gotonone'} ],
37                   map { [ $_->{'dir'}, $_->{'desc'} ] }
38                       sort { $a->{'desc'} cmp $b->{'desc'} } @modules ]));
39
40 print &ui_table_row($text{'startpage_webminup'},
41         &ui_yesno_radio("webminup", !$gconfig{'nowebminup'}));
42
43 print &ui_table_row($text{'startpage_moduleup'},
44         &ui_yesno_radio("moduleup", !$gconfig{'nomoduleup'}));
45
46 print &ui_table_end();
47 print &ui_form_end([ [ "", $text{'save'} ] ]);
48
49 &ui_print_footer("", $text{'index_return'});
50