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 << "
<%= @message %>
++ <%= notice_icon('error') %> + <%= @message %> +
<% end %> <% if @archived_project && User.current.admin? %> diff --git a/app/views/issue_relations/_form.html.erb b/app/views/issue_relations/_form.html.erb index 97fe78cc6..b55e93eac 100644 --- a/app/views/issue_relations/_form.html.erb +++ b/app/views/issue_relations/_form.html.erb @@ -2,6 +2,7 @@ <% if @unsaved_relations && @unsaved_relations.any? %> <% unsaved_relations_ids = @unsaved_relations.map(&:issue_to_id).compact.join(", ") %><%= @error_message %>
++ <%= notice_icon('error') %> + <%= @error_message %> +
<% end %> <% html_title(l(:button_annotate)) -%> diff --git a/app/views/timelog/bulk_edit.html.erb b/app/views/timelog/bulk_edit.html.erb index a4cb0c8af..4f496470a 100644 --- a/app/views/timelog/bulk_edit.html.erb +++ b/app/views/timelog/bulk_edit.html.erb @@ -2,6 +2,7 @@ <% if @unsaved_time_entries.present? %>