Skip to content

Commit

Permalink
Merge pull request heartcombo#2037 from Radagaisus/master
Browse files Browse the repository at this point in the history
HTML5 Autofocus, to make things nicer
  • Loading branch information
José Valim committed Aug 22, 2012
2 parents 33fac7f + 422bf89 commit eb51d03
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 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
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down

0 comments on commit eb51d03

Please sign in to comment.