]> asedeno.scripts.mit.edu Git - bluechips.git/blobdiff - bluechips/templates/transfer/index.mako
ripped out toscawidgets, replaced with formencode, put split editing on main expendit...
[bluechips.git] / bluechips / templates / transfer / index.mako
index 07079736b5b4ae8fecd69da3fd78b176f732bca0..144cf91090120dbe4fba9d319862c6cf12ae6f4d 100644 (file)
@@ -1,7 +1,37 @@
 <%inherit file="/base.mako"/>
 
-<%!
-import bluechips.widgets.transfer as forms
-%>
-
-${forms.new_transfer_form(c.transfer, action=h.url_for(action='update')) | n}
+<form action="${h.url_for(controller='transfer', action='update', id=c.transfer.id)}" method="post">
+  <table class="form">
+    <tr>
+      <th><label for="debtor_id">From</label></th>
+      <td>${h.select('debtor_id', c.transfer.debtor_id, c.users)}</td>
+    </tr>
+    <tr>
+      <th><label for="creditor_id">To</label></th>
+      <td>${h.select('creditor_id', c.transfer.creditor_id, c.users)}</td>
+    </tr>
+    <tr>
+      <th><label for="amount">Amount</label></th>
+      <td>$${h.text('amount', "%0.2f" % (int(c.transfer.amount) / 100.0), size=8)}</td>
+    </tr>
+    <tr>
+      <th><label for="date">Date</label></th>
+      <%
+        if c.transfer.date is None:
+            date_string = ''
+        else:
+            date_string = c.transfer.date.strftime('%m/%d/%Y')
+      %>
+      <td>${h.text('date', date_string, size=16, class_='datepicker')}</td>
+    </tr>
+    <tr>
+      <th><label for="description">Description</label></th>
+      <td>${h.text('description', c.transfer.description, size=64)}</td>
+    </tr>
+    <tr>
+      <td colspan="2">
+        <input type="submit" value="Submit" />
+      </td>
+    </tr>
+  </table>
+</form>