Skip to content

Commit

Permalink
Merge pull request #5047 from yrudman/use-widget-title-in-flas-messages
Browse files Browse the repository at this point in the history
Use widget's title in flash messages
  • Loading branch information
mzazrivec committed Dec 6, 2018
2 parents 4c6de42 + 2dd0e7d commit 05165ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/report_controller/widgets.rb
Expand Up @@ -76,7 +76,7 @@ def widget_edit
if !@widget || @widget.id.blank?
add_flash(_("Add of new Widget was cancelled by the user"))
else
add_flash(_("Edit of Widget \"%{name}\" was cancelled by the user") % {:name => get_record_display_name(@widget)})
add_flash(_("Edit of Widget \"%{title}\" was cancelled by the user") % {:title => @widget.title})
end
get_node_info
@widget = nil
Expand All @@ -90,7 +90,7 @@ def widget_edit
widget_set_record_vars(@widget)
if widget_validate_entries && @widget.save_with_shortcuts(@edit[:new][:shortcuts].to_a)
AuditEvent.success(build_saved_audit(@widget, @edit))
add_flash(_("Widget \"%{name}\" was saved") % {:name => get_record_display_name(@widget)})
add_flash(_("Widget \"%{title}\" was saved") % {:title => @widget.title})
params[:id] = @widget.id.to_s # reset id in params for show
# Build the filter expression and attach widget to schedule filter
exp = {}
Expand Down

0 comments on commit 05165ae

Please sign in to comment.