User/Person models merge

This commit is contained in:
Stella Rouzi 2014-06-23 19:07:50 +03:00
parent 66b84e3660
commit 23bf55b66c
80 changed files with 1064 additions and 1221 deletions

View file

@ -1,7 +0,0 @@
=p.input :mobile, :label => "Mobile No (Include country code)", :input_html => {:placeholder => "Eg. +336812345679"}, :hint => "Only visible to org team & volunteer coordinator"
=p.input :tshirt, :label => "Tshirt Size", :collection => [["Choose", nil],["XS","XS"],["S","S"],["M", "M"], ["L", "L"], ["XL", "XL"], ["XXL", "XXL"], ["XXXL", "XXXL"], ["Girl-S","Girl-s"], ["Girl-M","Girl-M"], ["Girl-L","Girl-L"], ["Girl-XL","Girl-XL"]]
=p.input :languages, :label => "Which languages do you speak", :hint => "Start from the one you speak best and use 2 letter symbolization, eg. EN, GR, DE"
= p.input :volunteer_experience, :label => "Do you have any past experience?", :input_html => {:rows => 3, :class => "span6"}

View file

@ -0,0 +1,7 @@
= u.input :mobile, :label => "Mobile No (Include country code)", :input_html => {:placeholder => "Eg. +336812345679"}, :hint => "Only visible to org team & volunteer coordinator"
= u.input :tshirt, :label => "Tshirt Size", :collection => [["Choose", nil],["XS","XS"],["S","S"],["M", "M"], ["L", "L"], ["XL", "XL"], ["XXL", "XXL"], ["XXXL", "XXXL"], ["Girl-S","Girl-s"], ["Girl-M","Girl-M"], ["Girl-L","Girl-L"], ["Girl-XL","Girl-XL"]]
= u.input :languages, :label => "Which languages do you speak", :hint => "Start from the one you speak best and use 2 letter symbolization, eg. EN, GR, DE"
= u.input :volunteer_experience, :label => "Do you have any past experience?", :input_html => {:rows => 3, :class => "span6"}

View file

@ -2,19 +2,17 @@
.col-md-12
= semantic_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f|
= f.inputs :name => "Profile" do
= f.fields_for :person do |p|
= p.input :first_name, :as => :string
= p.input :last_name, :as => :string
= p.input :public_name, :as => :string
= p.input :irc_nickname, :label => "IRC nick:", :as => :string
= p.input :company, :label => "Affiliation", :as => :string, :hint => "This could be a company, a user group, or nothing at all."
= p.input :biography, :input_html => {:rows => 5, "onkeyup" => "word_count(this, 'biography-count', 150)"}, :for => :person
= f.fields_for :user do |u|
= u.input :name, :as => :string
= u.input :nickname, :as => :string
= u.input :affiliation, :as => :string, :hint => "This could be a company, a user group, or nothing at all."
= u.input :biography, :input_html => {:rows => 5, "onkeyup" => "word_count(this, 'biography-count', 150)"}
You have used
%span#biography-count #{current_user.person.biography_word_count}
%span#biography-count #{current_user.biography_word_count}
words. Biographies are limited to 150 words.
%br
%br
= render :partial => 'devise/registrations/volunteerperson', :locals => {:p => p}
= render :partial => 'devise/registrations/volunteeruser', :locals => {:u => u}
= f.inputs :name => 'OpenID' do
%h4
Currently using the following openIDs:

View file

@ -5,6 +5,7 @@
.well
= semantic_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
= f.input :email
= f.input :name, required: true
= f.input :password
= f.input :password_confirmation
= f.action :submit, as: :button, label: 'Sign Up', button_html: {class: 'btn btn-primary'}