]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/4971'
authorTom Hughes <tom@compton.nu>
Wed, 10 Jul 2024 17:29:14 +0000 (18:29 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 10 Jul 2024 17:29:14 +0000 (18:29 +0100)
app/helpers/user_helper.rb
app/views/application/_auth_providers.html.erb
config/locales/en.yml
test/helpers/user_helper_test.rb

index 26ba2c528bb99f229b8f654de9463f6dfefbae61..734a266db0bcaee9e9061f4d0ce2f4454d04a37b 100644 (file)
@@ -52,10 +52,6 @@ module UserHelper
 
   # External authentication support
 
-  def openid_logo
-    image_tag "openid.svg", :size => "36", :alt => t("application.auth_providers.openid_logo_alt"), :class => "align-text-bottom"
-  end
-
   def auth_button(name, provider, options = {})
     link_to(
       image_tag("#{name}.svg",
index d2ff6865fcbfb4c1ec07f04e9161f071029b305a..1455a46c54609b8ad1126e1ca9e128b06bddd274 100644 (file)
   <%# :tabindex starts high to allow rendering at the bottom of the template %>
   <%= form_tag(auth_path(:provider => "openid"), :id => "openid_login_form") do %>
     <div id="login_openid_url" class="mb-3">
-      <label for="openid_url" class="form-label"><%= t ".openid_html", :logo => openid_logo %></label>
+      <label for="openid_url" class="form-label">
+        <%= image_tag "openid.svg", :size => "36", :alt => "", :class => "align-text-bottom" %>
+        <%= t ".openid_url" %>
+      </label>
       <%= hidden_field_tag("referer", params[:referer], :autocomplete => "off") %>
       <%= text_field_tag("openid_url", "", :tabindex => 20, :autocomplete => "on", :class => "form-control") %>
       <span class="form-text text-body-secondary">(<a href="<%= t "accounts.edit.openid.link" %>" target="_new"><%= t "accounts.edit.openid.link text" %></a>)</span>
index 4c743b03353487a3db53bb9de125f29d8e596eac..c5978b5d74fa644d5ea1a59e021ecd652210298b 100644 (file)
@@ -2583,8 +2583,7 @@ en:
       oauth2_authorizations: OAuth 2 authorizations
       muted_users: Muted Users
     auth_providers:
-      openid_logo_alt: "Log in with an OpenID"
-      openid_html: "%{logo} OpenID"
+      openid_url: "OpenID URL"
       openid_login_button: "Continue"
       openid:
         title: Log in with OpenID
index eaf406a067b6941d93da7b380472d4c3ae9eb1a9..53b9a823bc6476804b53b2736c39e112d83b3fe7 100644 (file)
@@ -109,11 +109,6 @@ class UserHelperTest < ActionView::TestCase
     assert_match %r{^<img .* width="50" height="50" .* />$}, thumbnail
   end
 
-  def test_openid_logo
-    logo = openid_logo
-    assert_match %r{^<img .* src="/images/openid.svg" .* />$}, logo
-  end
-
   def test_auth_button
     button = auth_button("google", "google")
     img_tag = "<img alt=\"Google logo\" class=\"rounded-1\" src=\"/images/google.svg\" width=\"36\" height=\"36\" />"