Skip to content

Commit 73b8973

Browse files
authored
close announcements per session (#6722)
1 parent 15f83e2 commit 73b8973

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

kitsune/sumo/jinja2/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
{% call announcement_bar('geoip-suggestion', 'warning', close_memory="remember", close_type="remove") %}{% endcall %}
105105

106106
{% for announ in get_announcements(request) %}
107-
{% call announcement_bar(announ.id, 'warning') %}
107+
{% call announcement_bar(announ.id, 'warning', close_memory="session") %}
108108
{{ announ.content | wiki_to_html }}
109109
{% endcall %}
110110
{% endfor %}

kitsune/sumo/jinja2/includes/common_macros.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,8 @@ <h4 class="mzp-c-menu-item-title">{{ _('Inbox') }}</h4>
894894
{% endcall %}
895895
#}
896896
{% macro announcement_bar(id, level, close_memory="", close_type="") -%}
897-
<div id="announce-{{ id }}" class="mzp-c-notification-bar mzp-t-{{ level }}">
897+
<div id="announce-{{ id }}" class="mzp-c-notification-bar mzp-t-{{ level }}"
898+
{% if close_memory %}data-close-initial="hidden"{% endif %}>
898899
<button class="mzp-c-notification-bar-button close-button" data-close-id="announce-{{ id }}" type="button"
899900
{% if close_memory %}data-close-memory="{{ close_memory }}" {% endif %}
900901
{% if close_type %}data-close-type="{{ close_type }}" {% endif %}>

0 commit comments

Comments
 (0)