X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dc173881e517943e707ab6fb701eee0a524c0c55..965f32d545d7c44ad7b36264b818b930a50d8901:/app/controllers/issues_controller.rb?ds=sidebyside diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 576b3309f..407646830 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -52,7 +52,7 @@ class IssuesController < ApplicationController unless create_new_issue_params.blank? @issue = Issue.find_or_initialize_by(create_new_issue_params) path = 'issues.report_strings.' + @issue.reportable.class.name.to_s - @report_strings_yaml = t( path) + @report_strings_yaml = t(path) end end @@ -203,25 +203,13 @@ class IssuesController < ApplicationController def get_report_details details = params[:report][:details] + "--||--" - path = 'issues.report_strings.' + @issue.reportable.class.name.to_s - @report_strings_yaml = t( path) - @report_strings_yaml.each do |k,v| - if params[k.to_sym] - details = details + params[k.to_sym] + "--||--" - end - end + details = details + params[:report_type].to_s + "--||--" return details end def check_report_params - path = 'issues.report_strings.' + @issue.reportable.class.name.to_s - @report_strings_yaml = t( path) - if params[:report] and params[:report][:details] - @report_strings_yaml.each do |k,v| - if params[k.to_sym] - return true - end - end + if params[:report] and params[:report][:details] and params[:report_type] + return true end return false end