diff options
author | mark <mark> | 2011-11-10 21:40:05 +0000 |
---|---|---|
committer | mark <mark> | 2011-11-10 21:40:05 +0000 |
commit | 307a7d85568a15f5eb0d97c648507484108fcc56 (patch) | |
tree | 22e4da31ad00e299cea5dbf983234f839f17225b /httemplate/edit/svc_broadband.cgi | |
parent | cfbfa38f73888ee2c073ad7500c1fe147cde1c81 (diff) |
RADIUS groups for svc_broadband, #14695
Diffstat (limited to 'httemplate/edit/svc_broadband.cgi')
-rw-r--r-- | httemplate/edit/svc_broadband.cgi | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/httemplate/edit/svc_broadband.cgi b/httemplate/edit/svc_broadband.cgi index a67f6f05a..d4baf35a0 100644 --- a/httemplate/edit/svc_broadband.cgi +++ b/httemplate/edit/svc_broadband.cgi @@ -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 @@ END 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 $callback = sub { 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) { |