diff --git a/app/assets/stylesheets/components/banner.scss b/app/assets/stylesheets/components/banner.scss index 3422f7fd3..92837983a 100644 --- a/app/assets/stylesheets/components/banner.scss +++ b/app/assets/stylesheets/components/banner.scss @@ -3,14 +3,14 @@ .banner-default { @include core-19; - background: $govuk-blue; - color: $white; + color: $text-colour; display: block; padding: $gutter-half; margin: $gutter-half 0 $gutter 0; text-align: left; position: relative; clear: both; + border: 5px solid $button-colour; &-title { @include bold-24; @@ -29,9 +29,9 @@ %banner-with-tick, .banner-with-tick { padding: $gutter-half ($gutter + $gutter-half); - background-image: file-url('tick-white.png'); + background-image: file-url('tick.png'); @include ie-lte(8) { - background-image: file-url('tick-white-16px.png'); + background-image: file-url('tick-16px.png'); } background-size: 19px; background-repeat: no-repeat; @@ -49,7 +49,7 @@ @extend %banner; @include bold-19; background: $white; - color: $error-colour; + color: $text-colour; border: 5px solid $error-colour; margin: 15px 0; text-align: left; @@ -160,7 +160,7 @@ background: $yellow; color: $text-colour; border: 5px solid $text-colour; - margin: $gutter 0 $gutter 0; + margin: $gutter-half 0 $gutter 0; text-align: left; padding: 20px; diff --git a/app/main/views/api_keys.py b/app/main/views/api_keys.py index ee832bfb3..d12cf3629 100644 --- a/app/main/views/api_keys.py +++ b/app/main/views/api_keys.py @@ -110,8 +110,9 @@ def revoke_api_key(service_id, key_id): key_name = api_key_api_client.get_api_keys(service_id=service_id, key_id=key_id)['apiKeys'][0]['name'] if request.method == 'GET': return render_template( - 'views/api/keys/revoke.html', - key_name=key_name + 'views/api/keys.html', + revoke_key=key_name, + keys=api_key_api_client.get_api_keys(service_id=service_id)['apiKeys'], ) elif request.method == 'POST': api_key_api_client.revoke_api_key(service_id=service_id, key_id=key_id) diff --git a/app/main/views/templates.py b/app/main/views/templates.py index f2b0f5727..892f570d6 100644 --- a/app/main/views/templates.py +++ b/app/main/views/templates.py @@ -428,22 +428,24 @@ def delete_service_template(service_id, template_id): last_used_notification = template_statistics_client.get_template_statistics_for_template( service_id, template['id'] ) - message = '{} was last used {} ago'.format( - last_used_notification['template']['name'], + message = 'It was last used {} ago.'.format( get_human_readable_delta( parse(last_used_notification['created_at']).replace(tzinfo=None), - datetime.utcnow()) + datetime.utcnow() + ) ) except HTTPError as e: if e.status_code == 404: - message = '{} has never been used'.format(template['name']) + message = None else: raise e - flash('{}. Are you sure you want to delete it?'.format(message), 'delete') - return render_template( 'views/templates/template.html', + template_delete_confirmation_message=( + 'Are you sure you want to delete {}?'.format(template['name']), + message, + ), template=get_template( template, current_service, diff --git a/app/templates/components/banner.html b/app/templates/components/banner.html index a21984b25..d797525d4 100644 --- a/app/templates/components/banner.html +++ b/app/templates/components/banner.html @@ -7,7 +7,7 @@ {% endif %} > {% if subhead -%} - {{ subhead }} +
+ ‘{{ revoke_key }}’ will no longer let you connect to GOV.UK Notify. +
+ + {% endcall %}- ‘{{ key_name }}’ will no longer let you connect to GOV.UK Notify. -
-- You can’t undo this. -
- - - -{% endblock %} diff --git a/app/templates/views/dashboard/no-permissions-banner.html b/app/templates/views/dashboard/no-permissions-banner.html index c51a0c61e..fdc8ad68c 100644 --- a/app/templates/views/dashboard/no-permissions-banner.html +++ b/app/templates/views/dashboard/no-permissions-banner.html @@ -1,5 +1,6 @@ {% from "components/banner.html" import banner_wrapper %} -{% call banner_wrapper(type="default") %} - You only have permission to view this service +{% call banner_wrapper(type="warning") %} + You only have permission to view this service. To send messages, edit + templates or manage team members, contact the person who invited you. {% endcall %} diff --git a/app/templates/views/templates/template.html b/app/templates/views/templates/template.html index fb98e8a90..66142db28 100644 --- a/app/templates/views/templates/template.html +++ b/app/templates/views/templates/template.html @@ -27,10 +27,24 @@ {% endcall %}+ {{ template_delete_confirmation_message[1] }} +
+ {% endif %} + + {% endcall %} +