<h2 aria-hidden="false" style="visibility: none"><%= _('Sign in') %></h2>

<%= form_for resource, as: 'user', url: user_session_path, html: {class: "login-form roadmap-form"} do |f| %>
  <fieldset id="sign-in-form" class="standard padded">
    <% if Rails.application.config.shibboleth_enabled %>
      <h3 class="centered small-header"><%= _('Sign in with') %></h3>

      <div class="form-input">
        <span class="omniauth-options centered">
          <% if request.fullpath != "/users/sign_up?nosplash=true" && session[:shibboleth_data].nil? then%>
            <button id="shibboleth-login" href="<%= user_shibboleth_omniauth_authorize_path %>" class="omniauth-login">
              <%= _('Your Organisation') %>
            </button>
          <%else%>
            <%= f.hidden_field :shibboleth_id, :value => session[:shibboleth_data][:uid] %>
          <%end%> 
        </span>
      </div>
      
      <h3 class="centered small-header">- <%= _('or') %> -</h3>
    <% end %>
    
    
    <!-- Login form email address -->
    <div class="form-input">
      <label for="user_email"><%= _('Email') %></label>
      <input type="email" id="user_email" name="user[email]" class="left-indent required" />
      <span role="" id="email_error" class="error-tooltip left-indent"></span>
    
      <div class="form-input checkbox-right">
        <%= f.label :remember_me, _('Remember email'), class: "remember_div checkbox-label" %>
        <%= f.check_box :remember_me %>
      </div>
    </div>
    
    <!-- Login form password -->
    <div class="form-input">
      <label for="user_password"><%= _('Password') %></label>
      <input type="password" id="user_password" name="user[password]" 
             class="left-indent required" value="" />
      <span role="" id="password_error" class="error-tooltip left-indent"></span>
    
      <div class="form-input checkbox-right">
        <label for="password_show" class="checkbox-label"><%= _('Show password') %></label>
        <input type="checkbox" id="password_show" />
      </div>
    </div>
    
    <div class="form-input">
      <%= render partial: 'shared/accessible_submit_button',
                 locals: {id: 'sign-in-button', 
                          val: 'Sign In', 
                          disabled_initially: true,
                          classes: 'small-input-button',
                          tooltip: _('Enter your email and password.')} %>

      <div id="forgot-password-link" class="left-indent inline">
        <%= link_to _('Forgot password?'), new_password_path('user'), :class => "primary-color" %>
      </div>
    </div>
  </fieldset>
<% end %>