3 # Display options for an existing master zone
5 require './bind8-lib.pl';
7 $zone = &get_zone_name($in{'index'}, $in{'view'});
8 $bconf = $conf = &get_config();
9 if ($in{'view'} ne '') {
10 $view = $conf->[$in{'view'}];
11 $conf = $view->{'members'};
13 $zconf = $conf->[$in{'index'}]->{'members'};
14 $dom = $conf->[$in{'index'}]->{'value'};
15 &can_edit_zone($conf->[$in{'index'}], $view) ||
16 &error($text{'master_ecannot'});
17 $access{'opts'} || &error($text{'master_eoptscannot'});
18 $desc = &ip6int_to_net(&arpa_to_ip($dom));
19 &ui_print_header($desc, $text{'master_opts'}, "",
20 undef, undef, undef, undef, &restart_links($zone));
22 # Start of form for editing zone options
23 print &ui_form_start("save_master.cgi", "post");
24 print &ui_hidden("index", $in{'index'});
25 print &ui_hidden("view", $in{'view'});
26 print &ui_table_start($text{'master_opts'}, "width=100%", 4);
28 print &choice_input($text{'master_check'}, "check-names", $zconf,
29 $text{'warn'}, "warn", $text{'fail'}, "fail",
30 $text{'ignore'}, "ignore", $text{'default'}, undef);
31 print &choice_input($text{'master_notify'}, "notify", $zconf,
32 $text{'yes'}, "yes", $text{'no'}, "no",
33 $text{'default'}, undef);
35 print &address_input($text{'master_update'}, "allow-update", $zconf);
36 print &address_input($text{'master_transfer'}, "allow-transfer", $zconf);
38 print &address_input($text{'master_query'}, "allow-query", $zconf);
39 print &address_input($text{'master_notify2'}, "also-notify", $zconf);
41 print &ui_table_end();
42 print &ui_form_end([ [ undef, $text{'save'} ] ]);
44 &ui_print_footer("edit_master.cgi?index=$in{'index'}&view=$in{'view'}",
45 $text{'master_return'});