Skip to content

Commit

Permalink
fix for error banners
Browse files Browse the repository at this point in the history
  • Loading branch information
scaustin34 committed Jun 18, 2024
1 parent 00f8594 commit b490788
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,12 @@ def get_flash_type(type)
case type
when "notice"
"info"
when "warning", "message"
when "warning", "message"
"warning"
when "success"
"success"
else
"severe"
else
"error"
end
end

Expand Down Expand Up @@ -1109,12 +1109,12 @@ def ridp_step_2_disabled(person, application_verified, identity_verified)

def ridp_modal_options
{
:driver_license => "Driver's License issued by state or territory",
:school_id => "School identification card",
:military_id => "U.S. military card or draft record",
:passport => "Identification card issued by the federal, state or local government, including a U.S. Passport",
:military_dependent => "Military dependent's identification card",
:native_american => "Native American tribal document",
:driver_license => "Driver's License issued by state or territory",
:school_id => "School identification card",
:military_id => "U.S. military card or draft record",
:passport => "Identification card issued by the federal, state or local government, including a U.S. Passport",
:military_dependent => "Military dependent's identification card",
:native_american => "Native American tribal document",
:coast_guard => "U.S. Coast Guard Merchant Mariner card"
}
end
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/css/alerts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
width: 1em;
margin-right: .25em;

&.severe-icon {
&.error-icon {
height: 24px;
width: 24px;
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='10' fill='%23A21E1F'/%3E%3Cline x1='8.46451' y1='8.46448' x2='15.5356' y2='15.5355' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3Cline x1='15.5356' y1='8.46451' x2='8.46458' y2='15.5356' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_error_messages.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<% if object.errors.any? %>
<% if @bs4 %>
<% is_only_warning = object.errors.details.values.all? {|error_type| error_type.all? {|details| details[:level] == :warning}} %>
<% type = is_only_warning ? "warning" : "severe" %>
<% type = is_only_warning ? "warning" : "error" %>
<div class="mt-2 mb-0 px-0">
<div class="alert alert-<%= type %> d-flex flash" role="alert">
<div class="pl-1">
Expand Down

0 comments on commit b490788

Please sign in to comment.