mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-14 23:08:07 -04:00
Use banners appropriately
We’ve fiddled around with the banners quite a lot in the last few days. This commit reviews some of the older examples and makes sure that they’re: a) not broken b) using the most appropriate banner for the context
This commit is contained in:
@@ -51,5 +51,5 @@ def revoke_api_key(service_id, key_id):
|
|||||||
)
|
)
|
||||||
elif request.method == 'POST':
|
elif request.method == 'POST':
|
||||||
api_key_api_client.revoke_api_key(service_id=service_id, key_id=key_id)
|
api_key_api_client.revoke_api_key(service_id=service_id, key_id=key_id)
|
||||||
flash('‘{}’ was revoked'.format(key_name), 'default')
|
flash('‘{}’ was revoked'.format(key_name), 'default_with_tick')
|
||||||
return redirect(url_for('.api_keys', service_id=service_id))
|
return redirect(url_for('.api_keys', service_id=service_id))
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
{% for category, message in messages %}
|
{% for category, message in messages %}
|
||||||
{{ banner(
|
{{ banner(
|
||||||
message,
|
message,
|
||||||
'default' if category == 'default' or 'default_with_tick' else 'dangerous',
|
'default' if ((category == 'default') or (category == 'default_with_tick')) else 'dangerous',
|
||||||
delete_button="Yes, delete this template" if 'delete' == category else None,
|
delete_button="Yes, delete this template" if 'delete' == category else None,
|
||||||
with_tick=True if category == 'default_with_tick' else False
|
with_tick=True if category == 'default_with_tick' else False
|
||||||
)}}
|
)}}
|
||||||
|
|||||||
@@ -23,9 +23,10 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
{{ banner(
|
{{ banner(
|
||||||
'You can only send notifications to yourself',
|
'You can only send messages to yourself until you <a href="{}">request to go live</a>'.format(
|
||||||
subhead='Trial mode',
|
url_for('.service_request_to_go_live', service_id=service_id)
|
||||||
type='info'
|
)|safe,
|
||||||
|
type='important'
|
||||||
) }}
|
) }}
|
||||||
|
|
||||||
<h2 class="api-key-name">
|
<h2 class="api-key-name">
|
||||||
|
|||||||
@@ -51,6 +51,8 @@
|
|||||||
type='tip'
|
type='tip'
|
||||||
)}}
|
)}}
|
||||||
|
|
||||||
|
{{ banner('You could go to jail', 'important')}}
|
||||||
|
|
||||||
<h2 class="heading-large">Big number</h2>
|
<h2 class="heading-large">Big number</h2>
|
||||||
|
|
||||||
<p>Used to show some important statistics.</p>
|
<p>Used to show some important statistics.</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user