Skip to content

Commit

Permalink
Merge pull request #536 from h-kataria/enable_add_button_on_copy_report
Browse files Browse the repository at this point in the history
Enable Add button when copying an existing report.
  • Loading branch information
Dan Clarizio authored Mar 2, 2017
2 parents 8beba07 + b9a1efa commit 06a0c52
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/report_controller/reports/editor.rb
Original file line number Diff line number Diff line change
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 06a0c52

Please sign in to comment.