1 <% prefered_auth_button_available = @preferred_auth_provider != "openid" && Auth.providers.value?(@preferred_auth_provider) %>
4 <%= tag.div :id => "login_auth_buttons",
5 :class => ["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("openid.svg",
17 :alt => t(".openid.alt"),
20 :id => "openid_open_url",
21 :title => t(".openid.title"),
22 :class => "btn btn-light p-2" %>
23 <% elsif provider != @preferred_auth_provider %>
24 <%= auth_button provider %>
30 <%# :tabindex starts high to allow rendering at the bottom of the template %>
31 <%= form_tag(auth_path(:provider => "openid"), :id => "openid_login_form") do %>
33 <label for="openid_url" class="form-label">
34 <%= image_tag "openid.svg", :size => "36", :alt => "", :class => "align-text-bottom" %>
35 <%= t ".openid_url" %>
37 <%= hidden_field_tag("referer", params[:referer], :autocomplete => "off") %>
38 <%= text_field_tag("openid_url", "https://", :tabindex => 20, :autocomplete => "on", :class => "form-control") %>
39 <span class="form-text text-body-secondary">(<a href="<%= t "accounts.edit.openid.link" %>" target="_new"><%= t "accounts.edit.openid.link text" %></a>)</span>
42 <%= submit_tag t(".openid_login_button"), :tabindex => 21, :class => "btn btn-primary" %>