X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fview%2Fsvc_hardware.cgi;h=725358cad5bd08b91633a1803133a68424d8a7d9;hp=1d882352b4a68fc984eaafe18f7c7d492f2aefce;hb=a69299c596de60f4b26db7431165f7f3ffe928e2;hpb=da590709ee5f3e6a661950fcfce39dbbf9d6add4 diff --git a/httemplate/view/svc_hardware.cgi b/httemplate/view/svc_hardware.cgi index 1d882352b..725358cad 100644 --- a/httemplate/view/svc_hardware.cgi +++ b/httemplate/view/svc_hardware.cgi @@ -6,6 +6,7 @@ %> <%init> +my $conf = new FS::Conf; my $fields = FS::svc_hardware->table_info->{'fields'}; my %labels = map { $_ => ( ref($fields->{$_}) ? $fields->{$_}{'label'} @@ -24,5 +25,22 @@ my $note = { field => 'note', type => 'text', value => sub { encode_entities($_[0]->note) } }; -my @fields = ($model, qw( serial hw_addr ip_addr smartcard ), $status, $note ); +my $hw_addr ={ field => 'hw_addr', + type => 'text', + value => sub { + my $hw_addr = $_[0]->hw_addr; + $conf->exists('svc_hardware-check_mac_addr') ? + join(':', $hw_addr =~ /../g) : $hw_addr + }, + }; + +my @fields = ( + $model, + 'serial', + $hw_addr, + 'ip_addr', + 'smartcard', + $status, + $note, +);