Skip to content

Commit

Permalink
No options filtering in cancel mode
Browse files Browse the repository at this point in the history
  • Loading branch information
gildub committed Jul 9, 2018
1 parent b11a636 commit 3633a9f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/controllers/network_router_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,18 +146,18 @@ def edit
def update
assert_privileges("network_router_edit")
@router = find_record_with_rbac(NetworkRouter, params[:id])
options = form_params(params)
if switch_to_bool(params[:external_gateway])
options.merge!(form_external_gateway(params))
else
options.merge!(form_external_gateway({}))
end

case params[:button]
when "cancel"
cancel_action(_("Edit of Router \"%{name}\" was cancelled by the user") % {:name => @router.name})

when "save"
options = form_params(params)
if switch_to_bool(params[:external_gateway])
options.merge!(form_external_gateway(params))
else
options.merge!(form_external_gateway({}))
end
task_id = @router.update_network_router_queue(session[:userid], options)

add_flash(_("Router update failed: Task start failed: ID [%{id}]") %
Expand Down

0 comments on commit 3633a9f

Please sign in to comment.