]> git.openstreetmap.org Git - rails.git/blob - app/views/sessions/new.html.erb
Add globe on top of login screen, narrow login/signup screens
[rails.git] / app / views / sessions / new.html.erb
1 <% content_for :head do %>
2   <%= javascript_include_tag "login" %>
3 <% end %>
4
5 <% content_for :heading_class, "p-0 mw-100" %>
6
7 <% content_for :heading do %>
8   <div class="header-illustration new-user-main auth-container mx-auto">
9     <h1 class="pt-3"><%= t ".heading" %></h1>
10   <div>
11 <% end %>
12
13 <div id="login_login" class="auth-container mx-auto my-0">
14   <p class='text-muted'><%= t ".no account" %> <%= link_to t(".register now"), user_new_path(:referer => params[:referer]) %></p>
15
16   <%= bootstrap_form_tag(:action => "login", :html => { :id => "login_form" }) do |f| %>
17     <%= hidden_field_tag("referer", h(params[:referer]), :autocomplete => "off") %>
18
19     <%= f.text_field :username, :label => t(".email or username"), :tabindex => 1, :value => params[:username] %>
20     <%= f.password_field :password, :label => t(".password"), :tabindex => 2, :value => "", :help => link_to(t(".lost password link"), user_forgot_password_path) %>
21     <%= f.form_group do %>
22       <%= f.check_box :remember_me, { :label => t(".remember"), :tabindex => 3, :checked => (params[:remember_me] == "yes") }, "yes" %>
23     <% end %>
24
25     <%= f.primary t(".login_button"), :tabindex => 4 %>
26   <% end %>
27
28   <hr>
29
30   <div id="loginForm">
31     <div class="mb-3">
32       <label class="form-label"><%= t ".with external" %></label>
33
34       <ul class='list-inline' id="login_auth_buttons">
35         <li class="list-inline-item me-3">
36           <%= link_to image_tag("openid.png",
37                                 :alt => t(".auth_providers.openid.title"),
38                                 :size => "36"),
39                       "#",
40                       :id => "openid_open_url",
41                       :title => t(".auth_providers.openid.title") %>
42         </li>
43
44         <% %w[google facebook microsoft github wikipedia].each do |provider| %>
45           <% if Settings.key?("#{provider}_auth_id".to_sym) -%>
46             <li class="list-inline-item me-3"><%= auth_button provider, provider %></li>
47           <% end -%>
48         <% end -%>
49       </ul>
50
51       <%= form_tag(auth_path(:provider => "openid"), :id => "openid_login_form") do %>
52         <div id='login_openid_url' class="mb-3">
53           <label for='openid_url' class="form-label"><%= t ".openid_html", :logo => openid_logo %></label>
54           <%= hidden_field_tag("referer", params[:referer], :autocomplete => "off") %>
55           <%= text_field_tag("openid_url", "", :tabindex => 5, :autocomplete => "on", :class => "openid_url form-control") %>
56           <span class="form-text text-muted">(<a href="<%= t "accounts.edit.openid.link" %>" target="_new"><%= t "accounts.edit.openid.link text" %></a>)</span>
57         </div>
58
59         <%= submit_tag t(".login_button"), :tabindex => 6, :id => "login_openid_submit", :class => "btn btn-primary" %>
60       <% end %>
61     </div>
62   </div>
63 </div>