mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-09 10:54:11 -04:00
Make deletion confirmation banner messages consistent across our app
Also introduce a way to provide context to a banner / flash message that will be displayed in plain font style.
This commit is contained in:
@@ -130,9 +130,12 @@ def create_api_key(service_id):
|
||||
def revoke_api_key(service_id, key_id):
|
||||
key_name = current_service.get_api_key(key_id)['name']
|
||||
if request.method == 'GET':
|
||||
flash([
|
||||
"Are you sure you want to revoke this API key?",
|
||||
"‘{}’ will no longer let you connect to GOV.UK Notify.".format(key_name)
|
||||
], 'revoke')
|
||||
return render_template(
|
||||
'views/api/keys.html',
|
||||
revoke_key=key_name,
|
||||
)
|
||||
elif request.method == 'POST':
|
||||
api_key_api_client.revoke_api_key(service_id=service_id, key_id=key_id)
|
||||
|
||||
Reference in New Issue
Block a user