Codeminer42/cm42-central

View on GitHub
app/views/devise/sessions/new.html.erb

Summary

Maintainability
Test Coverage
<% content_for :title_bar do %>
  <span class="navbar-brand"><%= t('login') %></span>
<% end %>

<div class="container">
  <div class="row">

    <div class="col-sm-12 col-md-6 col-lg-4 col-md-offset-3 col-lg-offset-4">

      <h3 class="auth-welcome text-center"><%= t('welcome') %></h3>

      <div class="auth-wrapper">
        <%= form_for(resource, as: resource_name, url: session_path(resource_name), html: { class: 'form-horizontal' }) do |f| %>
          <div class="auth-form-group">
            <%= f.label :email, class: 'sr-only' %>
            <%= f.email_field :email, autofocus: true, placeholder: true, class: 'form-control auth-form-control' %>
          </div>

          <div class="auth-form-group">
            <%= f.label :password, class: 'sr-only' %>
            <%= f.password_field :password, autocomplete: 'off', placeholder: true, class: 'form-control auth-form-control' %>
          </div>

          <% if devise_mapping.rememberable? -%>
          <div class="auth-form-group">
            <div class="checkbox auth-form-checkbox">
              <label>
                <%= f.check_box :remember_me %> <%= f.label :remember_me, class: 'auth-form-checkbox-label' %>
              </label>
            </div>
          </div>
          <% end -%>

          <div class="actions clearfix">
            <%= f.submit t('.sign_in'), class: 'btn btn-primary pull-right auth-button-submit' %>
          </div>
        <% end %>
      </div>

    </div>

    <div class="clearfix"></div>

    <div class="col-sm-12 col-md-6 col-lg-4 col-md-offset-3 col-lg-offset-4">
      <%= render 'devise/shared/links' %>
    </div>

  </div>
</div>