Skip to content

Commit

Permalink
Enable Add button when copying an existing report.
Browse files Browse the repository at this point in the history
Prefixed report name with "Copy of" to enable Add button when copying a report

https://bugzilla.redhat.com/show_bug.cgi?id=1428132
  • Loading branch information
h-kataria committed Mar 1, 2017
1 parent be2fa7e commit b9a1efa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/report_controller/reports/editor.rb
Expand Up @@ -1391,6 +1391,7 @@ def set_form_vars
end

@edit[:current] = ["copy", "new"].include?(params[:action]) ? {} : copy_hash(@edit[:new])
@edit[:new][:name] = "Copy of #{@rpt.name}" if params[:pressed] == "miq_report_copy"

# For trend reports, check for percent field chosen
if @rpt.db && @rpt.db == TREND_MODEL &&
Expand Down

0 comments on commit b9a1efa

Please sign in to comment.