1 |
diff -Nur -x '*.orig' -x '*.rej' e-smith-hosts-1.14.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/hostentries.pm mezzanine_patched_e-smith-hosts-1.14.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/hostentries.pm |
2 |
--- e-smith-hosts-1.14.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/hostentries.pm 2007-07-12 11:41:29.000000000 -0400 |
3 |
+++ mezzanine_patched_e-smith-hosts-1.14.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/hostentries.pm 2007-07-12 11:19:22.000000000 -0400 |
4 |
@@ -439,12 +439,23 @@ |
5 |
$self->{cgi}->delete('ethernet_address'); |
6 |
} |
7 |
|
8 |
+ if ($type eq "Local") |
9 |
+ { |
10 |
+ $self->{cgi}->delete('global_ip'); |
11 |
+ } |
12 |
+ |
13 |
+ my %label_map = ( |
14 |
+ global_ip => "IP_ADDRESS", |
15 |
+ local_ip => "IP_ADDRESS", |
16 |
+ ); |
17 |
foreach my $f (qw( name domain hosttype local_ip global_ip |
18 |
ethernet_address comment) ) { |
19 |
my $val = $self->cgi->param($f) || ''; |
20 |
$self->debug_msg("looping on param $f, val is $val"); |
21 |
- print $q->Tr (esmith::cgi::genSmallCell($q, $self->localise(uc($f)),"normal"), |
22 |
- esmith::cgi::genSmallCell($q, $val,"normal")) if $val; |
23 |
+ next unless $val; |
24 |
+ my $label = $label_map{$f} || uc($f); |
25 |
+ print $q->Tr (esmith::cgi::genSmallCell($q, $self->localise($label),"normal"), |
26 |
+ esmith::cgi::genSmallCell($q, $val,"normal")); |
27 |
} |
28 |
|
29 |
print qq(</table>); |