From: Tom Hughes Date: Sat, 1 Jul 2023 14:21:27 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/pull/4074' X-Git-Tag: live~1221 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/68ff443697b2755df7f83929c10638a1ce3bcdfb?hp=d3b67140313c26ad431c67ab1d56203aa41f77c7 Merge remote-tracking branch 'upstream/pull/4074' --- diff --git a/app/helpers/user_roles_helper.rb b/app/helpers/user_roles_helper.rb index c7516a51c..a8bc06b6e 100644 --- a/app/helpers/user_roles_helper.rb +++ b/app/helpers/user_roles_helper.rb @@ -28,7 +28,7 @@ module UserRolesHelper svg_icon = tag.source(:srcset => image_path("#{image}.svg"), :type => "image/svg+xml") png_icon = image_tag("#{image}.png", :srcset => image_path("#{image}.svg"), :size => "20x20", :border => 0, :alt => alt, :title => title) icon = tag.picture(svg_icon + png_icon) - icon = link_to(icon, url, :method => :post, :confirm => confirm) if url + icon = link_to(icon, url, :method => :post, :data => { :confirm => confirm }) if url end icon diff --git a/test/helpers/user_roles_helper_test.rb b/test/helpers/user_roles_helper_test.rb index 9c9d31e60..287504cb4 100644 --- a/test/helpers/user_roles_helper_test.rb +++ b/test/helpers/user_roles_helper_test.rb @@ -25,7 +25,7 @@ class UserRolesHelperTest < ActionView::TestCase user = create(:user) icon = role_icon(user, "moderator") expected = <<~HTML.delete("\n") - + Grant moderator access @@ -37,7 +37,7 @@ class UserRolesHelperTest < ActionView::TestCase moderator_user = create(:moderator_user) icon = role_icon(moderator_user, "moderator") expected = <<~HTML.delete("\n") - + Revoke moderator access @@ -82,13 +82,13 @@ class UserRolesHelperTest < ActionView::TestCase user = create(:user) icons = role_icons(user) expected = <<~HTML.delete("\n") - + Grant administrator access - + Grant moderator access @@ -100,13 +100,13 @@ class UserRolesHelperTest < ActionView::TestCase moderator_user = create(:moderator_user) icons = role_icons(moderator_user) expected = <<~HTML.delete("\n") - + Grant administrator access - + Revoke moderator access @@ -118,13 +118,13 @@ class UserRolesHelperTest < ActionView::TestCase super_user = create(:super_user) icons = role_icons(super_user) expected = <<~HTML.delete("\n") - + Revoke administrator access - + Revoke moderator access