%>
<%init>
+my $conf = new FS::Conf;
my $fields = FS::svc_hardware->table_info->{'fields'};
my %labels = map { $_ => ( ref($fields->{$_})
? $fields->{$_}{'label'}
: $fields->{$_}
);
} keys %$fields;
-my $model = { field => 'typenum',
- type => 'text',
- value => sub { $_[0]->hardware_type->model }
- };
+
+$labels{'display_hw_addr'} = 'Hardware address';
+
+my $model = { field => 'typenum',
+ type => 'text',
+ value_callback => sub { $_[0]->hardware_type->description }
+ };
my $status = { field => 'statusnum',
type => 'text',
- value => sub { $_[0]->status_label }
- };
-my @fields = ($model, qw( serial hw_addr ip_addr ), $status, 'note' );
+ value_callback => sub { $_[0]->status_label }
+ };
+my $note = { field => 'note',
+ type => 'text',
+ value_callback => sub { encode_entities($_[0]->note) }
+ };
+
+my @fields = (
+ $model,
+ 'serial',
+ 'display_hw_addr',
+ 'ip_addr',
+ 'smartcard',
+ $status,
+ $note,
+);
</%init>