summaryrefslogtreecommitdiffstats
path: root/app/views/sudo_mode
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2022-08-06 05:00:28 +0000
committerGo MAEDA <maeda@farend.jp>2022-08-06 05:00:28 +0000
commit5c5ae4637c903279f6297aa73a7b0035d3bfb59d (patch)
tree30da903385caa6eaf1fde53cb5508d38784d9a32 /app/views/sudo_mode
parentca89202a2eee523a556b918b83e92bf7a4a113f9 (diff)
downloadredmine-5c5ae4637c903279f6297aa73a7b0035d3bfb59d.tar.gz
redmine-5c5ae4637c903279f6297aa73a7b0035d3bfb59d.zip
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
Diffstat (limited to 'app/views/sudo_mode')
-rw-r--r--app/views/sudo_mode/new.html.erb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/views/sudo_mode/new.html.erb b/app/views/sudo_mode/new.html.erb
index 6532dc4a9..cd25ea1d6 100644
--- a/app/views/sudo_mode/new.html.erb
+++ b/app/views/sudo_mode/new.html.erb
@@ -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();" %>