diff options
| author | Mark Wells <mark@freeside.biz> | 2015-01-15 20:35:24 -0800 |
|---|---|---|
| committer | Mark Wells <mark@freeside.biz> | 2015-01-15 20:35:30 -0800 |
| commit | b85a720cb3605855f685c8af1dce98c7b1658b4b (patch) | |
| tree | 890651c51fcf5762aae62faab437a37acaf72a8b /httemplate/view/elements | |
| parent | 1cf55d0a0ccb48142608e67653f86e3c294e4561 (diff) | |
MAC address copying hack for view/ pages, #25599
Diffstat (limited to 'httemplate/view/elements')
| -rw-r--r-- | httemplate/view/elements/svc_Common.html | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/httemplate/view/elements/svc_Common.html b/httemplate/view/elements/svc_Common.html index 501fea020..7d21e764f 100644 --- a/httemplate/view/elements/svc_Common.html +++ b/httemplate/view/elements/svc_Common.html @@ -222,6 +222,7 @@ my $format_field = sub { $field = $f; $type = 'text'; } + warn "$field\t$type\t$value\n"; my $columndef = $part_svc->part_svc_column($field); # skip fields that are fixed and empty @@ -273,8 +274,10 @@ my $format_field = sub { $value = time2str("$date_format %H:%M",$value) } elsif ( $type eq 'checkbox' ) { $value = $value eq 'Y' ? emt('Yes') : emt('No'); - } elsif ( $type eq 'mac_addr' and $value =~ /\w/) { - $value .= ' ('. (Net::MAC::Vendor::lookup($value))->[0]. ')' + } elsif ( $type =~ /(input-)?mac_addr/ and $value =~ /\w/) { + my $vendor = Net::MAC::Vendor::lookup($value)->[0]; + $value .= " ($vendor)" if $vendor; + $value = $m->scomp('/elements/mac_addr.html', $value); } # 'link' option |
