diff --git a/app/controllers/public/account_controller.rb b/app/controllers/public/account_controller.rb index c7d8b18..4b5483a 100644 --- a/app/controllers/public/account_controller.rb +++ b/app/controllers/public/account_controller.rb @@ -60,10 +60,6 @@ class AccountController < ApplicationController def signup @invitation_code = params[:invitation_code] begin - if params[:user] - params[:user].delete(:password_confirmation_clear) - params[:user].delete(:password_clear) - end @user = User.new(params[:user]) @user.terms_of_use = environment.terms_of_use @user.environment = environment @@ -213,26 +209,16 @@ class AccountController < ApplicationController @identifier = params[:identifier] valid = Person.is_available?(@identifier, environment) if valid - @status = _('This login name is available') + @status = _('Available!') @status_class = 'available' else - @status = _('This login name is unavailable') + @status = _('Unavailable!') @status_class = 'unavailable' end + @url = environment.top_url + '/' + @identifier render :partial => 'identifier_status' end - def check_email - if User.find_by_email_and_environment_id(params[:address], environment.id).nil? - @status = _('This e-mail address is available') - @status_class = 'available' - else - @status = _('This e-mail address is taken') - @status_class = 'unavailable' - end - render :partial => 'email_status' - end - def user_data user_data = if logged_in? diff --git a/app/controllers/public/home_controller.rb b/app/controllers/public/home_controller.rb index eb58dd9..9f85885 100644 --- a/app/controllers/public/home_controller.rb +++ b/app/controllers/public/home_controller.rb @@ -14,8 +14,4 @@ class HomeController < PublicController end end - def terms - @no_design_blocks = true - end - end diff --git a/app/helpers/account_helper.rb b/app/helpers/account_helper.rb index cddc4d3..6ebab20 100644 --- a/app/helpers/account_helper.rb +++ b/app/helpers/account_helper.rb @@ -1,15 +1,3 @@ module AccountHelper - def validation_classes - 'available unavailable valid invalid checking' - end - - def checking_message(key) - case key - when :url - _('Checking availability of login name...') - when :email - _('Checking if e-mail address is already taken...') - end - end end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 1980c9d..1810d20 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1317,14 +1317,4 @@ module ApplicationHelper ) + content_tag('span', ' | ', :class => 'comment-footer comment-footer-hide') end end - - def render_tabs(tabs) - titles = tabs.inject(''){ |result, tab| result << content_tag(:li, link_to(tab[:title], '#'+tab[:id]), :class => 'tab') } - contents = tabs.inject(''){ |result, tab| result << content_tag(:div, tab[:content], :id => tab[:id]) } - - content_tag :div, :class => 'ui-tabs' do - content_tag(:ul, titles) + contents - end - end - end diff --git a/app/helpers/profile_helper.rb b/app/helpers/profile_helper.rb index fbfb6dd..9ec824b 100644 --- a/app/helpers/profile_helper.rb +++ b/app/helpers/profile_helper.rb @@ -15,4 +15,12 @@ module ProfileHelper end end + def render_tabs(tabs) + titles = tabs.inject(''){ |result, tab| result << content_tag(:li, link_to(tab[:title], '#'+tab[:id]), :class => 'tab') } + contents = tabs.inject(''){ |result, tab| result << content_tag(:div, tab[:content], :id => tab[:id]) } + + content_tag :div, :class => 'ui-tabs' do + content_tag(:ul, titles) + contents + end + end end diff --git a/app/models/person.rb b/app/models/person.rb index c5d825e..6c3c609 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -116,7 +116,6 @@ class Person < Profile contact_phone contact_information description - image ] validates_multiparameter_assignments diff --git a/app/models/profile.rb b/app/models/profile.rb index fa38734..aa80706 100644 --- a/app/models/profile.rb +++ b/app/models/profile.rb @@ -148,7 +148,6 @@ class Profile < ActiveRecord::Base doc chat plugin - site ] belongs_to :user diff --git a/app/views/account/_email_status.rhtml b/app/views/account/_email_status.rhtml deleted file mode 100644 index b7f1f24..0000000 --- a/app/views/account/_email_status.rhtml +++ /dev/null @@ -1,7 +0,0 @@ -
<%= @status %>
- -<%= @status %>
- +<%= @url %> <%= @status %>
#{checking_message(:url)}
');", - :complete => "jQuery('#user_login').removeClass('checking')" - %> - -
#{checking_message(:email)}
');", - :complete => "jQuery('#user_email').removeClass('checking')", - :before => "if (!( jQuery('#user_email').valid() )) { - jQuery('#user_email').removeClass('#{validation_classes}').addClass('unavailable'); - jQuery('#email-check').html('#{_('This e-mail address is not valid')}
'); - return false; - }" - %> +<%= hidden_field_tag :invitation_code, @invitation_code %> - <%= label :profile_data, :name %> - <%= required text_field(:profile_data, :name, :rel => _('Full name')) %> +<%= required_fields_message %> +- <%= submit_button('save', _('Create my account')) %> -
- +<%= required f.password_field(:password_confirmation) %> +<%= content_tag(:small,_('To confirm, repeat your password.')) %> + +<% labelled_fields_for :profile_data, @person do |f| %> + <%= render :partial => 'profile_editor/person_form', :locals => {:f => f} %> +<% end %> + +<% unless @terms_of_use.blank? %> +<%= labelled_check_box(environment.terms_of_use_acceptance_text.blank? ? _('I accept the terms of use') : environment.terms_of_use_acceptance_text, 'user[terms_accepted]') %>
+Firsty, some tips for getting started:
-You should receive a welcome email from us shortly. Please take a second to follow the link within to confirm your account.
-You won't appear as a user until your account is confirmed.
-Customize your profile. Upload an avatar and sign up for activity notifications under Account.
-Learn the guidelines. Read the Documentation for more details on how to use new social network!
-Invite and find your Gmail, Yahoo and Hotmail contacts!
-Start exploring and Have fun!
" % [environment.name, url_for(:controller => :browse, :action => :people, :filter => 'more_recent')]) %> -<%= link_to(_('Go to the homepage'), '/') %>
<% else %> -