1#!/usr/local/bin/perl 2# edit_options.cgi 3# Display options for an existing master zone 4use strict; 5use warnings; 6our (%access, %text, %in); 7 8require './bind8-lib.pl'; 9&ReadParse(); 10 11my $zone = &get_zone_name_or_error($in{'zone'}, $in{'view'}); 12my $z = &zone_to_config($zone); 13my $zconf = $z->{'members'}; 14my $dom = $zone->{'name'}; 15&can_edit_zone($zone) || 16 &error($text{'master_ecannot'}); 17 18$access{'opts'} || &error($text{'master_eoptscannot'}); 19&ui_print_header(&zone_subhead($zone), $text{'master_opts'}, "", 20 undef, undef, undef, undef, &restart_links($zone)); 21 22# Start of form for editing zone options 23print &ui_form_start("save_master.cgi", "post"); 24print &ui_hidden("zone", $in{'zone'}); 25print &ui_hidden("view", $in{'view'}); 26print &ui_table_start($text{'master_opts'}, "width=100%", 4); 27 28print &choice_input($text{'master_check'}, "check-names", $zconf, 29 $text{'warn'}, "warn", $text{'fail'}, "fail", 30 $text{'ignore'}, "ignore", $text{'default'}, undef); 31print &choice_input($text{'master_notify'}, "notify", $zconf, 32 $text{'yes'}, "yes", $text{'no'}, "no", 33 $text{'default'}, undef); 34 35print &address_input($text{'master_update'}, "allow-update", $zconf); 36print &address_input($text{'master_transfer'}, "allow-transfer", $zconf); 37 38print &address_input($text{'master_query'}, "allow-query", $zconf); 39print &address_input($text{'master_notify2'}, "also-notify", $zconf); 40 41print &ui_table_end(); 42print &ui_form_end([ [ undef, $text{'save'} ] ]); 43 44&ui_print_footer("edit_master.cgi?zone=$in{'zone'}&view=$in{'view'}", 45 $text{'master_return'}); 46 47