You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

login.html.erb 1.0KB

123456789101112131415161718192021222324252627282930
  1. <%= call_hook :view_account_login_top %>
  2. <div id="login-form">
  3. <%= form_tag(signin_path, onsubmit: 'return keepAnchorOnSignIn(this);') do %>
  4. <%= back_url_hidden_field_tag %>
  5. <label for="username"><%=l(:field_login)%></label>
  6. <%= text_field_tag 'username', params[:username], :tabindex => '1' %>
  7. <label for="password">
  8. <%=l(:field_password)%>
  9. <%= link_to l(:label_password_lost), lost_password_path, :class => "lost_password" if Setting.lost_password? %>
  10. </label>
  11. <%= password_field_tag 'password', nil, :tabindex => '2' %>
  12. <% if Setting.autologin? %>
  13. <label for="autologin"><%= check_box_tag 'autologin', 1, false, :tabindex => 4 %> <%= l(:label_stay_logged_in) %></label>
  14. <% end %>
  15. <input type="submit" name="login" value="<%=l(:button_login)%>" tabindex="5" id="login-submit" />
  16. <% end %>
  17. </div>
  18. <%= call_hook :view_account_login_bottom %>
  19. <% if params[:username].present? %>
  20. <%= javascript_tag "$('#password').focus();" %>
  21. <% else %>
  22. <%= javascript_tag "$('#username').focus();" %>
  23. <% end %>