diff options
author | jeff <jeff> | 2006-12-05 02:37:14 +0000 |
---|---|---|
committer | jeff <jeff> | 2006-12-05 02:37:14 +0000 |
commit | bc392247350c4a124c8835f18dd19154ac343e9d (patch) | |
tree | dd4f27ebfbfa764c71ca56d612a011c2771c39ba /httemplate/edit/svc_acct.cgi | |
parent | 5cb3aee153f8fd73defe6bfceef5983241739348 (diff) |
editable service usage
Diffstat (limited to 'httemplate/edit/svc_acct.cgi')
-rwxr-xr-x | httemplate/edit/svc_acct.cgi | 20 |
1 files changed, 20 insertions, 0 deletions
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 ? "<B>$svcnum</B>" : " (NEW)" %><BR> </TR> % } % +% 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 '' ) { + + <TR> + <TD ALIGN="right"><% $label{$uf} %> remaining</TD> + <TD><INPUT TYPE="text" NAME="<% $uf %>" VALUE="<% $svc_acct->$uf %>"></TD> + </TR> +% } +% } +% } +% %foreach my $r ( grep { /^r(adius|[cr])_/ } fields('svc_acct') ) { % $r =~ /^^r(adius|[cr])_(.+)$/ or next; #? % my $a = $2; |