'name' => 'broadband service',
'table' => 'svc_broadband',
'fields' => \@fields,
- 'field_callback' => $field_callback,
+ 'svc_field_callback' => $svc_field_callback,
'svc_new_callback' => $svc_edit_callback,
'svc_edit_callback' => $svc_edit_callback,
'svc_error_callback' => $svc_edit_callback,
{ field=>'sectornum', type=>'select-tower_sector', },
{ field=>'routernum', type=>'select-router_block_ip' },
{ field=>'mac_addr' , type=>'input-mac_addr' },
- qw( latitude longitude altitude vlan_profile
- performance_profile authkey plan_id )
+ qw(
+ latitude longitude altitude
+ radio_serialnum radio_location poe_location rssi suid
+ ),
+ { field=>'shared_svcnum', type=>'search-svc_broadband', },
+ qw( vlan_profile performance_profile authkey plan_id ),
);
if ( $conf->exists('svc_broadband-radius') ) {
}
};
-my $field_callback = sub {
+my $svc_field_callback = sub {
my ($cgi, $object, $fieldref) = @_;
my $columndef = $part_svc->part_svc_column($fieldref->{'field'});
- if ($columndef->columnflag eq 'F') {
- $fieldref->{'type'} = length($columndef->columnvalue)
- ? 'fixed'
- : 'hidden';
- $fieldref->{'value'} = $columndef->columnvalue;
+ if ($fieldref->{field} eq 'usergroup' && $columndef->columnflag eq 'F') {
- if ( $fieldref->{field} eq 'usergroup' ) {
- $fieldref->{'formatted_value'} =
- [ $object->radius_groups('long_description') ];
- }
+ $fieldref->{'formatted_value'} =
+ [ $object->radius_groups('long_description') ];
}
};