]> git.openstreetmap.org Git - rails.git/blob - app/views/sessions/new.html.erb
Move 'Forgot password' link to the right of password label
[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
21     <div class="row">
22       <div class="col">
23         <%= f.label :password, :class => "form-label" %>
24       </div>
25       <div class="col text-end">
26         <small><%= link_to(t(".lost password link"), user_forgot_password_path) %></small>
27       </div>
28     </div>
29     <input class="form-control mb-3" type="password" name="password" id="password" tabindex="2" value="" autocomplete="off" />
30
31     <%= f.form_group do %>
32       <%= f.check_box :remember_me, { :label => t(".remember"), :tabindex => 3, :checked => (params[:remember_me] == "yes") }, "yes" %>
33     <% end %>
34
35     <%= f.primary t(".login_button"), :tabindex => 4 %>
36   <% end %>
37
38   <hr>
39
40   <div id="loginForm">
41     <div class="mb-3">
42       <label class="form-label"><%= t ".with external" %></label>
43
44       <ul class='list-inline' id="login_auth_buttons">
45         <li class="list-inline-item me-3">
46           <%= link_to image_tag("openid.png",
47                                 :alt => t(".auth_providers.openid.title"),
48                                 :size => "36"),
49                       "#",
50                       :id => "openid_open_url",
51                       :title => t(".auth_providers.openid.title") %>
52         </li>
53
54         <% %w[google facebook microsoft github wikipedia].each do |provider| %>
55           <% if Settings.key?("#{provider}_auth_id".to_sym) -%>
56             <li class="list-inline-item me-3"><%= auth_button provider, provider %></li>
57           <% end -%>
58         <% end -%>
59       </ul>
60
61       <%= form_tag(auth_path(:provider => "openid"), :id => "openid_login_form") do %>
62         <div id='login_openid_url' class="mb-3">
63           <label for='openid_url' class="form-label"><%= t ".openid_html", :logo => openid_logo %></label>
64           <%= hidden_field_tag("referer", params[:referer], :autocomplete => "off") %>
65           <%= text_field_tag("openid_url", "", :tabindex => 5, :autocomplete => "on", :class => "openid_url form-control") %>
66           <span class="form-text text-muted">(<a href="<%= t "accounts.edit.openid.link" %>" target="_new"><%= t "accounts.edit.openid.link text" %></a>)</span>
67         </div>
68
69         <%= submit_tag t(".login_button"), :tabindex => 6, :id => "login_openid_submit", :class => "btn btn-primary" %>
70       <% end %>
71     </div>
72   </div>
73 </div>