Handle hostnames with upper-case letters
[webmin.git] / bind8 / mass_rcreate_form.cgi
1 #!/usr/local/bin/perl
2 # Show a form for adding a record to multiple domains at once
3
4 require './bind8-lib.pl';
5 &ReadParse();
6 &error_setup($text{'rmass_err'});
7 @d = split(/\0/, $in{'d'});
8 @d || &error($text{'rmass_enone'});
9
10 &ui_print_header(undef, $text{'rmass_title'}, "");
11
12 print &ui_form_start("mass_rcreate.cgi", "post");
13 foreach $d (@d) {
14         print &ui_hidden("d", $d),"\n";
15         $dc++;
16         }
17 print &ui_table_start($text{'rmass_header'}, undef, 2);
18
19 # Number of domains selected
20 print &ui_table_row($text{'umass_sel'}, $dc);
21
22 # Type to add
23 @rtypes = ( 'A', 'CNAME', 'NS', 'MX', 'PTR', 'TXT', 'SPF',
24             $config{'support_aaaa'} ? ( "AAAA" ) : ( ) );
25 print &ui_table_row($text{'rmass_type'},
26         &ui_select("type", "A",
27                    [ map { [ $_, $text{'recs_'.$_} ] } @rtypes ]));
28
29 # Record name
30 print &ui_table_row($text{'rmass_name'},
31                     &ui_textbox("name", undef, 30)." ".
32                     $text{'rmass_name2'});
33
34 # Record value
35 print &ui_table_row($text{'rmass_value'},
36                     &ui_textbox("value", undef, 30));
37
38 # Record TTL (optional)
39 print &ui_table_row($text{'rmass_ttl'},
40                     &ui_opt_textbox("ttl", undef, 10, $text{'default'}).
41                     " ".$text{'seconds'});
42
43 # Prevent clash
44 print &ui_table_row($text{'rmass_clash'},
45                     &ui_radio("clash", 1, [ [ 0, $text{'yes'} ],
46                                             [ 1, $text{'no'} ] ]));
47
48 print &ui_table_end();
49 print &ui_form_end([ [ "create", $text{'rmass_ok'} ] ]);
50
51 &ui_print_footer("", $text{'index_return'});