Commit 2da66927c2d2e4e6151cfae115333b94f9679a24
1 parent
339df62d
Exists in
master
and in
28 other branches
Removed possibility to add image on signup
Showing
4 changed files
with
0 additions
and
20 deletions
Show diff stats
app/models/person.rb
| @@ -144,7 +144,6 @@ class Person < Profile | @@ -144,7 +144,6 @@ class Person < Profile | ||
| 144 | contact_phone | 144 | contact_phone |
| 145 | contact_information | 145 | contact_information |
| 146 | description | 146 | description |
| 147 | - image | ||
| 148 | ] | 147 | ] |
| 149 | 148 | ||
| 150 | validates_multiparameter_assignments | 149 | validates_multiparameter_assignments |
app/views/profile_editor/_person_form.rhtml
| @@ -59,11 +59,3 @@ | @@ -59,11 +59,3 @@ | ||
| 59 | <%= optional_field(@person, 'professional_activity', f.text_field(:professional_activity, :rel => _('Professional activity'))) %> | 59 | <%= optional_field(@person, 'professional_activity', f.text_field(:professional_activity, :rel => _('Professional activity'))) %> |
| 60 | <%= optional_field(@person, 'organization', f.text_field(:organization, :rel => _('Organization'))) %> | 60 | <%= optional_field(@person, 'organization', f.text_field(:organization, :rel => _('Organization'))) %> |
| 61 | <%= optional_field(@person, 'organization_website', f.text_field(:organization_website, :rel => _('Organization website'))) %> | 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,7 +12,6 @@ | ||
| 12 | 12 | ||
| 13 | <%= render :partial => partial_for_class(@profile.class), :locals => { :f => f } %> | 13 | <%= render :partial => partial_for_class(@profile.class), :locals => { :f => f } %> |
| 14 | 14 | ||
| 15 | - <% unless @profile.person? && @environment.active_person_fields.include?('image') %> | ||
| 16 | <div id="profile_change_picture_title"> | 15 | <div id="profile_change_picture_title"> |
| 17 | <h2><%= _('Change picture') %></h2> | 16 | <h2><%= _('Change picture') %></h2> |
| 18 | <span><%= unchangeable_privacy_field @profile %></span> | 17 | <span><%= unchangeable_privacy_field @profile %></span> |
| @@ -22,7 +21,6 @@ | @@ -22,7 +21,6 @@ | ||
| 22 | <%= file_field_or_thumbnail(_('Image:'), @profile.image, i) %><%= _("Max size: %s (.jpg, .gif, .png)")% Image.max_size.to_humanreadable %> | 21 | <%= file_field_or_thumbnail(_('Image:'), @profile.image, i) %><%= _("Max size: %s (.jpg, .gif, .png)")% Image.max_size.to_humanreadable %> |
| 23 | <% end %> | 22 | <% end %> |
| 24 | </div> | 23 | </div> |
| 25 | - <% end %> | ||
| 26 | 24 | ||
| 27 | <h2><%= _('Privacy options') %></h2> | 25 | <h2><%= _('Privacy options') %></h2> |
| 28 | 26 |
test/functional/profile_editor_controller_test.rb
| @@ -888,15 +888,6 @@ class ProfileEditorControllerTest < ActionController::TestCase | @@ -888,15 +888,6 @@ class ProfileEditorControllerTest < ActionController::TestCase | ||
| 888 | assert_tag :tag => 'input', :attributes => {:id => 'field_added_by_plugin', :value => 'value_of_field_added_by_plugin'} | 888 | assert_tag :tag => 'input', :attributes => {:id => 'field_added_by_plugin', :value => 'value_of_field_added_by_plugin'} |
| 889 | end | 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 | should 'show image upload field from profile editor' do | 891 | should 'show image upload field from profile editor' do |
| 901 | env = Environment.default | 892 | env = Environment.default |
| 902 | env.custom_person_fields = { } | 893 | env.custom_person_fields = { } |