Changeset 56c7337 for remit/vouchers
- Timestamp:
- Jul 7, 2014, 10:07:17 PM (11 years ago)
- Branches:
- master
- Children:
- 638b547
- Parents:
- 80d8926
- git-author:
- Alex Dehnert <adehnert@…> (07/07/14 22:07:17)
- git-committer:
- Alex Dehnert <adehnert@…> (07/07/14 22:07:17)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
remit/vouchers/views.py
r2b31097 r56c7337 261 261 show_approve = (http_request.user.has_perm('vouchers.can_approve') 262 262 and request_obj.approval_status == vouchers.models.APPROVAL_STATE_PENDING) 263 post_approve = (http_request.method == 'POST' and 'approve' in http_request.REQUEST) 263 264 if show_approve: 264 265 # Voucherize form … … 272 273 273 274 approve_message = '' 274 if http_request.method == 'POST' and 'approve' in http_request.REQUEST:275 if post_approve: 275 276 approve_form = VoucherizeForm(http_request.POST) 276 277 if approve_form.is_valid(): … … 293 294 context['approve_form'] = approve_form 294 295 context['approve_message'] = approve_message 296 elif post_approve: 297 context['approve_error'] = "You attempted to approve a reimbursement request that you could not approve. Most likely, either the voucher has already been approved, or you do not have adequate permissions." 295 298 if show_email: 296 299 context['email_options'] = email_options
Note: See TracChangeset
for help on using the changeset viewer.