Cannot save a modified approval workflow
This commit is contained in:
parent
176b478046
commit
7c43e2ed57
@ -238,7 +238,7 @@ class DmsfWorkflowsController < ApplicationController
|
||||
end
|
||||
|
||||
def update
|
||||
if request.put? && params[:dmsf_workflow] && @dmsf_workflow.update_attributes(
|
||||
if params[:dmsf_workflow] && @dmsf_workflow.update_attributes(
|
||||
{:name => params[:dmsf_workflow][:name]})
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
if @project
|
||||
@ -246,7 +246,8 @@ class DmsfWorkflowsController < ApplicationController
|
||||
else
|
||||
redirect_to dmsf_workflows_path
|
||||
end
|
||||
else
|
||||
else
|
||||
flash[:error] = @dmsf_workflow.errors.full_messages.to_sentence
|
||||
redirect_to dmsf_workflow_path(@dmsf_workflow)
|
||||
end
|
||||
end
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
# encoding: utf-8
|
||||
#
|
||||
# Redmine plugin for Document Management System "Features"
|
||||
#
|
||||
# Copyright (C) 2011-14 Karel Picman <karel.picman@kontron.com>
|
||||
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
@ -23,11 +25,15 @@ module DmsfWorkflowsHelper
|
||||
principal_count = scope.count
|
||||
principal_pages = Redmine::Pagination::Paginator.new principal_count, 10, params['page']
|
||||
principals = scope.offset(principal_pages.offset).limit(principal_pages.per_page).all
|
||||
|
||||
if dmsf_workflow_step_assignment_id
|
||||
s = content_tag('div', principals_radio_button_tags('step_action', principals), :id => 'users_for_delegate')
|
||||
else
|
||||
s = content_tag('div', principals_check_box_tags('user_ids[]', principals), :id => 'users')
|
||||
|
||||
if dmsf_workflow_step_assignment_id
|
||||
s = content_tag('div',
|
||||
content_tag('div', principals_radio_button_tags('user_ids[]', principals), :id => 'users_for_delegate'),
|
||||
:class => 'objects-selection')
|
||||
else
|
||||
s = content_tag('div',
|
||||
content_tag('div', principals_check_box_tags('user_ids[]', principals), :id => 'users'),
|
||||
:class => 'objects-selection')
|
||||
end
|
||||
|
||||
links = pagination_links_full(principal_pages, principal_count, :per_page_links => false) {|text, parameters, options|
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user