[freeside-commits] freeside/httemplate/edit svc_acct.cgi, 1.81, 1.82 svc_broadband.cgi, 1.24, 1.25
Mark Wells
mark at wavetail.420.am
Thu Nov 10 13:40:07 PST 2011
Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail.420.am:/tmp/cvs-serv22579/httemplate/edit
Modified Files:
svc_acct.cgi svc_broadband.cgi
Log Message:
RADIUS groups for svc_broadband, #14695
Index: svc_broadband.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/svc_broadband.cgi,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -w -d -r1.24 -r1.25
--- svc_broadband.cgi 10 Jun 2011 05:16:54 -0000 1.24
+++ svc_broadband.cgi 10 Nov 2011 21:40:05 -0000 1.25
@@ -1,4 +1,4 @@
-<% include('elements/svc_Common.html',
+<& elements/svc_Common.html,
'post_url' => popurl(1). 'process/svc_broadband.cgi',
'name' => 'broadband service',
'table' => 'svc_broadband',
@@ -7,8 +7,7 @@
'dummy' => $cgi->query_string,
'onsubmit' => 'validate_coords',
'html_foot' => $js,
- )
-%>
+&>
<%init>
die "access denied"
@@ -100,9 +99,19 @@
my @fields = (
qw( description ip_addr speed_down speed_up blocknum ),
{ field=>'block_label', type=>'fixed' },
- qw( mac_addr latitude longitude altitude vlan_profile performance_profile authkey plan_id )
+ qw( mac_addr latitude longitude altitude vlan_profile
+ performance_profile authkey plan_id ),
);
+if ( $conf->exists('svc_broadband-radius') ) {
+ push @fields,
+ { field => 'usergroup',
+ type => 'select-radius_group',
+ multiple => 1,
+ }
+}
+
+
my $fixedblock = '';
my $callback = sub {
@@ -116,10 +125,17 @@
my $columndef = $part_svc->part_svc_column($fieldref->{'field'});
if ($columndef->columnflag eq 'F') {
- $fieldref->{'type'} = 'fixed';
+ $fieldref->{'type'} = length($columndef->columnvalue)
+ ? 'fixed'
+ : 'hidden';
$fieldref->{'value'} = $columndef->columnvalue;
$fixedblock = $fieldref->{value}
if $fieldref->{field} eq 'blocknum';
+
+ if ( $fieldref->{field} eq 'usergroup' ) {
+ $fieldref->{'formatted_value'} =
+ [ $object->radius_groups('long_description') ];
+ }
}
if ($object->svcnum) {
Index: svc_acct.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/svc_acct.cgi,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -w -d -r1.81 -r1.82
--- svc_acct.cgi 28 Oct 2011 04:41:35 -0000 1.81
+++ svc_acct.cgi 10 Nov 2011 21:40:05 -0000 1.82
@@ -312,7 +312,7 @@
% } else {
% my $radius_group_selected = '';
% if ( $svc_acct->svcnum ) {
-% $radius_group_selected = join(',',$svc_acct->radius_groups('NUMBERS'));
+% $radius_group_selected = join(',',$svc_acct->radius_groups('groupnum'));
% }
% elsif ( !$svc_acct->svcnum && $part_svc_usergroup->columnflag eq 'D' ) {
% $radius_group_selected = $part_svc_usergroup->columnvalue;
@@ -320,6 +320,7 @@
<TD><& /elements/select-radius_group.html,
curr_value => $radius_group_selected,
element_name => 'radius_usergroup',
+ multiple => 1,
&>
</TD>
% }
More information about the freeside-commits
mailing list