stripe: Use context managers for error handling in cgi
[hcoop/portal.git] / quota.mlt
index f99441a..2b80f1c 100644 (file)
--- a/quota.mlt
+++ b/quota.mlt
@@ -144,10 +144,10 @@ elseif $"mod" <> "" then
 <form method="post">
 
 <table>
-<tr> <th>Volume</th> <th>Used (kB)</th> <th>Quota now (kB)</th> <th>Requested quota (kB)</th> </tr>
+  <tr> <th>Volume</th> <th>Used</th> <th>Current Quota</th> <th>Requested Quota (kB)</th> </tr>
 <% foreach vol in Quotas.getQuotas (Init.getUserName ()) do %>
-   <tr> <td><% #vol vol %></td> <td><% #used vol %></td> <td><% #quota vol %></td>
-   <td><input name="<% #vol vol %>" value="<% #quota vol %>"></td> </tr>
+   <tr> <td><% #vol vol %></td> <td><% #used vol %> kB (<% (#used vol) / 1024 %> MiB)</td> <td><% #quota vol %> kB (<% (# quota vol) / 1024 %> MiB)</td>
+   <td><input name="<% #vol vol %>" value="<% #quota vol %>" pattern="\\d+"></td> </tr>
 <% end %>
 </table>