[freeside-commits] freeside/httemplate/edit svc_acct.cgi,1.42,1.43
Jeff Finucane,420,,
jeff at wavetail.420.am
Mon Dec 4 18:37:16 PST 2006
Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail:/tmp/cvs-serv17993/httemplate/edit
Modified Files:
svc_acct.cgi
Log Message:
editable service usage
Index: svc_acct.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/svc_acct.cgi,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- svc_acct.cgi 25 Oct 2006 02:22:33 -0000 1.42
+++ svc_acct.cgi 5 Dec 2006 02:37:13 -0000 1.43
@@ -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 @@
</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;
More information about the freeside-commits
mailing list