From a531f805f82696ad86b5addf1b56839b4195b7e2 Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Wed, 26 Mar 2025 21:08:50 +0000 Subject: [PATCH] Replaces legacy icons with SVG icons in error explanation (#41952). git-svn-id: https://svn.redmine.org/redmine/trunk@23563 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/assets/stylesheets/application.css | 22 ++++++++++++++++------ app/helpers/application_helper.rb | 4 +++- app/helpers/settings_helper.rb | 6 +++++- app/views/common/error.html.erb | 5 ++++- app/views/issue_relations/_form.html.erb | 1 + app/views/issues/bulk_edit.html.erb | 2 ++ app/views/repositories/annotate.html.erb | 5 ++++- app/views/timelog/bulk_edit.html.erb | 1 + 8 files changed, 36 insertions(+), 10 deletions(-) diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 849b5e901..d9882f9ca 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -1194,11 +1194,9 @@ input.autocomplete.ajax-loading { } div.flash {margin-top: 8px;} -div.flash:has(svg) { - padding-left: 10px; -} -div.flash svg.icon-svg { +div.flash svg.icon-svg, #errorExplanation svg.icon-svg { margin-right: 4px; + margin-left: -26px; } div.flash.error, #errorExplanation { @@ -1206,13 +1204,25 @@ div.flash.error, #errorExplanation { border-color: #d88; color: #880000; } -div.flash.error:not(:has(svg)), #errorExplanation { +div.flash.error:not(:has(svg)), #errorExplanation:not(:has(svg)) { background: url(/exclamation.png) 8px 50% no-repeat #ffe3e3; } -div.flash.error svg.icon-svg { +div.flash.error svg.icon-svg, #errorExplanation svg.icon-svg { stroke: #880000; } +#errorExplanation:has(svg) { + position: relative; +} + +#errorExplanation:has(svg) > svg.icon-svg { + position: absolute; + top: 50%; + bottom: 50%; + margin-left: -24px; + margin-top: -9px; +} + div.flash.notice { background-color: #dfffdf; border-color: #9fcf9f; diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 7991b9b43..9bb26bdec 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1576,7 +1576,9 @@ module ApplicationHelper def render_error_messages(errors) html = +"" if errors.present? - html << "