2 'name' => 'RADIUS Group',
3 'table' => 'radius_group',
6 'groupname' => 'RADIUS Group',
7 'description' => 'Description',
8 'attrnum' => 'Attribute',
9 'priority' => 'Priority',
11 'viewall_dir' => 'browse',
13 { 'field' => 'groupname',
16 'colspan' => 6, # just to not interfere with radius_attr columns
18 { 'field' => 'description',
23 { 'field' => 'priority',
26 'colspan' => 6, # just to not interfere with radius_attr columns
30 'type' => 'radius_attr',
31 'o2m_table' => 'radius_attr',
32 'm2_label' => 'Attribute',
33 'm2_error_callback' => $m2_error_callback,
41 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
43 my $m2_error_callback = sub { # reconstruct the list
44 my ($cgi, $object) = @_;
46 my @fields = qw(attrname attrtype op value);
49 next if !length($cgi->param($k.'_attrname'));
51 'groupnum' => $object->groupnum,
52 'attrnum' => scalar( $cgi->param($k) ),
53 map { $_ => scalar( $cgi->param($k.'_'.$_) ) } @fields,
55 } grep /^attrnum\d+$/, ($cgi->param);