]> git.openstreetmap.org Git - rails.git/commitdiff
Remove single-use OpenID logo helper
authorAnton Khorev <tony29@yandex.ru>
Wed, 10 Jul 2024 10:16:15 +0000 (13:16 +0300)
committerAnton Khorev <tony29@yandex.ru>
Wed, 10 Jul 2024 10:50:39 +0000 (13:50 +0300)
app/helpers/user_helper.rb
app/views/application/_auth_providers.html.erb
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 14e296a07c418f9ca06f88212c57c70cf3478f19..4b487cc5d5b8f9680791a87ed4602e254525568a 100644 (file)
@@ -47,7 +47,7 @@
   <%= 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">
-        <%= openid_logo %>
+        <%= image_tag "openid.svg", :size => "36", :alt => t(".openid_logo_alt"), :class => "align-text-bottom" %>
         <%= t ".openid_url" %>
       </label>
       <%= hidden_field_tag("referer", params[:referer], :autocomplete => "off") %>
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\" />"