summaryrefslogtreecommitdiff
path: root/httemplate/view/elements
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-01-15 20:35:51 -0800
committerMark Wells <mark@freeside.biz>2015-01-15 20:35:51 -0800
commit92adf71887c2680f464d660cab727ea112e858a5 (patch)
tree3de78c1be8883800aa157535bb6683360525e46e /httemplate/view/elements
parent14e0c529bcfbe96964cb659018c3c91e5ce9a483 (diff)
MAC address copying hack for view/ pages, #25599
Diffstat (limited to 'httemplate/view/elements')
-rw-r--r--httemplate/view/elements/svc_Common.html7
1 files changed, 5 insertions, 2 deletions
diff --git a/httemplate/view/elements/svc_Common.html b/httemplate/view/elements/svc_Common.html
index 6c5c90201..b7f7a2c63 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