diff options
author | Mark Wells <mark@freeside.biz> | 2013-09-04 12:53:30 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2013-09-04 12:53:38 -0700 |
commit | 00de593a7e5b5b50aeec62c0ddb90db7bcd62f55 (patch) | |
tree | a600ff4184a41d22362c6b8cdfef7e1e47688b7d /httemplate/view | |
parent | 36ad5e538cb56de33c779e34baf9abdf63c4312e (diff) |
assign entire address blocks to services for RADIUS Framed-Route option, #20742
Diffstat (limited to 'httemplate/view')
-rw-r--r-- | httemplate/view/elements/svc_Common.html | 14 | ||||
-rw-r--r-- | httemplate/view/svc_acct/basics.html | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/httemplate/view/elements/svc_Common.html b/httemplate/view/elements/svc_Common.html index 02484341b..bc1cd45fc 100644 --- a/httemplate/view/elements/svc_Common.html +++ b/httemplate/view/elements/svc_Common.html @@ -214,6 +214,20 @@ if ($pkgnum) { $custnum = ''; } +# attached routers +if ( my $router = qsearchs('router', { svcnum => $svc_x->svcnum }) ) { + push @$fields, qw(router_routername router_block); + $labels->{'router_routername'} = 'Attached router'; + $labels->{'router_block'} = 'Attached address block'; + $svc_x->set('router_routername', $router->routername); + my $block = qsearchs('addr_block', { routernum => $router->routernum }); + if ( $block ) { + $svc_x->set('router_block', $block->cidr); + } else { + $svc_x->set('router_block', '<i>(none)</i>'); + } +} + &{ $opt{'svc_callback'} }( $cgi, $svc_x, $part_svc, $cust_pkg, $fields, \%opt ) if $opt{'svc_callback'}; </%init> diff --git a/httemplate/view/svc_acct/basics.html b/httemplate/view/svc_acct/basics.html index 04e7bcff8..441c20add 100644 --- a/httemplate/view/svc_acct/basics.html +++ b/httemplate/view/svc_acct/basics.html @@ -152,6 +152,8 @@ sub slipip { <& /view/elements/tr.html, label=>mt('RADIUS groups'), value=>join('<BR>', $svc_acct->radius_groups('long_description')) &> +<& router.html, 'svc_acct' => $svc_acct &> + %# Can this be abstracted further? Maybe a library function like %# widget('HTML', 'view', $svc_acct) ? It would definitely make UI %# style management easier. |