X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=bluechips%2Ftemplates%2Fspend%2Findex.mako;h=1b0c6e3c493279f5f25c78ea4b96fcd7a8804582;hb=676525652294d9665eb22ee98be35d7e35d81cd7;hp=390199d80c5d37e997524cd6464557192002cc4f;hpb=9c702e4826bdb9e540f8768e8d96c3b874b84eae;p=bluechips.git diff --git a/bluechips/templates/spend/index.mako b/bluechips/templates/spend/index.mako index 390199d..1b0c6e3 100644 --- a/bluechips/templates/spend/index.mako +++ b/bluechips/templates/spend/index.mako @@ -1,7 +1,46 @@ <%inherit file="/base.mako"/> -<%def name="title()">${parent.title()} :: Add a New Expenditure +
+ ${h.auth_token_hidden_field()} + + + + + + + + + + + + + + + + + +
${h.select('spender_id', c.expenditure.spender_id, c.users)}
${h.currency('amount', c.expenditure.amount, size=8)}
${h.text('date', c.expenditure.date.strftime('%m/%d/%Y'), size=16, class_='datepicker')}
${h.text('description', c.expenditure.description, size=64)}
-<%namespace name="forms" module="bluechips.widgets.spend" /> +

Change how an expenditure is split up. Enter a percentage, or something like a percentage, for each user. They don't have to add to 100.

-${forms.new_spend_form(action=h.url_for(action='new'))} + + % for ii, user_row in enumerate(c.users): + <% + user_id, user = user_row + percent = c.values['shares-%d.amount' % ii] + %> + + + + + % endfor + + + +
+ ${h.text('shares-%d.amount' % ii, percent)} + ${h.hidden('shares-%d.user_id' % ii, user.id)} +
+ ${h.submit(None, 'Submit', class_="submitbutton")} +
+