Handle hostnames with upper-case letters
[webmin.git] / bacula-backup / label_form.cgi
1 #!/usr/local/bin/perl
2 # Show a form for labelling one volume
3
4 require './bacula-backup-lib.pl';
5 &ui_print_header(undef,  $text{'label_title'}, "", "label");
6
7 print &ui_form_start("label.cgi", "post");
8 print &ui_table_start($text{'label_header'}, undef, 2);
9
10 # Daemon to label
11 @storages = sort { lc($a->{'name'}) cmp lc($b->{'name'}) }
12                  &get_bacula_storages();
13 print &ui_table_row($text{'label_storage'},
14         &ui_select("storage", $in{'storage'},
15          [ map { [ $_->{'name'},
16                    &text('clientstatus_on', $_->{'name'}, $_->{'address'}) ] }
17            @storages ]));
18
19 @pools = sort { lc($a->{'name'}) cmp lc($b->{'name'}) } &get_bacula_pools();
20 print &ui_table_row($text{'label_pool'},
21         &ui_select("pool", $pools[0]->{'name'},
22                 [ map { [ $_->{'name'} ] } @pools ]));
23
24 # Label to write
25 print &ui_table_row($text{'label_label'},
26                     &ui_textbox("label", undef, 20));
27
28 print &ui_table_end();
29 print &ui_form_end([ [ undef, $text{'label_ok'} ] ]);
30
31 &ui_print_footer("", $text{'index_return'});