Skip to content

Commit 408ec71

Browse files
committed
Fix: alert message appearing twice
Removed duplicate warning message and styled the message that is kept
1 parent 4572f34 commit 408ec71

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

app/views/admin/chapters/organisers/index.html.haml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
.container.py-4.py-lg-5.organisers
2-
- if flash[:notice]
3-
.alert.alert-success= flash[:notice]
4-
- if flash[:alert]
5-
.alert.alert-danger= flash[:alert]
62
.row.mb-4
73
.col
84
%h1

app/views/layouts/_messages.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
- unless (name.eql?('notice') && @suppress_notices) || (name.eql?('warning') && @suppress_warnings)
33
- name = name.eql?('notice') ? 'info' : name
44
- if msg.is_a?(String)
5-
.alert.alert-dismissible.fade.show.mb-0{ 'data-alert': '', class: "alert-#{name}", role: 'alert' }
5+
.alert.alert-dismissible.fade.show.mb-0.text-center.bg-warning{ 'data-alert': '', class: "alert-#{name}", role: 'alert' }
66
= content_tag :div, msg.html_safe
77
%button.btn-close{ type: 'button', 'data-bs-dismiss': 'alert', 'aria-label': 'Close' }
88
- elsif msg.is_a?(Array)

0 commit comments

Comments
 (0)