summaryrefslogtreecommitdiff
path: root/httemplate/view/svc_hardware.cgi
diff options
context:
space:
mode:
authorIvan Kohler <ivan-debian@420.am>2012-03-15 13:56:48 -0700
committerIvan Kohler <ivan-debian@420.am>2012-03-15 13:56:48 -0700
commit7d68066ea33f9f85fe14ce663372642d7ec2ad20 (patch)
treef659173a23d541da3032f8a8156f888810d7efda /httemplate/view/svc_hardware.cgi
parentd622dc369cc0856fb791658b35f889470a7da605 (diff)
parenta69299c596de60f4b26db7431165f7f3ffe928e2 (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/view/svc_hardware.cgi')
-rw-r--r--httemplate/view/svc_hardware.cgi20
1 files changed, 19 insertions, 1 deletions
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,
+);
</%init>