foreach
my
$config
(@{ setting(
'custom_fields'
)->{
'device'
} || [] }) {
next
unless
$config
->{
'name'
};
register_device_details({
%{
$config
},
field
=> (
'cf_'
.
$config
->{
'name'
}),
label
=> (
$config
->{
'label'
} ||
ucfirst
$config
->{
'name'
}),
})
unless
$config
->{
'hidden'
};
}
foreach
my
$config
(@{ setting(
'custom_fields'
)->{
'device_port'
} || [] }) {
next
unless
$config
->{
'name'
};
register_device_port_column({
position
=>
'right'
,
default
=>
undef
,
%{
$config
},
field
=> (
'cf_'
.
$config
->{
'name'
}),
label
=> (
$config
->{
'label'
} ||
ucfirst
$config
->{
'name'
}),
})
unless
$config
->{
'hidden'
};
}
true;