2012-02-29 11:38:13 +00:00
|
|
|
.wrap
|
|
|
|
/ Top block
|
|
|
|
%header
|
|
|
|
.logo
|
|
|
|
/ Page
|
|
|
|
- uname_error = name_error = email_error = password_error = password_confirm_error = nil
|
|
|
|
- if resource.errors.present? # Trash
|
|
|
|
- resource.errors.each do |attr, array|
|
|
|
|
-uname_error = array if attr == :uname
|
|
|
|
-name_error = array if attr == :name
|
|
|
|
-email_error = array if attr == :email
|
|
|
|
-password_error = array if attr == :password
|
|
|
|
-password_confirm_error = array if attr == :password_confirmation
|
2012-02-29 16:54:44 +00:00
|
|
|
|
2012-02-29 11:38:13 +00:00
|
|
|
%article
|
2011-10-11 21:56:51 +01:00
|
|
|
= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :class => "form" }) do |f|
|
2012-02-09 21:45:26 +00:00
|
|
|
= hidden_field_tag :invitation_token, @invitation_token
|
2012-02-29 11:38:13 +00:00
|
|
|
.left.first=t('activerecord.attributes.user.uname')
|
|
|
|
.right.first
|
2012-02-29 16:54:44 +00:00
|
|
|
= f.text_field :uname, :id => 'login', :class => "registartion-input #{uname_error ? "registartion-input-error" : ''}", :onblur => "if(this.value==''){this.value='';this.className='registartion-input';}else{this.className='registartion-input-no-focus';};", :onfocus => "if(this.value==''){this.value='';this.className='registartion-input-focus';};"
|
2012-02-29 11:38:13 +00:00
|
|
|
.both
|
|
|
|
.left=t('activerecord.attributes.user.name')
|
|
|
|
.right
|
2012-02-29 16:54:44 +00:00
|
|
|
= f.text_field :name, :id => 'name', :class => "registartion-input #{name_error ? "registartion-input-error" : ''}", :onblur => "if(this.value==''){this.value='';this.className='registartion-input';}else{this.className='registartion-input-no-focus';};", :onfocus => "if(this.value==''){this.value='';this.className='registartion-input-focus';};"
|
2012-02-29 11:38:13 +00:00
|
|
|
.both
|
|
|
|
.left=t('activerecord.attributes.user.email')
|
|
|
|
.right
|
2012-02-29 16:54:44 +00:00
|
|
|
= f.text_field :email, :id => 'email', :readonly => 'readonly', :class => "registartion-input #{email_error ? "registartion-input-error" : ''}", :onblur => "if(this.value==''){this.value='';this.className='registartion-input';}else{this.className='registartion-input-no-focus';};", :onfocus => "if(this.value==''){this.value='';this.className='registartion-input-focus';};"
|
2012-02-29 11:38:13 +00:00
|
|
|
.both
|
|
|
|
.left=t('activerecord.attributes.user.password')
|
|
|
|
.right
|
2012-02-29 16:54:44 +00:00
|
|
|
= f.text_field :password, :id => 'pass', :class => "registartion-input #{password_error ? "registartion-input-error" : ''}", :onblur => "if(this.value==''){this.value='';this.className='registartion-input';}else{this.className='registartion-input-no-focus';};", :onfocus => "if(this.value==''){this.value='';this.className='registartion-input-focus';};"
|
2012-02-29 11:38:13 +00:00
|
|
|
.both
|
|
|
|
.left=t('activerecord.attributes.user.password_confirm')
|
|
|
|
.right
|
|
|
|
= f.text_field :password_confirmation, :id => 'pass2', :class => "registartion-input #{password_confirm_error ? "registartion-input-error" : ''}", :onClick => "this.className='registartion-input-focus';disError(this);", :onblur => "if(this.value==''){this.value='';this.className='registartion-input';}else{this.className='registartion-input-no-focus';};buttonCheck();", :onfocus => "if(this.value==''){this.value='';this.className='registartion-input-focus';};", :onkeydown => "buttonCheck();"
|
|
|
|
.both
|
|
|
|
.in
|
|
|
|
=f.submit t("layout.devise.shared_links.sign_up"), :class => 'button', :id => 'btnLogin'
|
|
|
|
.both
|
2012-02-29 16:54:44 +00:00
|
|
|
|
|
|
|
-if uname_error
|
|
|
|
.error.login#hintLogin
|
|
|
|
%p=uname_error
|
|
|
|
-if name_error
|
|
|
|
.error.name#hintName
|
|
|
|
%p=name_error
|
|
|
|
-if email_error
|
|
|
|
.error.email#hintEmail
|
|
|
|
%p=email_error
|
|
|
|
-if password_error
|
|
|
|
.error.password#hintPassword
|
|
|
|
%p=password_error
|