Skip to content

Commit

Permalink
use widget's title in flash messages
Browse files Browse the repository at this point in the history
  • Loading branch information
yrudman committed Dec 5, 2018
1 parent 189dfe3 commit 2dd0e7d
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 2dd0e7d

Please sign in to comment.