1 <% prefered_auth_button_available = false %>
2 <% %w[google facebook microsoft github wikipedia].each do |provider| %>
3 <% if Settings.key?("#{provider}_auth_id".to_sym) -%>
4 <% if @preferred_auth_provider == provider %>
5 <% prefered_auth_button_available = true %>
11 <%= tag.div :id => "login_auth_buttons",
12 :class => ["row row-cols-1", { "row-cols-sm-2" => prefered_auth_button_available }, "g-2 mb-3"] do %>
14 <% if prefered_auth_button_available %>
15 <div class="col justify-content-center d-flex align-items-center flex-wrap">
16 <%= auth_button_preferred @preferred_auth_provider %>
20 <div class="col justify-content-center d-flex align-items-center flex-wrap gap-2">
21 <%= button_tag image_tag("openid.svg",
22 :alt => t(".openid.alt"),
25 :id => "openid_open_url",
26 :title => t(".openid.title"),
27 :class => "btn btn-light p-2" %>
29 <% %w[google facebook microsoft github wikipedia].each do |provider| %>
30 <% unless @preferred_auth_provider == provider %>
31 <% if Settings.key?("#{provider}_auth_id".to_sym) -%>
32 <%= auth_button provider %>
39 <%# :tabindex starts high to allow rendering at the bottom of the template %>
40 <%= form_tag(auth_path(:provider => "openid"), :id => "openid_login_form") do %>
42 <label for="openid_url" class="form-label">
43 <%= image_tag "openid.svg", :size => "36", :alt => "", :class => "align-text-bottom" %>
44 <%= t ".openid_url" %>
46 <%= hidden_field_tag("referer", params[:referer], :autocomplete => "off") %>
47 <%= text_field_tag("openid_url", "https://", :tabindex => 20, :autocomplete => "on", :class => "form-control") %>
48 <span class="form-text text-body-secondary">(<a href="<%= t "accounts.edit.openid.link" %>" target="_new"><%= t "accounts.edit.openid.link text" %></a>)</span>
51 <%= submit_tag t(".openid_login_button"), :tabindex => 21, :class => "btn btn-primary" %>