diff --git a/app/assets/javascripts/reports/new.js b/app/assets/javascripts/reports/new.js index b63d148c1..4da092c4a 100644 --- a/app/assets/javascripts/reports/new.js +++ b/app/assets/javascripts/reports/new.js @@ -980,9 +980,6 @@ function reportHandsonTableConverter() { // Project reportData.project_id = dropdownSelector.getValues('#projectSelector'); - // Template - reportData.template_id = dropdownSelector.getValues('#templateSelector'); - // Template values reportData.template_values = {}; $.each($('.report-template-values-container').find('.sci-input-field, select'), function(i, field) { @@ -1030,6 +1027,7 @@ function reportHandsonTableConverter() { }); // Settings + reportData.report.settings.template = dropdownSelector.getValues('#templateSelector'); reportData.report.settings.all_tasks = $('.project-contents-container .select-all-my-modules-checkbox') .prop('checked'); $.each($('.task-contents-container .content-element .protocol-setting'), function(i, e) { diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb index a12fe6ea9..897e21727 100644 --- a/app/controllers/reports_controller.rb +++ b/app/controllers/reports_controller.rb @@ -186,7 +186,7 @@ class ReportsController < ApplicationController respond_to do |format| format.json do @report.update!(pdf_file_processing: true) - Reports::PdfJob.perform_later(@report, 'template_1', current_user) + Reports::PdfJob.perform_later(@report, @report.settings[:template], current_user) render json: { message: I18n.t('projects.reports.index.generation.accepted_message') } @@ -548,6 +548,6 @@ class ReportsController < ApplicationController end def generate_pdf_report - Reports::PdfJob.perform_later(@report, 'template_1', current_user) if @report.persisted? + Reports::PdfJob.perform_later(@report, @report.settings[:template], current_user) if @report.persisted? end end diff --git a/app/views/reports/templates/template_2/cover.html.erb b/app/views/reports/templates/template_2/cover.html.erb index fe859aeaf..6bd740f9b 100644 --- a/app/views/reports/templates/template_2/cover.html.erb +++ b/app/views/reports/templates/template_2/cover.html.erb @@ -23,6 +23,7 @@ ul { list-style-type: none; + padding: 0; } li { @@ -72,7 +73,7 @@
- + EXECUTIVE SUMMARY