]> git.openstreetmap.org Git - rails.git/commitdiff
Change OpenID provider link to button
authorAnton Khorev <tony29@yandex.ru>
Wed, 10 Jul 2024 11:02:39 +0000 (14:02 +0300)
committerAnton Khorev <tony29@yandex.ru>
Wed, 10 Jul 2024 11:12:36 +0000 (14:12 +0300)
app/assets/javascripts/auth_providers.js
app/views/application/_auth_providers.html.erb

index 975c57a9b611a87738dc51d0c2da09bac91d9ff5..3dd7601a088686c124f3b3ef170028b5ba099351 100644 (file)
@@ -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();
index d2ff6865fcbfb4c1ec07f04e9161f071029b305a..17c1fa648ad7c18d08cb636265f499a91322d853 100644 (file)
       <div class="justify-content-center d-flex align-items-center flex-wrap gap-2">
     <% 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 %>