1 <% prefered_auth_button_available = @preferred_auth_provider != "openid" && Auth.providers.value?(@preferred_auth_provider) %>
4 <%= tag.div :id => "login_auth_buttons",
5 :class => ["collapse show row row-cols-1", { "row-cols-sm-2" => prefered_auth_button_available }, "g-2 mb-3"] do %>
7 <% if prefered_auth_button_available %>
8 <div class="col justify-content-center d-flex align-items-center flex-wrap">
9 <%= auth_button_preferred @preferred_auth_provider %>
13 <div class="col justify-content-center d-flex align-items-center flex-wrap gap-2">
14 <% Auth.providers.each_value do |provider| %>
15 <% if provider == "openid" %>
16 <%= button_tag image_tag("auth_providers/openid.svg",
17 :alt => t(".openid.alt"),
20 :data => { "bs-toggle" => "collapse",
21 "bs-target" => "#login_auth_buttons, #openid_login_form" },
22 :title => t(".openid.title"),
23 :class => "btn btn-light p-2" %>
24 <% elsif provider != @preferred_auth_provider %>
25 <%= auth_button provider %>
31 <%# :tabindex starts high to allow rendering at the bottom of the template %>
32 <%= form_tag auth_path(:provider => "openid"), :id => "openid_login_form", :class => "collapse" do %>
34 <label for="openid_url" class="form-label">
35 <%= image_tag "auth_providers/openid.svg", :size => "36", :alt => "", :class => "align-text-bottom" %>
36 <%= t ".openid_url" %>
38 <%= hidden_field_tag("referer", params[:referer], :autocomplete => "off") %>
39 <%= text_field_tag("openid_url", "https://", :tabindex => 20, :autocomplete => "on", :class => "form-control") %>
40 <span class="form-text text-body-secondary">(<a href="<%= t "accounts.edit.openid.link" %>" target="_new"><%= t "accounts.edit.openid.link text" %></a>)</span>
43 <%= submit_tag t(".openid_login_button"), :tabindex => 21, :class => "btn btn-primary" %>