Commit d0cc3c8aa04e050891e550169fae9dce0d4ed876
1 parent
6fa989a8
Exists in
profile_api_improvements
and in
1 other branch
Fixes unfollowing profile to use POST request
Showing
3 changed files
with
7 additions
and
8 deletions
Show diff stats
app/views/blocks/profile_info_actions/_common.html.erb
1 | 1 | <li><%= report_abuse(profile, :button) %></li> |
2 | -<%if logged_in? && (user != profile) && profile.allow_followers?%> | |
3 | -<li> | |
4 | - <% follow = user.follows?(profile) %> | |
5 | - <%= button(:unfollow, content_tag('span', _('Unfollow')), {:profile => profile.identifier, :controller => 'profile', :action => 'unfollow'}, :id => 'action-unfollow', :title => _("Unfollow"), :style => follow ? "" : "display: none;") %> | |
2 | +<% if logged_in? && (user != profile) && profile.allow_followers? %> | |
3 | + <li> | |
4 | + <% follow = user.follows?(profile) %> | |
5 | + <%= button(:unfollow, content_tag('span', _('Unfollow')), {:profile => profile.identifier, :controller => 'profile', :action => 'unfollow'}, :method => :post, :id => 'action-unfollow', :title => _("Unfollow"), :style => follow ? "" : "display: none;") %> | |
6 | 6 | <%= button(:ok, content_tag('span', _('Follow')), {:profile => profile.identifier, :controller => 'profile', :action => 'find_profile_circles'}, :id => 'action-follow', :title => _("Follow"), :style => follow ? "display: none;" : "") %> |
7 | 7 | <div id="circles-container" style="display: none;"> |
8 | 8 | </div> |
9 | -</li> | |
10 | -<%end%> | |
9 | + </li> | |
10 | +<% end %> | |
11 | 11 | <%= render_environment_features(:profile_actions) %> | ... | ... |
app/views/followers/_profile_list.html.erb
... | ... | @@ -7,7 +7,7 @@ |
7 | 7 | <%= button_without_text :remove, content_tag('span',_('unfollow')), |
8 | 8 | { :controller => "profile", :profile => followed_profile.identifier, :follower_id => profile.id, |
9 | 9 | :action => 'unfollow', :redirect_to => url_for({:controller => "followers", :profile => profile.identifier}) }, |
10 | - :title => _('remove') %> | |
10 | + :method => :post, :title => _('remove') %> | |
11 | 11 | <%= modal_icon_button :edit, _('change category'), |
12 | 12 | url_for(:controller => 'followers', :action => 'set_category_modal', |
13 | 13 | :followed_profile_id => followed_profile.id) %> | ... | ... |
features/follow_profile.feature