diff options
author | khoff <khoff> | 2003-08-05 00:20:51 +0000 |
---|---|---|
committer | khoff <khoff> | 2003-08-05 00:20:51 +0000 |
commit | 58d44fbe5eb9ab32e6d87063a4a3b22ddba9a828 (patch) | |
tree | edf14524361cd9cf59c673dc85e85d130a979283 /httemplate/view/svc_acct.cgi | |
parent | f2ffe6fc096fa59b1931da531b7a40b78cd6b747 (diff) |
Virtual field merge
Diffstat (limited to 'httemplate/view/svc_acct.cgi')
-rwxr-xr-x | httemplate/view/svc_acct.cgi | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/httemplate/view/svc_acct.cgi b/httemplate/view/svc_acct.cgi index 599c1d8b9..4e01db341 100755 --- a/httemplate/view/svc_acct.cgi +++ b/httemplate/view/svc_acct.cgi @@ -172,7 +172,7 @@ if ($svc_acct->slipip) { : $svc_acct->slipip ). "</TD>"; my($attribute); - foreach $attribute ( grep /^radius_/, fields('svc_acct') ) { + foreach $attribute ( grep /^radius_/, $svc_acct->fields ) { #warn $attribute; $attribute =~ /^radius_(.*)$/; my $pattribute = $FS::raddb::attrib{$1}; @@ -180,7 +180,7 @@ if ($svc_acct->slipip) { "<TD BGCOLOR=\"#ffffff\">". $svc_acct->getfield($attribute). "</TD></TR>"; } - foreach $attribute ( grep /^rc_/, fields('svc_acct') ) { + foreach $attribute ( grep /^rc_/, $svc_acct->fields ) { #warn $attribute; $attribute =~ /^rc_(.*)$/; my $pattribute = $FS::raddb::attrib{$1}; @@ -195,7 +195,19 @@ if ($svc_acct->slipip) { print '<TR><TD ALIGN="right">RADIUS groups</TD><TD BGCOLOR="#ffffff">'. join('<BR>', $svc_acct->radius_groups). '</TD></TR>'; -print '</TABLE></TD></TR></TABLE><BR><BR>'; +# Can this be abstracted further? Maybe a library function like +# widget('HTML', 'view', $svc_acct) ? It would definitely make UI +# style management easier. + +foreach (sort { $a cmp $b } $svc_acct->virtual_fields) { + print $svc_acct->pvf($_)->widget('HTML', 'view', $svc_acct->getfield($_)), + "\n"; +} +%> +</TABLE></TD></TR></TABLE> +<% + +print '<BR><BR>'; print join("\n", $conf->config('svc_acct-notes') ). '<BR><BR>'. joblisting({'svcnum'=>$svcnum}, 1). '</BODY></HTML>'; |