mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-31 19:47:14 +00:00
Replace JQuery .focus() method with HTML autofocus attribute (#37482).
Patch by Go MAEDA. git-svn-id: https://svn.redmine.org/redmine/trunk@21762 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
ca89202a2e
commit
5c5ae4637c
@ -5,13 +5,13 @@
|
||||
<%= back_url_hidden_field_tag %>
|
||||
|
||||
<label for="username"><%=l(:field_login)%></label>
|
||||
<%= text_field_tag 'username', params[:username], :tabindex => '1' %>
|
||||
<%= text_field_tag 'username', params[:username], :tabindex => '1', :autofocus => params[:username].blank? %>
|
||||
|
||||
<label for="password">
|
||||
<%=l(:field_password)%>
|
||||
<%= link_to l(:label_password_lost), lost_password_path, :class => "lost_password" if Setting.lost_password? %>
|
||||
</label>
|
||||
<%= password_field_tag 'password', nil, :tabindex => '2' %>
|
||||
<%= password_field_tag 'password', nil, :tabindex => '2', :autofocus => params[:username].present? %>
|
||||
|
||||
<% if Setting.autologin? %>
|
||||
<label for="autologin"><%= check_box_tag 'autologin', 1, false, :tabindex => 4 %> <%= l(:label_stay_logged_in) %></label>
|
||||
@ -22,9 +22,3 @@
|
||||
</div>
|
||||
|
||||
<%= call_hook :view_account_login_bottom %>
|
||||
|
||||
<% if params[:username].present? %>
|
||||
<%= javascript_tag "$('#password').focus();" %>
|
||||
<% else %>
|
||||
<%= javascript_tag "$('#username').focus();" %>
|
||||
<% end %>
|
||||
|
||||
@ -8,10 +8,9 @@
|
||||
<div class="box">
|
||||
<p>
|
||||
<label for="sudo_password"><%= l :field_password %><span class="required">*</span></label>
|
||||
<%= password_field_tag :sudo_password, nil, size: 25 %>
|
||||
<%= password_field_tag :sudo_password, nil, size: 25, autofocus: true %>
|
||||
</br><%= link_to l(:label_password_lost), lost_password_path, :class => "lost_password" if Setting.lost_password? %>
|
||||
</p>
|
||||
</div>
|
||||
<%= submit_tag l(:button_submit) %>
|
||||
<% end %>
|
||||
<%= javascript_tag "$('#sudo_password').focus();" %>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user