Commit 881a040a4a92b950db1574097036dd35730df4ea
1 parent
5aa7a5fa
Exists in
tasks_keep_filter_params
Changes to fix problem about lose filter params if perform a submit post action in a task list
Showing
2 changed files
with
18 additions
and
0 deletions
Show diff stats
controllers/myprofile/proposals_discussion_plugin_tasks_controller.rb
... | ... | @@ -44,6 +44,14 @@ class ProposalsDiscussionPluginTasksController < TasksController |
44 | 44 | @failed = params ? params[:failed] : {} |
45 | 45 | |
46 | 46 | @responsible_candidates = profile.members.by_role(profile.roles.reject {|r| !r.has_permission?('perform_task')}).order('name asc') if profile.organization? |
47 | + | |
48 | + @params_tags = [] | |
49 | + params.each do |key,value| | |
50 | + if key =~ /filter_/ && value | |
51 | + @params_tags << view_context.hidden_field_tag(key, value) | |
52 | + end | |
53 | + end | |
54 | + | |
47 | 55 | end |
48 | 56 | |
49 | 57 | def save_categories | ... | ... |
views/proposals_discussion_plugin_tasks/index.html.erb
... | ... | @@ -51,6 +51,16 @@ |
51 | 51 | </p> |
52 | 52 | <% else %> |
53 | 53 | <%= form_tag :action => 'close' do%> |
54 | + | |
55 | + <% if !@params_tags.empty? %> | |
56 | + <p> | |
57 | + <% @params_tags.each do |hidden_tag| %> | |
58 | + | |
59 | + <%= hidden_tag %> | |
60 | + <% end %> | |
61 | + </p> | |
62 | + <% end %> | |
63 | + | |
54 | 64 | <% button_bar(:class => 'task-actions') do %> |
55 | 65 | <%# FiXME button(:edit, _('View my requests'), :action => 'list_requested') %> |
56 | 66 | <%# FIXME button('menu-mail', _('Send request'), :action => 'new') %> | ... | ... |