coopdevs/timeoverflow

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

Summary

Maintainability
Test Coverage
<div class="row">
  <div class="col-xs-12 col-sm-8 col-md-6 col-lg-6 col-sm-offset-2 col-md-offset-3 col-lg-offset-3">
    <div class="panel" id="login-box">
      <div class="panel-body">
        <%= render 'layouts/messages' %>
        <%= show_error_messages!(resource) %>
        <%= form_for resource, url: session_path(resource_name) do |f| %>
          <div class="form-group">
            <div class="input-group">
              <span class="input-group-addon">
                <%= glyph(:envelope) %>
              </span>
              <%= f.text_field :email, required: false, autofocus: true, placeholder: t("application.login_form.email"), class: "form-control input-lg" %>
            </div>
          </div>
          <div class="form-group">
            <div class="input-group">
              <span class="input-group-addon">
                <%= glyph(:lock) %>
              </span>
              <%= f.password_field :password, required: false, autofocus: true, placeholder: t("application.login_form.password"), class: "form-control input-lg" %>
              <span class="input-group-addon show-password">
                <%= glyph(:eye_close) %>
              </span>
            </div>
          </div>
          <div class="form-group" id="remember-me-wrapper">
            <div class="row">
              <div class="col-xs-12">
                <div class="checkbox">
                  <%= f.label :remember_me do |nada| %>
                    <%= f.check_box :remember_me %>
                    <%= t("application.login_form.remember_check") %>
                  <% end %>
                </div>
              </div>
            </div>
          </div>
          <div class="form-group">
            <div class="row">
              <div class="col-xs-12">
                <%= f.submit t("application.login_form.button"), class: "btn btn-primary btn-lg col-xs-12" %>
              </div>
            </div>
          </div>
          <div class="text-center"><%= t('global.or').upcase %></div>
          <div class="form-group">
            <div class="row">
              <div class="col-xs-12">
                <%= link_to t('devise.registrations.new.sign_up'), signup_users_path, class: "btn btn-primary btn-lg col-xs-12" %>
              </div>
            </div>
          </div>
        <% end %>
      </div>
      <div class="panel-footer">
        <%= render "devise/shared/links" %>
      </div>
    </div>
  </div>
</div>