summaryrefslogtreecommitdiff
path: root/httemplate/view
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-09-04 12:53:30 -0700
committerMark Wells <mark@freeside.biz>2013-09-04 12:53:38 -0700
commit00de593a7e5b5b50aeec62c0ddb90db7bcd62f55 (patch)
treea600ff4184a41d22362c6b8cdfef7e1e47688b7d /httemplate/view
parent36ad5e538cb56de33c779e34baf9abdf63c4312e (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.html14
-rw-r--r--httemplate/view/svc_acct/basics.html2
2 files changed, 16 insertions, 0 deletions
diff --git a/httemplate/view/elements/svc_Common.html b/httemplate/view/elements/svc_Common.html
index 0248434..bc1cd45 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 04e7bcf..441c20a 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.