Handle hostnames with upper-case letters
[webmin.git] / zones / edit_attr.cgi
1 #!/usr/local/bin/perl
2 # Show a form for editing a generic attribute 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 if (!$in{'new'}) {
10         # Find the filesystem object
11         ($attr) = grep { $_->{'name'} eq $in{'old'} } @{$zinfo->{'attr'}};
12         $attr || &error($text{'attr_egone'});
13         }
14 $p = new Webmin::Page(&zone_title($in{'zone'}),
15                  $in{'new'} ? $text{'attr_title1'} : $text{'attr_title2'},
16                  "attr");
17 $p->add_form(&get_attr_form(\%in, $zinfo, $attr));
18 $p->add_footer("edit_zone.cgi?zone=$in{'zone'}", $text{'edit_return'});
19 $p->print();
20