1 <& elements/browse.html,
2 'title' => 'RADIUS Groups',
3 'name' => 'RADIUS Groups',
4 'menubar' => [ 'Add a RADIUS Group' => $p.'edit/radius_group.html', ],
5 'query' => { 'table' => 'radius_group' },
6 'count_query' => 'SELECT COUNT(*) FROM radius_group',
7 'header' => [ '#', 'RADIUS Group', 'Description', 'Priority',
8 'Check', 'Reply', 'Speed' ],
9 'fields' => [ 'groupnum',
13 $check_attr, $reply_attr,
16 if ($group->speed_down and $group->speed_up) {
17 return join (' / ', $group->speed_down, $group->speed_up);
18 } elsif ( $group->speed_down ) {
19 return $group->speed_down . ' down';
20 } elsif ( $group->speed_up ) {
21 return $group->speed_up . ' up';
27 'links' => [ $link, $link, '', '', '', '', ''
32 my $curuser = $FS::CurrentUser::CurrentUser;
35 unless $curuser->access_right('Configuration');
39 my $radius_group = shift;
40 [ map { [ { data => join(' ', $_->attrname, $_->op, $_->value) } ] }
41 grep {$_->attrtype eq $type}
42 $radius_group->radius_attr
46 my $check_attr = sub { &$attr_sub('C', @_) };
47 my $reply_attr = sub { &$attr_sub('R', @_) };
49 my $link = [ $p.'edit/radius_group.html?', 'groupnum' ];