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 <% %w[google facebook microsoft github wikipedia].each do |provider| %>
17 <% if Settings.key?("#{provider}_auth_id".to_sym) -%>
18 <% if @preferred_auth_provider == provider %>
19 <%= auth_button_preferred provider %>
26 <div class="col justify-content-center d-flex align-items-center flex-wrap gap-2">
27 <%= button_tag image_tag("openid.svg",
28 :alt => t(".openid.alt"),
31 :id => "openid_open_url",
32 :title => t(".openid.title"),
33 :class => "btn btn-light p-2" %>
35 <% %w[google facebook microsoft github wikipedia].each do |provider| %>
36 <% unless @preferred_auth_provider == provider %>
37 <% if Settings.key?("#{provider}_auth_id".to_sym) -%>
38 <%= auth_button provider %>
45 <%# :tabindex starts high to allow rendering at the bottom of the template %>
46 <%= form_tag(auth_path(:provider => "openid"), :id => "openid_login_form") do %>
48 <label for="openid_url" class="form-label">
49 <%= image_tag "openid.svg", :size => "36", :alt => "", :class => "align-text-bottom" %>
50 <%= t ".openid_url" %>
52 <%= hidden_field_tag("referer", params[:referer], :autocomplete => "off") %>
53 <%= text_field_tag("openid_url", "https://", :tabindex => 20, :autocomplete => "on", :class => "form-control") %>
54 <span class="form-text text-body-secondary">(<a href="<%= t "accounts.edit.openid.link" %>" target="_new"><%= t "accounts.edit.openid.link text" %></a>)</span>
57 <%= submit_tag t(".openid_login_button"), :tabindex => 21, :class => "btn btn-primary" %>