rosa-build/app/views/devise/sessions/new.html.haml

34 lines
2.0 KiB
Plaintext
Raw Normal View History

2012-02-28 20:43:17 +00:00
.wrap
%nav
2012-02-29 05:43:40 +00:00
%a{:href => new_register_request_path}
%p=t("layout.devise.shared_links.sign_up")
2012-02-28 20:43:17 +00:00
/ Top block
%header
.logo
/ Page
%article
2012-02-29 05:43:40 +00:00
- is_error = flash.try(:first).try(:first) == :alert # Trash
- login = t('devise.sessions.login'); password = t('devise.sessions.password')
=hidden_field_tag :login_default, login
=hidden_field_tag :password_default, password
= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :class => "form login" }) do |f|
2012-02-28 20:43:17 +00:00
%h1= title t("layout.sessions.sign_in_header")
2012-02-29 05:43:40 +00:00
= f.text_field :login, :class => "registartion-input #{is_error ? "registartion-input-error" : ''}", :onblur => "if(this.value==''){this.value='#{login}';this.className='registartion-input';} else{this.className='registartion-input-no-focus';};buttonCheck();", :onfocus => "if(this.value=='#{login}'){this.value='';this.className='registartion-input-focus';};", :onkeydown => "buttonCheck();", :type => "text", :value => login
2012-02-28 20:43:17 +00:00
%br/
2012-02-29 05:43:40 +00:00
= f.password_field :password, :class => "registartion-input #{is_error ? "registartion-input-error" : ''}", :onblur => "if(this.value==''){this.value='#{password}';this.className='registartion-input';}else{this.className='registartion-input-no-focus';};buttonCheck();", :onfocus => "if(this.value=='#{password}'){this.value='';this.className='registartion-input-focus';};", :onkeydown => "buttonCheck();", :type => "password", :value => password
2012-02-28 20:43:17 +00:00
%br/
.registration
.remember
.check
%span#niceCheckbox1.niceCheck{:onclick => "changeCheck(this)"}
= f.check_box :remember_me
.text=t('devise.sessions.remember_me')
.in=f.submit t('layout.devise.shared_links.sign_in'), :class => 'button disabled', :id => 'btnLogin'
%div{:style => "clear: both;"}
.hr
.both
#hint.error{:style => is_error ? 'display: block;' : ''}
%p=t('devise.failure.invalid')
.forgot
.password
%p= link_to t("layout.devise.shared_links.forgot_password"), new_password_path(resource_name)