.main
  .container
    .row
      .col-md-6.col-md-offset-3
        .panel
          .panel-heading
            h3.panel-title
              = t '.sign_in'
          .panel-body
            = form_tag login_path
              = render 'share/flash_messages'
              .form-group
                = label_tag t('.login')
                = text_field_tag 'user[login]', params[:login], placeholder: t('.username_or_email'), tabindex: 1, class: 'form-control'
              .form-group
                = label_tag t('.password')
                = password_field_tag 'user[password]', nil, placeholder: t('.password'), tabindex: 2, class: 'form-control'
              = submit_tag t('.sign_in'), class: 'btn btn-success', tabindex: 5
            hr
            a href=new_users_password_path
              = t '.forgot_password'

.main
  .container
    .row
      .col-md-6.col-md-offset-3
        .panel
          .panel-heading
            h3.panel-title
              = t '.sign_in'
          .panel-body
            - login = params[:user].try(:[], :login)
            = form_tag login_path
              = render 'share/flash_messages'
              .form-group
                = label_tag t('.login')
                = text_field_tag 'user[login]', login, placeholder: t('.username_or_email'), tabindex: 1, class: 'form-control', autofocus: login.blank?
              .form-group
                = label_tag t('.password')
                = password_field_tag 'user[password]', nil, placeholder: t('.password'), tabindex: 2, class: 'form-control', autofocus: login.present?
              = submit_tag t('.sign_in'), class: 'btn btn-success', tabindex: 5
            hr
            a href=new_users_password_path
              = t '.forgot_password'

Add login input autofocus style
Add login input autofocus style

ZhaoZijie/morning,iec-uestc/tsemple,alex-marmot/campo,JuanitoFatas/campo,alex-marmot/campo,leakeung/campo,lite/wechat-dev,fahchen/tsemple,JuanitoFatas/campo,chloerei/campo,alex-marmot/campo,JuanitoFatas/campo,lite/wechat-dev,leakeung/campo,chloerei/campo,iec-uestc/tsemple,fahchen/tsemple,iec-uestc/tsemple,leakeung/campo,ZhaoZijie/morning,ZhaoZijie/morning,fahchen/tsemple,lite/wechat-dev