[freeside-commits] freeside/httemplate/edit/process radius_group.html, 1.1, 1.1.2.1
Mark Wells
mark at wavetail.420.am
Wed Nov 23 10:40:09 PST 2011
Update of /home/cvs/cvsroot/freeside/httemplate/edit/process
In directory wavetail.420.am:/tmp/cvs-serv14813/httemplate/edit/process
Modified Files:
Tag: FREESIDE_2_3_BRANCH
radius_group.html
Log Message:
RADIUS group attributes, #15017
Index: radius_group.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/radius_group.html,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -w -d -r1.1 -r1.1.2.1
--- radius_group.html 21 Jun 2011 01:04:56 -0000 1.1
+++ radius_group.html 23 Nov 2011 18:40:07 -0000 1.1.2.1
@@ -1,10 +1,27 @@
<& elements/process.html,
'table' => 'radius_group',
'viewall_dir' => 'browse',
+ 'process_o2m' => {
+ 'table' => 'radius_attr',
+ 'fields' => [ qw( attrtype attrname op value )],
+ },
+ 'precheck_callback' => $precheck_callback,
&>
<%init>
-
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+my $precheck_callback = sub {
+ my $cgi = shift;
+ my $param = $cgi->Vars;
+ # remove rows with a blank attrname and attrnum
+ foreach my $k (grep /^attrnum\d+$/, keys %$param) {
+ if ( !length($param->{$k}) and !length($param->{$k.'_attrname'}) ) {
+ delete $param->{$k.'_'.$_} foreach qw(attrtype attrname op value);
+ delete $param->{$k};
+ }
+ }
+ '';
+};
+
</%init>
More information about the freeside-commits
mailing list