diff --git a/app/models/person.rb b/app/models/person.rb index 5afac75..8d7c966 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -25,7 +25,7 @@ class Person < Profile settings_items :photo, :contact_information, :birth_date, :sex, :city, :state, :country def summary - ['name', 'contact_information', 'sex', 'birth_date', 'address', 'city', 'state', 'country'].map do |col| + ['name', 'contact_information', 'contact_phone', 'sex', 'birth_date', 'address', 'city', 'state', 'country'].map do |col| [ col.humanize, self.send(col) ] end end diff --git a/app/views/profile_editor/person.rhtml b/app/views/profile_editor/person.rhtml index e9361ff..8dd4783 100644 --- a/app/views/profile_editor/person.rhtml +++ b/app/views/profile_editor/person.rhtml @@ -2,18 +2,21 @@ <%= error_messages_for :profile %> -<% labelled_form_for :profile, @profile do |f| %> +<% labelled_form_for :profile_data, @profile do |f| %> <%= f.text_field(:name) %> + <%= f.text_field(:contact_information) %> + <%= f.text_field(:contact_phone) %> <%= _('Sex: ') %> <%= display_form_field(_('Male'), radio_button(:profile, :sex, 'male')) %> <%= display_form_field(_('Female'), radio_button(:profile, :sex, 'female')) %> + <%= f.text_field(:birth_date) %> + <%= f.text_field(:address) %> <%= f.text_field(:city) %> <%= f.text_field(:state) %> <%= f.text_field(:country) %> <% button_bar do %> <%= submit_button('save', _('Save'), :cancel => {:action => 'index'}) %> <% end %> - <% end %> <%# = generate_form :info, @info, {...} %> diff --git a/test/functional/profile_editor_controller_test.rb b/test/functional/profile_editor_controller_test.rb index d74880d..34a1575 100644 --- a/test/functional/profile_editor_controller_test.rb +++ b/test/functional/profile_editor_controller_test.rb @@ -193,7 +193,7 @@ class ProfileEditorControllerTest < Test::Unit::TestCase should 'display profile publication option in edit profile screen' do profile = Profile['ze'] get :edit, :profile => 'ze' - assert_tag :tag => 'input', :attributes => { :type => 'checkbox', :checked => 'checked', :name => 'profile_data[public_profile]', :value => 'true' } + assert_tag :tag => 'input', :attributes => { :type => 'checkbox', :checked => 'checked', :name => 'profile_data[public_profile]', :value => 'true' } assert_tag :tag => 'input', :attributes => { :type => 'hidden', :name => 'profile_data[public_profile]', :value => false } end -- libgit2 0.21.2