Skip to content

Commit

Permalink
html5 autofocus for a better ux from the get go
Browse files Browse the repository at this point in the history
  • Loading branch information
Radagaisus committed Aug 21, 2012
1 parent 33fac7f commit 2a64972
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/views/devise/confirmations/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<%= devise_error_messages! %>

<div><%= f.label :email %><br />
<%= f.email_field :email %></div>
<%= f.email_field :email , {autofocus: true} %></div>

<div><%= f.submit "Resend confirmation instructions" %></div>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/devise/passwords/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<%= f.hidden_field :reset_password_token %>

<div><%= f.label :password, "New password" %><br />
<%= f.password_field :password %></div>
<%= f.password_field :password, {autofocus: true} %></div>

<div><%= f.label :password_confirmation, "Confirm new password" %><br />
<%= f.password_field :password_confirmation %></div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/devise/passwords/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<%= devise_error_messages! %>

<div><%= f.label :email %><br />
<%= f.email_field :email %></div>
<%= f.email_field :email, {autofocus: true} %></div>

<div><%= f.submit "Send me reset password instructions" %></div>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/devise/registrations/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<%= devise_error_messages! %>

<div><%= f.label :email %><br />
<%= f.email_field :email %></div>
<%= f.email_field :email, {autofocus: true} %></div>

<div><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
<%= f.password_field :password, :autocomplete => "off" %></div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/devise/registrations/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<%= devise_error_messages! %>

<div><%= f.label :email %><br />
<%= f.email_field :email %></div>
<%= f.email_field :email, {autofocus: true} %></div>

<div><%= f.label :password %><br />
<%= f.password_field :password %></div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/devise/sessions/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
<div><%= f.label :email %><br />
<%= f.email_field :email %></div>
<%= f.email_field :email, {autofocus: true} %></div>

<div><%= f.label :password %><br />
<%= f.password_field :password %></div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/devise/unlocks/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<%= devise_error_messages! %>

<div><%= f.label :email %><br />
<%= f.email_field :email %></div>
<%= f.email_field :email, {autofocus: true} %></div>

<div><%= f.submit "Resend unlock instructions" %></div>
<% end %>
Expand Down

0 comments on commit 2a64972

Please sign in to comment.