replace prototype based focus (#4564)

pull/4566/head
ulferts 8 years ago committed by Oliver Günther
parent 344c0c92ab
commit feb0baef19
  1. 5
      app/views/account/_password_login_form.html.erb
  2. 2
      app/views/projects/form/attributes/_name.html.erb
  3. 1
      app/views/projects/new.html.erb

@ -33,14 +33,14 @@ See doc/COPYRIGHT.rdoc for more details.
<div class="form--field">
<%= styled_label_tag 'username', User.human_attribute_name(:login) %>
<div class="form--field-container">
<%= styled_text_field_tag 'username', params[:username] %>
<%= styled_text_field_tag 'username', params[:username], autofocus: params[:username].blank? %>
</div>
</div>
<div class="form--field">
<%= styled_label_tag 'password', User.human_attribute_name(:password) %>
<div class="form--field-container">
<%= styled_password_field_tag 'password', nil, autofocus: params.include?(:username) %>
<%= styled_password_field_tag 'password', nil, autofocus: !params[:username].blank? %>
</div>
</div>
@ -68,5 +68,4 @@ See doc/COPYRIGHT.rdoc for more details.
<% end %>
</div>
</div>
<%= javascript_tag "Form.Element.focus('username');" %>
<% end %>

@ -28,5 +28,5 @@ See doc/COPYRIGHT.rdoc for more details.
++#%>
<div class="form--field -required">
<%= form.text_field :name, required: true %>
<%= form.text_field :name, required: true, autofocus: form.object.name.empty? %>
</div>

@ -37,5 +37,4 @@ See doc/COPYRIGHT.rdoc for more details.
render_custom_fields: false
} %>
<%= styled_button_tag l(:button_create), class: '-highlight -with-icon icon-checkmark' %>
<%= javascript_tag "Form.Element.focus('project_name');" %>
<% end %>

Loading…
Cancel
Save