Remove single-use OpenID logo helper
This commit is contained in:
parent
86b1e934b6
commit
38bfb33c02
3 changed files with 1 additions and 10 deletions
|
@ -52,10 +52,6 @@ module UserHelper
|
||||||
|
|
||||||
# External authentication support
|
# 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 = {})
|
def auth_button(name, provider, options = {})
|
||||||
link_to(
|
link_to(
|
||||||
image_tag("#{name}.svg",
|
image_tag("#{name}.svg",
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
<%= form_tag(auth_path(:provider => "openid"), :id => "openid_login_form") do %>
|
<%= form_tag(auth_path(:provider => "openid"), :id => "openid_login_form") do %>
|
||||||
<div id="login_openid_url" class="mb-3">
|
<div id="login_openid_url" class="mb-3">
|
||||||
<label for="openid_url" class="form-label">
|
<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" %>
|
<%= t ".openid_url" %>
|
||||||
</label>
|
</label>
|
||||||
<%= hidden_field_tag("referer", params[:referer], :autocomplete => "off") %>
|
<%= hidden_field_tag("referer", params[:referer], :autocomplete => "off") %>
|
||||||
|
|
|
@ -109,11 +109,6 @@ class UserHelperTest < ActionView::TestCase
|
||||||
assert_match %r{^<img .* width="50" height="50" .* />$}, thumbnail
|
assert_match %r{^<img .* width="50" height="50" .* />$}, thumbnail
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_openid_logo
|
|
||||||
logo = openid_logo
|
|
||||||
assert_match %r{^<img .* src="/images/openid.svg" .* />$}, logo
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_auth_button
|
def test_auth_button
|
||||||
button = auth_button("google", "google")
|
button = auth_button("google", "google")
|
||||||
img_tag = "<img alt=\"Google logo\" class=\"rounded-1\" src=\"/images/google.svg\" width=\"36\" height=\"36\" />"
|
img_tag = "<img alt=\"Google logo\" class=\"rounded-1\" src=\"/images/google.svg\" width=\"36\" height=\"36\" />"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue