Add link to cancel letters

Added a link to cancel letters from the letter notification pages if the
letter is still able to be cancelled. Clicking on this link will show a
confirmation box, and will then cancel the letter if the user confirms.
This commit is contained in:
Katie Smith
2018-12-05 10:58:27 +00:00
parent 429a23934d
commit 5406efa0cc
6 changed files with 173 additions and 3 deletions

View File

@@ -6,7 +6,7 @@
{{ banner(
message if message is string else message[0],
'default' if ((category == 'default') or (category == 'default_with_tick')) else 'dangerous',
delete_button="Yes, {}".format(category) if category in ['delete', 'suspend', 'resume', 'remove', 'revoke this API key'] else None,
delete_button="Yes, {}".format(category) if category in ['cancel', 'delete', 'suspend', 'resume', 'remove', 'revoke this API key'] else None,
with_tick=True if category == 'default_with_tick' else False,
context=message[1] if message is not string
)}}