@mmd-osm commented on this pull request.


>        <% end -%>
     </div>
   <% end %>
-
-  <%# :tabindex starts high to allow rendering at the bottom of the template %>
-  <%= form_tag auth_path(:provider => "openid"), :id => "openid_login_form", 
:class => "collapse" do %>
-    <div class="mb-3">
-      <label for="openid_url" class="form-label">
-        <%= image_tag "auth_providers/openid.svg", :size => "36", :alt => "", 
:class => "align-text-bottom" %>
-        <%= t ".openid_url" %>
-      </label>
-      <%= hidden_field_tag("referer", params[:referer], :autocomplete => 
"off") %>

Ok, I think I know what's going on. We used to have the same "referer" field 
twice on the /user/new page, once on the openid form (this line), and another 
time as field  in the "new_user" form:   `<%= hidden_field_tag("referer", 
h(@referer)) unless @referer.nil? %>` (new.html.erb).

Since the field in the openid form was always present, auth_providers.js never 
returned "undefined". Now that we're removing this form, this assumption no 
longer holds true.

So the change in auth_providers.js to have an empty string as fallback should 
be backwards compatible. Previously, the "auth buttons" always had a referer 
URL parameter, even if the value was an empty string.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6038#pullrequestreview-2866902599
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/pull/6038/review/2866902...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to