ACLs
[freeside.git] / httemplate / edit / process / prepay_credit.cgi
index ba42969..24ce256 100644 (file)
@@ -19,6 +19,7 @@
 %$hashref->{seconds}   = $cgi->param('seconds') * $cgi->param('multiplier');
 %$hashref->{upbytes}   = $cgi->param('upbytes') * $cgi->param('upmultiplier');
 %$hashref->{downbytes} = $cgi->param('downbytes') * $cgi->param('downmultiplier');
+%$hashref->{totalbytes} = $cgi->param('totalbytes') * $cgi->param('totalmultiplier');
 %
 %$error ||= FS::prepay_credit::generate( $num,
 %                                        scalar($cgi->param('type')), 
@@ -35,8 +36,7 @@
 
 
 <% include("/elements/header.html", "$num prepaid cards generated".
-              ( $agent ? ' for '.$agent->agent : '' ),
-            menubar( 'Main menu' => popurl(3) )
+              ( $agent ? ' for '.$agent->agent : '' )
           )
 %>
 
@@ -48,8 +48,9 @@
   <% $hashref->{amount} ? sprintf('$%.2f', $hashref->{amount} ) : '' %>
   <% $hashref->{amount} && $hashref->{seconds} ? 'and' : '' %>
   <% $hashref->{seconds} ? duration_exact($hashref->{seconds}) : '' %>
-  <% $hashref->{upbytes}   ? FS::UI::Web::bytecount_unexact($hashref->{upbytes}) : '' %>
-  <% $hashref->{downbytes} ? FS::UI::Web::bytecount_unexact($hashref->{downbytes}) : '' %>
+  <% $hashref->{upbytes}   ? FS::UI::bytecount::bytecount_unexact($hashref->{upbytes}) : '' %>
+  <% $hashref->{downbytes} ? FS::UI::bytecount::bytecount_unexact($hashref->{downbytes}) : '' %>
+  <% $hashref->{totalbytes} ? FS::UI::bytecount::bytecount_unexact($hashref->{totalbytes}) : '' %>
   <br>
 % } 
 
@@ -58,4 +59,9 @@
 
 </BODY></HTML>
 % } 
+<%init>
 
+die "access denied"
+  unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+
+</%init>