From 2da66927c2d2e4e6151cfae115333b94f9679a24 Mon Sep 17 00:00:00 2001 From: Daniela Soares Feitosa Date: Sun, 4 Nov 2012 17:12:36 -0200 Subject: [PATCH] Removed possibility to add image on signup --- app/models/person.rb | 1 - app/views/profile_editor/_person_form.rhtml | 8 -------- app/views/profile_editor/edit.rhtml | 2 -- test/functional/profile_editor_controller_test.rb | 9 --------- 4 files changed, 0 insertions(+), 20 deletions(-) diff --git a/app/models/person.rb b/app/models/person.rb index 648b98a..24f9a10 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -144,7 +144,6 @@ class Person < Profile contact_phone contact_information description - image ] validates_multiparameter_assignments diff --git a/app/views/profile_editor/_person_form.rhtml b/app/views/profile_editor/_person_form.rhtml index c84d99a..d4844d1 100644 --- a/app/views/profile_editor/_person_form.rhtml +++ b/app/views/profile_editor/_person_form.rhtml @@ -59,11 +59,3 @@ <%= optional_field(@person, 'professional_activity', f.text_field(:professional_activity, :rel => _('Professional activity'))) %> <%= optional_field(@person, 'organization', f.text_field(:organization, :rel => _('Organization'))) %> <%= optional_field(@person, 'organization_website', f.text_field(:organization_website, :rel => _('Organization website'))) %> - -<% optional_field(@person, 'image') do %> -
- <% f.fields_for :image_builder, @person.image do |i| %> - <%= file_field_or_thumbnail(_('Image:'), @person.image, i) %><%= _("Max size: %s (.jpg, .gif, .png)")% Image.max_size.to_humanreadable %> - <% end %> -
-<% end %> diff --git a/app/views/profile_editor/edit.rhtml b/app/views/profile_editor/edit.rhtml index 361c3f0..5a074bd 100644 --- a/app/views/profile_editor/edit.rhtml +++ b/app/views/profile_editor/edit.rhtml @@ -12,7 +12,6 @@ <%= render :partial => partial_for_class(@profile.class), :locals => { :f => f } %> - <% unless @profile.person? && @environment.active_person_fields.include?('image') %>

<%= _('Change picture') %>

<%= unchangeable_privacy_field @profile %> @@ -22,7 +21,6 @@ <%= file_field_or_thumbnail(_('Image:'), @profile.image, i) %><%= _("Max size: %s (.jpg, .gif, .png)")% Image.max_size.to_humanreadable %> <% end %>
- <% end %>

<%= _('Privacy options') %>

diff --git a/test/functional/profile_editor_controller_test.rb b/test/functional/profile_editor_controller_test.rb index 1af2662..3dac0d3 100644 --- a/test/functional/profile_editor_controller_test.rb +++ b/test/functional/profile_editor_controller_test.rb @@ -888,15 +888,6 @@ class ProfileEditorControllerTest < ActionController::TestCase assert_tag :tag => 'input', :attributes => {:id => 'field_added_by_plugin', :value => 'value_of_field_added_by_plugin'} end - should 'show image upload field from environment person fields' do - env = Environment.default - env.custom_person_fields = { 'image' => {'active' => 'true', 'required' => 'true'} } - env.save! - get :edit, :profile => profile.identifier - assert_tag :tag => 'input', :attributes => { :name => 'profile_data[image_builder][uploaded_data]' } - assert_no_tag :tag => 'div', :attributes => { :id => 'profile_change_picture' } - end - should 'show image upload field from profile editor' do env = Environment.default env.custom_person_fields = { } -- libgit2 0.21.2