Handle hostnames with upper-case letters
[webmin.git] / zones / edit_net.cgi
1 #!/usr/local/bin/perl
2 # Show a form for editing a network interface or adding one
3
4 require './zones-lib.pl';
5 do 'forms-lib.pl';
6 &ReadParse();
7 $zinfo = &get_zone($in{'zone'});
8 $zinfo || &error($text{'edit_egone'});
9
10 $p = new Webmin::Page(&zone_title($in{'zone'}),
11                  $in{'new'} ? $text{'net_title1'} : $text{'net_title2'},
12                  "net");
13 if (!$in{'new'}) {
14         # Find the network object
15         ($net) = grep { $_->{'address'} eq $in{'old'} } @{$zinfo->{'net'}};
16         $net || &error($text{'net_egone'});
17         }
18 $p->add_form(&get_net_form(\%in, $zinfo, $net));
19 $p->add_footer("edit_zone.cgi?zone=$in{'zone'}", $text{'edit_return'});
20 $p->print();
21