From: Anton Khorev Date: Wed, 10 Jul 2024 11:02:39 +0000 (+0300) Subject: Change OpenID provider link to button X-Git-Tag: live~452^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/24275fe237b022bd10f24494540fbcf28dbefee3?ds=sidebyside Change OpenID provider link to button --- diff --git a/app/assets/javascripts/auth_providers.js b/app/assets/javascripts/auth_providers.js index 975c57a9b..3dd7601a0 100644 --- a/app/assets/javascripts/auth_providers.js +++ b/app/assets/javascripts/auth_providers.js @@ -9,8 +9,7 @@ $(document).ready(function () { }); // Add click handler to show OpenID field - $("#openid_open_url").click(function (e) { - e.preventDefault(); + $("#openid_open_url").click(function () { $("#openid_url").val("http://"); $("#login_auth_buttons").hide().removeClass("d-flex"); $("#login_openid_url").show(); diff --git a/app/views/application/_auth_providers.html.erb b/app/views/application/_auth_providers.html.erb index d2ff6865f..17c1fa648 100644 --- a/app/views/application/_auth_providers.html.erb +++ b/app/views/application/_auth_providers.html.erb @@ -25,13 +25,13 @@
<% end %> - <%= link_to image_tag("openid.svg", - :alt => t("application.auth_providers.openid.alt"), - :size => "36"), - "#", - :id => "openid_open_url", - :title => t("application.auth_providers.openid.title"), - :class => "btn btn-light p-2" %> + <%= button_tag image_tag("openid.svg", + :alt => t(".openid.alt"), + :size => "36"), + :type => "button", + :id => "openid_open_url", + :title => t(".openid.title"), + :class => "btn btn-light p-2" %> <% %w[google facebook microsoft github wikipedia].each do |provider| %> <% unless @preferred_auth_provider == provider %>