3 # Display options for an existing slave or stub 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 $file = &find_value("file", $zconf);
15 $dom = $conf->[$in{'index'}]->{'value'};
16 &can_edit_zone($conf->[$in{'index'}], $view) ||
17 &error($text{'slave_ecannot'});
18 $access{'opts'} || &error($text{'slave_ecannot'});
19 $desc = &ip6int_to_net(&arpa_to_ip($dom));
20 &ui_print_header($desc, $text{'master_opts'}, "",
21 undef, undef, undef, undef, &restart_links($zone));
24 print &ui_form_start("save_slave.cgi", "post");
25 print &ui_hidden("index", $in{'index'});
26 print &ui_hidden("view", $in{'view'});
27 print &ui_hidden("slave_stub", $scriptname);
28 print &ui_table_start($text{'slave_opts'}, "width=100%", 4);
30 # Master addresses and port
31 print &address_port_input($text{'slave_masters'},
32 $text{'slave_masterport'},
33 $text{'slave_master_port'},
41 print &opt_input($text{'slave_max'}, "max-transfer-time-in",
42 $zconf, $text{'default'}, 4, $text{'slave_mins'});
45 print &opt_input($text{'slave_file'}, "file", $zconf, $text{'slave_none'}, 40);
47 print &choice_input($text{'slave_check'}, "check-names", $zconf,
48 $text{'warn'}, "warn", $text{'fail'}, "fail",
49 $text{'ignore'}, "ignore", $text{'default'}, undef);
50 print &choice_input($text{'slave_notify'}, "notify", $zconf,
51 $text{'yes'}, "yes", $text{'no'}, "no",
52 $text{'default'}, undef);
54 print &addr_match_input($text{'slave_update'}, "allow-update", $zconf);
55 print &addr_match_input($text{'slave_transfer'}, "allow-transfer", $zconf);
57 print &addr_match_input($text{'slave_query'}, "allow-query", $zconf);
58 print &address_input($text{'slave_notify2'}, "also-notify", $zconf);
60 print &ui_table_end();
61 print &ui_form_end([ [ undef, $text{'save'} ] ]);
63 &ui_print_footer("edit_slave.cgi?index=$in{'index'}&view=$in{'view'}",
64 $text{'master_return'});