X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fsvc_broadband.pm;h=2ac24e55b7b36c5778279c761534017ba864d59a;hb=5df49c99a8c9cb241910b2cf262d19bdbae1f612;hp=f1a233b4046e7e0052c33886834d15362a8313af;hpb=5fdd19665fb7c0ad425a99d3dbf9ad7e27fbf44a;p=freeside.git diff --git a/FS/FS/svc_broadband.pm b/FS/FS/svc_broadband.pm index f1a233b40..2ac24e55b 100755 --- a/FS/FS/svc_broadband.pm +++ b/FS/FS/svc_broadband.pm @@ -9,7 +9,7 @@ use FS::addr_block; use FS::part_svc_router; use NetAddr::IP; -@ISA = qw( FS::svc_Common ); +@ISA = qw( FS::svc_Radius_Mixin FS::svc_Common ); $FS::UID::callback{'FS::svc_broadband'} = sub { $conf = new FS::Conf; @@ -115,6 +115,15 @@ sub table_info { 'longitude' => 'Longitude', 'altitude' => 'Altitude', 'vlan_profile' => 'VLAN profile', + 'usergroup' => { + label => 'RADIUS groups', + type => 'select-radius_group.html', + #select_table => 'radius_group', + #select_key => 'groupnum', + #select_label => 'groupname', + disable_inventory => 1, + multiple => 1, + }, }, }; } @@ -168,7 +177,7 @@ sub search { #agentnum if ( $params->{'agentnum'} =~ /^(\d+)$/ and $1 ) { - push @where, "agentnum = $1"; + push @where, "cust_main.agentnum = $1"; } push @where, $FS::CurrentUser::CurrentUser->agentnums_sql( 'null_right' => 'View/link unlinked services', @@ -338,12 +347,17 @@ sub check { my $lat_lower = $nw_coords ? 1 : -90; my $lon_upper = $nw_coords ? -1 : 180; + # remove delimiters + my $mac_addr = uc($self->get('mac_addr')); + $mac_addr =~ s/[-: ]//g; + $self->set('mac_addr', $mac_addr); + my $error = $self->ut_numbern('svcnum') || $self->ut_numbern('blocknum') || $self->ut_textn('description') - || $self->ut_number('speed_up') - || $self->ut_number('speed_down') + || $self->ut_numbern('speed_up') + || $self->ut_numbern('speed_down') || $self->ut_ipn('ip_addr') || $self->ut_hexn('mac_addr') || $self->ut_hexn('auth_key')