From bc392247350c4a124c8835f18dd19154ac343e9d Mon Sep 17 00:00:00 2001 From: jeff Date: Tue, 5 Dec 2006 02:37:14 +0000 Subject: editable service usage --- httemplate/edit/svc_acct.cgi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'httemplate/edit/svc_acct.cgi') diff --git a/httemplate/edit/svc_acct.cgi b/httemplate/edit/svc_acct.cgi index 097e8c262..f552967e7 100755 --- a/httemplate/edit/svc_acct.cgi +++ b/httemplate/edit/svc_acct.cgi @@ -3,6 +3,8 @@ %my $conf = new FS::Conf; %my @shells = $conf->config('shells'); % +%my $curuser = $FS::CurrentUser::CurrentUser; +% %my($svcnum, $pkgnum, $svcpart, $part_svc, $svc_acct, @groups); %if ( $cgi->param('error') ) { % @@ -383,6 +385,24 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %>
% } % +% if ( $curuser->access_right('Edit usage') ) { +% my %label = ( seconds => 'Seconds', +% upbytes => 'Upload bytes', +% downbytes => 'Download bytes', +% totalbytes => 'Total bytes', +% ); +% foreach my $uf (keys %label) { +% my $tf = $uf . "_threshold"; +% if ( $svc_acct->$tf ne '' ) { + + + <% $label{$uf} %> remaining + + +% } +% } +% } +% %foreach my $r ( grep { /^r(adius|[cr])_/ } fields('svc_acct') ) { % $r =~ /^^r(adius|[cr])_(.+)$/ or next; #? % my $a = $2; -- cgit v1.2.1