-#   Copyright (c) 2010-2012, Diaspora Inc.  This file is
-#   licensed under the Affero General Public License version 3 or later.  See
-#   the COPYRIGHT file.

= content_for :page_title do
  = "#{pod_name} / #{t('devise.sessions.new.sign_in')}"

= content_for :head do
  = javascript_include_tag :login

  :css
    header, #flash_alert { display:none; }
    footer{ position: absolute; bottom: 6px; }

.container{:style => 'text-align:center;'}
  #login
    %p
      = image_tag('branding/asterisk.png', :id => 'asterisk', :class => 'logo', :height => 154, :width => 154)
    %p
      = image_tag('branding/logo_caps.png', :id => 'logo', :width => 98, :height => 14)

    - flash.each do |name, msg|
      %p{:class => "login_#{name}"}= msg

    = form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f|

      %p
        = f.label :username , t('username')
        = f.text_field :username, :tabindex => 1, :value => prefilled_username, :placeholder => t('username')
      %br

      %p
        = f.label :password , t('password')
        = f.password_field :password, :tabindex => 2, :placeholder => t('password')

        - if display_password_reset_link?
          = link_to t('devise.shared.links.forgot_your_password'), new_password_path(resource_name), :id => "forgot_password_link", :tabindex => 5

      %br
      %p#controls.checkbox_select
        %span#remember_me
          - if devise_mapping.rememberable?
            = f.check_box :remember_me, :tabindex => 3
            = f.label :remember_me, t('devise.sessions.new.remember_me')
        = f.submit t('devise.sessions.new.sign_in'), :tabindex => 4


      - if display_registration_link?
        %br
        %br
        %br
        %br
        = link_to t('devise.shared.links.sign_up'), new_registration_path(resource_name)


