johnrees/fablabs

View on GitHub
app/views/sessions/new.html.haml

Summary

Maintainability
Test Coverage
- title "Sign in"
.container
  = form_tag sessions_path do
    %fieldset.signinpanel
      .text-large Welcome to fablabs.io
      %h5
        Fablabs.io is the online social network of the international Fab Lab community, and it is an exchange platform for people, labs, projects, machines, events and groups that operate around the Fab Lab Network, which collaboration and communication tools in order to align interests and to expand the global scale of this community.

      .row.px-3
        -# = simple_form_for :signin, { url: sessions_path } do
        = hidden_field_tag :goto, params[:goto]
        = hidden_field_tag :authenticity_token, form_authenticity_token
        .input.mr-3
          = label_tag :email_or_username, "Email or Username"
          = text_field_tag :email_or_username, params[:email_or_username],
            placeholder:    'Email or Username',
            required:       true,
            autofocus:      params[:email_or_username].blank?,
            autocapitalize: 'off',
            autocorrect:    'off',
            class:          'form-control'
        .input
          = label_tag :password, nil
          = password_field_tag :password, nil,
            placeholder: 'Password',
            required:    true,
            class:       'form-control'

      .row.px-3
        = submit_tag t("views.header.signin", default: "Sign in"), class: 'btn btn-primary btn-lg float-right mb-3'

      .row.px-3
        = link_to "Forgot the password?", new_recovery_url(subdomain: 'www')
      .row.px-3
        = link_to "Not yet a member? <strong>#{t('views.header.signup', default: 'Sign up')}</strong>".html_safe, signup_url(subdomain: 'www', goto: params[:goto])