Skip to content
Browse files

Merge pull request #2037 from Radagaisus/master

HTML5 Autofocus, to make things nicer
  • Loading branch information...
2 parents 33fac7f + 422bf89 commit eb51d0365f98eb1ad1644915144236ecc2514aa5 @josevalim josevalim committed Aug 22, 2012
View
2 app/views/devise/confirmations/new.html.erb
@@ -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 %>
View
2 app/views/devise/passwords/edit.html.erb
@@ -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>
View
2 app/views/devise/passwords/new.html.erb
@@ -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 %>
View
2 app/views/devise/registrations/edit.html.erb
@@ -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>
View
2 app/views/devise/registrations/new.html.erb
@@ -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>
View
2 app/views/devise/sessions/new.html.erb
@@ -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>
View
2 app/views/devise/unlocks/new.html.erb
@@ -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 %>
View
2 lib/generators/templates/simple_form_for/confirmations/new.html.erb
@@ -4,7 +4,7 @@
<%= f.error_notification %>
<div class="form-inputs">
- <%= f.input :email, :required => true %>
+ <%= f.input :email, :required => true, :autofocus => true %>
</div>
<div class="form-actions">
View
2 lib/generators/templates/simple_form_for/passwords/edit.html.erb
@@ -7,7 +7,7 @@
<%= f.full_error :reset_password_token %>
<div class="form-inputs">
- <%= f.input :password, :label => "New password", :required => true %>
+ <%= f.input :password, :label => "New password", :required => true, :autofocus => true %>
<%= f.input :password_confirmation, :label => "Confirm your new password", :required => true %>
</div>
View
2 lib/generators/templates/simple_form_for/passwords/new.html.erb
@@ -4,7 +4,7 @@
<%= f.error_notification %>
<div class="form-inputs">
- <%= f.input :email, :required => true %>
+ <%= f.input :email, :required => true, :autofocus => true %>
</div>
<div class="form-actions">
View
2 lib/generators/templates/simple_form_for/unlocks/new.html.erb
@@ -4,7 +4,7 @@
<%= f.error_notification %>
<div class="form-inputs">
- <%= f.input :email, :required => true %>
+ <%= f.input :email, :required => true, :autofocus => true %>
</div>
<div class="form-actions">

0 comments on commit eb51d03

Please sign in to comment.
Something went wrong with that request. Please try again.