Changeset b34d568 for remit


Ignore:
Timestamp:
Apr 2, 2010, 10:42:06 AM (14 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, client
Children:
e02a4b2
Parents:
23138c0
git-author:
Alex Dehnert <adehnert@…> (04/02/10 10:42:06)
git-committer:
Alex Dehnert <adehnert@…> (04/02/10 10:42:06)
Message:

Only process doc upload when somebody asks for it (Trac: #15)

Location:
remit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • remit/remit_templates/vouchers/ReimbursementRequest_review.html

    rdc17b01 rb34d568  
    8080<table class='pretty-table'>
    8181{{ doc_form.as_table }}
    82 <tr><th colspan='2'><input type='submit' value='Upload Documentation' /></th></tr>
     82<tr><th colspan='2'><input type='submit' name='upload_documentation' value='Upload Documentation' /></th></tr>
    8383</table>
    8484</form>
  • remit/vouchers/views.py

    r0a5a003 rb34d568  
    203203        new_docs = Documentation()
    204204        new_docs.submitter = http_request.user.username
    205         if http_request.method == 'POST': # If the form has been submitted...
     205        if http_request.method == 'POST' and 'upload_documentation' in http_request.REQUEST: # If the form has been submitted...
    206206            doc_upload_form = DocUploadForm(http_request.POST, http_request.FILES, instance=new_docs) # A form bound to the POST data
    207207
Note: See TracChangeset for help on using the changeset viewer.