Fix typos in budget editor
This commit is contained in:
parent
e49d2d963a
commit
2936433689
@ -306,14 +306,14 @@ def budget_action(request, budget, revision):
|
|||||||
emailer.send_mail([user.email], 'Budget submitted: {} (BU-{})'.format(revision.name, budget.id), 'sstreasury/email/budget_submitted_drafter.md', {'revision': revision})
|
emailer.send_mail([user.email], 'Budget submitted: {} (BU-{})'.format(revision.name, budget.id), 'sstreasury/email/budget_submitted_drafter.md', {'revision': revision})
|
||||||
|
|
||||||
if 'Withdraw' in actions:
|
if 'Withdraw' in actions:
|
||||||
if not revision.can_withdraw(user):
|
if not revision.can_withdraw(request.user):
|
||||||
raise PermissionDenied
|
raise PermissionDenied
|
||||||
|
|
||||||
with transaction.atomic():
|
with transaction.atomic():
|
||||||
revision.update_state(request.user, models.BudgetState.DRAFT)
|
revision.update_state(request.user, models.BudgetState.DRAFT)
|
||||||
|
|
||||||
if 'Endorse' in actions:
|
if 'Endorse' in actions:
|
||||||
if not revision.can_endorse(user):
|
if not revision.can_endorse(request.user):
|
||||||
raise PermissionDenied
|
raise PermissionDenied
|
||||||
|
|
||||||
with transaction.atomic():
|
with transaction.atomic():
|
||||||
@ -326,7 +326,7 @@ def budget_action(request, budget, revision):
|
|||||||
emailer.send_mail([user.email], 'Budget endorsed, awaiting committee approval: {} (BU-{})'.format(revision.name, budget.id), 'sstreasury/email/budget_endorsed_drafter.md', {'revision': revision})
|
emailer.send_mail([user.email], 'Budget endorsed, awaiting committee approval: {} (BU-{})'.format(revision.name, budget.id), 'sstreasury/email/budget_endorsed_drafter.md', {'revision': revision})
|
||||||
|
|
||||||
if 'Return' in actions:
|
if 'Return' in actions:
|
||||||
if not revision.can_return(user):
|
if not revision.can_return(request.user):
|
||||||
raise PermissionDenied
|
raise PermissionDenied
|
||||||
|
|
||||||
with transaction.atomic():
|
with transaction.atomic():
|
||||||
@ -337,7 +337,7 @@ def budget_action(request, budget, revision):
|
|||||||
emailer.send_mail([user.email], 'Action required: Budget returned for re-drafting: {} (BU-{})'.format(revision.name, budget.id), 'sstreasury/email/budget_returned.md', {'revision': revision})
|
emailer.send_mail([user.email], 'Action required: Budget returned for re-drafting: {} (BU-{})'.format(revision.name, budget.id), 'sstreasury/email/budget_returned.md', {'revision': revision})
|
||||||
|
|
||||||
if 'Approve' in actions:
|
if 'Approve' in actions:
|
||||||
if not revision.can_approve(user):
|
if not revision.can_approve(request.user):
|
||||||
return PermissionDenied
|
return PermissionDenied
|
||||||
|
|
||||||
with transaction.atomic():
|
with transaction.atomic():
|
||||||
@ -348,7 +348,7 @@ def budget_action(request, budget, revision):
|
|||||||
emailer.send_mail([user.email], 'Budget approved: {} (BU-{})'.format(revision.name, budget.id), 'sstreasury/email/budget_approved.md', {'revision': revision})
|
emailer.send_mail([user.email], 'Budget approved: {} (BU-{})'.format(revision.name, budget.id), 'sstreasury/email/budget_approved.md', {'revision': revision})
|
||||||
|
|
||||||
if 'CmteReturn' in actions:
|
if 'CmteReturn' in actions:
|
||||||
if not revision.can_cmtereturn(user):
|
if not revision.can_cmtereturn(request.user):
|
||||||
return PermissionDenied
|
return PermissionDenied
|
||||||
|
|
||||||
with transaction.atomic():
|
with transaction.atomic():
|
||||||
|
Loading…
Reference in New Issue
Block a user