]> asedeno.scripts.mit.edu Git - bluechips.git/blobdiff - bluechips/templates/transfer/index.mako
We have pie charts.
[bluechips.git] / bluechips / templates / transfer / index.mako
index 144cf91090120dbe4fba9d319862c6cf12ae6f4d..0ef4c8dcdce4632e9e18e72ae7cb77e833ca1524 100644 (file)
@@ -1,6 +1,7 @@
 <%inherit file="/base.mako"/>
 
 <form action="${h.url_for(controller='transfer', action='update', id=c.transfer.id)}" method="post">
+  ${h.auth_token_hidden_field()}
   <table class="form">
     <tr>
       <th><label for="debtor_id">From</label></th>
@@ -12,7 +13,7 @@
     </tr>
     <tr>
       <th><label for="amount">Amount</label></th>
-      <td>$${h.text('amount', "%0.2f" % (int(c.transfer.amount) / 100.0), size=8)}</td>
+      <td>${h.currency('amount', c.transfer.amount, size=8)}</td>
     </tr>
     <tr>
       <th><label for="date">Date</label></th>
       <td>${h.text('description', c.transfer.description, size=64)}</td>
     </tr>
     <tr>
+      <td></td>
       <td colspan="2">
         <input type="submit" value="Submit" />
+        %if c.transfer.id:
+       <input type="button" value="Delete" onClick="window.location.href='${h.url_for(controller='transfer', action='delete', id=c.transfer.id)}'">
+       %endif
       </td>
     </tr>
   </table>