From 072475b8a5bce6a05a6d6b18b4240d81def6fad8 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 15 Jul 2012 15:50:57 +0000 Subject: [PATCH] Remember "Only display used statuses" checkbox value after update. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9997 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/workflows_controller.rb | 4 ++-- app/views/workflows/edit.html.erb | 1 + app/views/workflows/permissions.html.erb | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/controllers/workflows_controller.rb b/app/controllers/workflows_controller.rb index 7f397bc4e..793635667 100644 --- a/app/controllers/workflows_controller.rb +++ b/app/controllers/workflows_controller.rb @@ -38,7 +38,7 @@ class WorkflowsController < ApplicationController } } if @role.save - redirect_to :action => 'edit', :role_id => @role, :tracker_id => @tracker + redirect_to :action => 'edit', :role_id => @role, :tracker_id => @tracker, :used_statuses_only => params[:used_statuses_only] return end end @@ -64,7 +64,7 @@ class WorkflowsController < ApplicationController if request.post? && @role && @tracker WorkflowPermission.replace_permissions(@tracker, @role, params[:permissions] || {}) - redirect_to :action => 'permissions', :role_id => @role, :tracker_id => @tracker + redirect_to :action => 'permissions', :role_id => @role, :tracker_id => @tracker, :used_statuses_only => params[:used_statuses_only] return end diff --git a/app/views/workflows/edit.html.erb b/app/views/workflows/edit.html.erb index 25034e379..71db6ad4e 100644 --- a/app/views/workflows/edit.html.erb +++ b/app/views/workflows/edit.html.erb @@ -31,6 +31,7 @@ <%= form_tag({}, :id => 'workflow_form' ) do %> <%= hidden_field_tag 'tracker_id', @tracker.id %> <%= hidden_field_tag 'role_id', @role.id %> + <%= hidden_field_tag 'used_statuses_only', params[:used_statuses_only] %>
<%= render :partial => 'form', :locals => {:name => 'always', :workflows => @workflows['always']} %> diff --git a/app/views/workflows/permissions.html.erb b/app/views/workflows/permissions.html.erb index 2e7c4e092..ecfadec02 100644 --- a/app/views/workflows/permissions.html.erb +++ b/app/views/workflows/permissions.html.erb @@ -30,6 +30,7 @@ <%= form_tag({}, :id => 'workflow_form' ) do %> <%= hidden_field_tag 'tracker_id', @tracker.id %> <%= hidden_field_tag 'role_id', @role.id %> + <%= hidden_field_tag 'used_statuses_only', params[:used_statuses_only] %>