Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

success flash messages -notice- is replaced by toast success message

bsatarnejad49a4fb80e2d6
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 9dcee8f0916..692bc12bddf 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -130,9 +130,12 @@ module ApplicationHelper
end
def render_flash_message(type, message, html_options = {})
+ if type.to_s == 'notice'
+ type = 'success'
+ end
toast_css_classes = ["op-toast -#{type}", html_options.delete(:class)]
# Add autohide class to notice flashes if configured
- if type.to_s == 'notice' && User.current.pref.auto_hide_popups?
+ if type.to_s == 'success' && User.current.pref.auto_hide_popups?
toast_css_classes << 'autohide-toaster'
end
html_options = { class: toast_css_classes.join(' '), role: 'alert' }.merge(html_options)
diff --git a/frontend/src/global_styles/content/_toast.sass b/frontend/src/global_styles/content/_toast.sass
index 86485d7dd36..77698190800 100644
--- a/frontend/src/global_styles/content/_toast.sass
+++ b/frontend/src/global_styles/content/_toast.sass
@@ -129,7 +129,6 @@ $nm-upload-box-padding: rem-calc(15) rem-calc(25)
&.-error,
&.-success,
&.-warning,
- &.-notice,
&.-info
padding: $nm-box-padding
@@ -146,8 +145,7 @@ $nm-upload-box-padding: rem-calc(15) rem-calc(25)
@include messages-icon
@extend %nm-icon-error
- &.-success,
- &.-notice
+ &.-success
@extend %success-placeholder
&::before
@@ -364,13 +362,6 @@ $nm-upload-box-padding: rem-calc(15) rem-calc(25)
@include messages-icon
padding: 0 !important
- &.notice
- @extend %success-placeholder
-
- &::before
- @extend %nm-icon-success
- color: $nm-color-success-icon
-
&.error, &.nodata
@extend %error-placeholder