Commit 2da66927c2d2e4e6151cfae115333b94f9679a24

Authored by Daniela Feitosa
1 parent 339df62d

Removed possibility to add image on signup

app/models/person.rb
... ... @@ -144,7 +144,6 @@ class Person < Profile
144 144 contact_phone
145 145 contact_information
146 146 description
147   - image
148 147 ]
149 148  
150 149 validates_multiparameter_assignments
... ...
app/views/profile_editor/_person_form.rhtml
... ... @@ -59,11 +59,3 @@
59 59 <%= optional_field(@person, 'professional_activity', f.text_field(:professional_activity, :rel => _('Professional activity'))) %>
60 60 <%= optional_field(@person, 'organization', f.text_field(:organization, :rel => _('Organization'))) %>
61 61 <%= optional_field(@person, 'organization_website', f.text_field(:organization_website, :rel => _('Organization website'))) %>
62   -
63   -<% optional_field(@person, 'image') do %>
64   - <div id="profile_choose_picture">
65   - <% f.fields_for :image_builder, @person.image do |i| %>
66   - <%= file_field_or_thumbnail(_('Image:'), @person.image, i) %><span class="person_image_maxsize"><%= _("Max size: %s (.jpg, .gif, .png)")% Image.max_size.to_humanreadable %></span>
67   - <% end %>
68   - </div>
69   -<% end %>
... ...
app/views/profile_editor/edit.rhtml
... ... @@ -12,7 +12,6 @@
12 12  
13 13 <%= render :partial => partial_for_class(@profile.class), :locals => { :f => f } %>
14 14  
15   - <% unless @profile.person? && @environment.active_person_fields.include?('image') %>
16 15 <div id="profile_change_picture_title">
17 16 <h2><%= _('Change picture') %></h2>
18 17 <span><%= unchangeable_privacy_field @profile %></span>
... ... @@ -22,7 +21,6 @@
22 21 <%= file_field_or_thumbnail(_('Image:'), @profile.image, i) %><%= _("Max size: %s (.jpg, .gif, .png)")% Image.max_size.to_humanreadable %>
23 22 <% end %>
24 23 </div>
25   - <% end %>
26 24  
27 25 <h2><%= _('Privacy options') %></h2>
28 26  
... ...
test/functional/profile_editor_controller_test.rb
... ... @@ -888,15 +888,6 @@ class ProfileEditorControllerTest &lt; ActionController::TestCase
888 888 assert_tag :tag => 'input', :attributes => {:id => 'field_added_by_plugin', :value => 'value_of_field_added_by_plugin'}
889 889 end
890 890  
891   - should 'show image upload field from environment person fields' do
892   - env = Environment.default
893   - env.custom_person_fields = { 'image' => {'active' => 'true', 'required' => 'true'} }
894   - env.save!
895   - get :edit, :profile => profile.identifier
896   - assert_tag :tag => 'input', :attributes => { :name => 'profile_data[image_builder][uploaded_data]' }
897   - assert_no_tag :tag => 'div', :attributes => { :id => 'profile_change_picture' }
898   - end
899   -
900 891 should 'show image upload field from profile editor' do
901 892 env = Environment.default
902 893 env.custom_person_fields = { }
... ...