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

fix background color transparency when there is an error

Behrokh Satarnejad6e5cb29bcc30
diff --git a/app/views/common/_error_base.html.erb b/app/views/common/_error_base.html.erb
index 8575573e282..c79c8b9a74a 100644
--- a/app/views/common/_error_base.html.erb
+++ b/app/views/common/_error_base.html.erb
@@ -27,23 +27,27 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
-<div id="errorExplanation"
- data-members-form-target="errorExplanation"
- class="op-toast errorExplanation -error <%= local_assigns[:classes] || '' %>"
- tabindex="0"
- role="alert">
- <div class="op-toast--content">
- <% if content_for?(:error_details) %>
- <p>
- <strong><%= error_message %></strong>
- </p>
- <%= content_for :error_details %>
- <% else %>
- <%= error_message %>
- <% end %>
+<div class="op-toast--wrapper">
+ <div class="op-toast--casing">
+ <div id="errorExplanation"
+ data-members-form-target="errorExplanation"
+ class="op-toast errorExplanation -error <%= local_assigns[:classes] || '' %>"
+ tabindex="0"
+ role="alert">
+ <div class="op-toast--content">
+ <% if content_for?(:error_details) %>
+ <p>
+ <strong><%= error_message %></strong>
+ </p>
+ <%= content_for :error_details %>
+ <% else %>
+ <%= error_message %>
+ <% end %>
+ </div>
+
+ <span class="close-handler" role="button" tabindex="0" aria-label="{{ ::I18n.t('js.close_popup_title') }}">
+ <%= op_icon('icon-close') %>
+ </span>
+ </div>
</div>
-
- <span class="close-handler" role="button" tabindex="0" aria-label="{{ ::I18n.t('js.close_popup_title') }}">
- <%= op_icon('icon-close') %>
- </span>
</div>
diff --git a/frontend/src/global_styles/content/_index.sass b/frontend/src/global_styles/content/_index.sass
index 13ecf7fd2a0..d660f5644c3 100644
--- a/frontend/src/global_styles/content/_index.sass
+++ b/frontend/src/global_styles/content/_index.sass
@@ -13,7 +13,6 @@
@import copy_to_clipboard
@import custom_logo
@import toast
-@import toast_mobile
@import tiles
@import links
@import loading_indicator
diff --git a/frontend/src/global_styles/content/_toast.sass b/frontend/src/global_styles/content/_toast.sass
index 1e271041ed9..6577412db50 100644
--- a/frontend/src/global_styles/content/_toast.sass
+++ b/frontend/src/global_styles/content/_toast.sass
@@ -221,8 +221,7 @@ $nm-upload-box-padding: rem-calc(15) rem-calc(25)
&.-info
color: $nm-color-info-icon
-.op-toast--wrapper,
-#errorExplanation
+.op-toast--wrapper
position: absolute
max-width: $nm-toaster-width
margin: 0 auto
@@ -240,8 +239,6 @@ $nm-upload-box-padding: rem-calc(15) rem-calc(25)
.op-toast
margin-bottom: rem-calc(3px)
-#errorExplanation
- top: 1rem
// awesome animations
.op-toast
@@ -359,7 +356,6 @@ $nm-upload-box-padding: rem-calc(15) rem-calc(25)
padding: $nm-box-padding
box-shadow: rem-calc(1px 2px 3px) rgba(0, 0, 0, 0.2)
margin-bottom: 0.1875rem
- margin-top: 0.5rem
&.ng-leave
@include animation(0.5s fade-out)
@@ -416,11 +412,8 @@ a.op-toast--target-link
text-decoration: underline
#errorExplanation
- @extend %error-placeholder
- top: rem-calc(68px)
-
&::before
- color: $nm-color-error-background !important
+ color: $nm-color-error-icon !important
&.-inline
position: relative
diff --git a/frontend/src/global_styles/content/_toast_mobile.sass b/frontend/src/global_styles/content/_toast_mobile.sass
deleted file mode 100644
index 1b5a8f7d00c..00000000000
--- a/frontend/src/global_styles/content/_toast_mobile.sass
+++ /dev/null
@@ -1,33 +0,0 @@
-//-- copyright
-// OpenProject is an open source project management software.
-// Copyright (C) 2012-2024 the OpenProject GmbH
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License version 3.
-//
-// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
-// Copyright (C) 2006-2013 Jean-Philippe Lang
-// Copyright (C) 2010-2013 the ChiliProject Team
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-//
-// See COPYRIGHT and LICENSE files for more details.
-//++
-
-@media screen and (max-width: $breakpoint-sm)
- .op-toast--wrapper,
- #errorExplanation
- left: 20px !important
- right: 20px !important