Skip to content

Commit

Permalink
Refresh tree after saving Catalog Item and minor Rubocop fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ZitaNemeckova committed Jul 8, 2019
1 parent caf70ba commit db47ee7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,28 +102,28 @@ def servicetemplate_copy

def save_copy_catalog
record = find_record_with_rbac(ServiceTemplate, params[:id])
message = nil
message = nil
if record.present?
saved = record.template_copy(params[:name])
else
saved = false
message = _("Record not found.")
end
render :json => {:message => message} , :status => saved ? 200 : 400
render :json => {:message => message}, :status => saved ? 200 : 400
end

def servicetemplate_copy_cancel
add_flash(_("Copy of a Service Catalog Item was cancelled by the user"), :warning)
@sb[:action] = @edit = @record = nil
@in_a_form = false
replace_right_cell
replace_right_cell(:replace_trees => trees_to_replace([:sandt]))
end

def servicetemplate_copy_saved
add_flash(_("Copy of a Service Catalog Item was successfully saved"))
@sb[:action] = @edit = @record = nil
@in_a_form = false
replace_right_cell
add_flash(_("Copy of a Service Catalog Item was successfully saved"))
@sb[:action] = @edit = @record = nil
@in_a_form = false
replace_right_cell(:replace_trees => trees_to_replace(%i[sandt svccat stcat]))
end

def servicetemplates_names
Expand Down

0 comments on commit db47ee7

Please sign in to comment.