'name_plural' => 'Hardware',
'display_weight' => 59,
'cancel_weight' => 86,
+ 'manual_require' => 1,
'fields' => {
'svcnum' => { label => 'Service' },
'typenum' => { label => 'Device type',
disable_fixed => 1,
disable_default => 1,
disable_inventory => 1,
+ required => 1,
},
'serial' => { label => 'Serial number', %opts },
'hw_addr' => { label => 'Hardware address', %opts },
sub label {
my $self = shift;
- $self->serial || $self->display_hw_addr;
+ my @label = ();
+ if (my $type = $self->hardware_type) {
+ push @label, 'Type:' . $type->description;
+ }
+ if (my $ser = $self->serial) {
+ push @label, 'Serial#' . $ser;
+ }
+ if (my $mac = $self->display_hw_addr) {
+ push @label, 'MAC:'. $mac;
+ }
+ return join(', ', @label);
}
=item insert