filter and display login notifications by type

This commit is contained in:
dandds 2018-12-10 13:25:47 -05:00
parent eeb8e5f328
commit 03d7d0fac0
2 changed files with 15 additions and 2 deletions

View File

@ -1,6 +1,10 @@
{% from "components/alert.html" import Alert %}
{% with messages = get_flashed_messages(with_categories=true) %}
{% if not category_filter %}
{% set category_filter=["success", "info", "warning", "error"] %}
{% endif %}
{% with messages = get_flashed_messages(with_categories=true, category_filter=category_filter) %}
{% if messages %}
{% for category, message_config in messages %}
{{ Alert(message_config["title"], message=message_config.get("message"), level=category) }}

View File

@ -11,6 +11,12 @@
<div class='col'>
<div class='login-banner'>
{% with %}
{% set category_filter=["error"] %}
{% include "fragments/flash.html" %}
{% endwith %}
<h1 class="login-banner__heading">Access the JEDI Cloud</h1>
<img class="login-banner__logo" src="{{url_for('static', filename='img/ccpo-logo.svg')}}" alt="Cloud Computing Program Office Logo">
@ -18,7 +24,10 @@
<a class="usa-button usa-button-big login-banner__button" href='{{ redirect_url }}'><span>Sign in with CAC</span></a>
</div>
{% include "fragments/flash.html" %}
{% with %}
{% set category_filter=["success", "info", "warning"] %}
{% include "fragments/flash.html" %}
{% endwith %}
{{ Alert('Certificate Selection',
message='When you are prompted to select a certificate, please select <strong>E-mail Certificate</strong> from the provided choices.',