summaryrefslogtreecommitdiff
path: root/httemplate/view/svc_acct/basics.html
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2012-10-30 12:16:17 -0700
committerMark Wells <mark@freeside.biz>2012-10-30 12:16:17 -0700
commit87f255507af9f14dfbccd37eefd71a148f9af344 (patch)
tree7467e87ff6a27cdbe67fa60f4261e2d07a61f4b7 /httemplate/view/svc_acct/basics.html
parentd77fe06b27410a41855e1425114ab8d9cdae4ff0 (diff)
IP address management for svc_acct, #19567
Diffstat (limited to 'httemplate/view/svc_acct/basics.html')
-rw-r--r--httemplate/view/svc_acct/basics.html26
1 files changed, 20 insertions, 6 deletions
diff --git a/httemplate/view/svc_acct/basics.html b/httemplate/view/svc_acct/basics.html
index 1cdf77615..2d9953fcc 100644
--- a/httemplate/view/svc_acct/basics.html
+++ b/httemplate/view/svc_acct/basics.html
@@ -91,15 +91,29 @@
% }
+<%perl>
+# minor false laziness w/ view/svc_broadband.cgi
+sub slipip {
+ my $svc_acct = shift;
+ my $out = $svc_acct->slipip or return '';
+ if ( $out eq '0.0.0.0' or $out eq '0e0' ) {
+ return '<I>('.mt('Dynamic').'</I>';
+ }
+ $out .= ' ('.
+ include('/elements/popup_link-ping.html', ip => $svc_acct->slipip).
+ ')';
+ if ( my $addr_block = $svc_acct->addr_block ) {
+ $out .= '<br>Netmask: ' . $addr_block->NetAddr->mask .
+ '<br>Gateway: ' . $addr_block->ip_gateway;
+ }
+ $out;
+}
+</%perl>
+
% if ($svc_acct->slipip) {
<& /view/elements/tr.html,
label=>mt('IP address'),
- value=> ( $svc_acct->slipip eq "0.0.0.0" || $svc_acct->slipip eq '0e0' )
- ? "<I>(".mt('Dynamic').")</I>"
- : $svc_acct->slipip. ' '.
- include('/elements/popup_link-ping.html',
- 'ip'=>$svc_acct->slipip,
- )
+ value=> slipip($svc_acct)
&>
% }