diff --git a/app/assets/javascripts/reports/new.js b/app/assets/javascripts/reports/new.js index 9f4962488..d0a7e107a 100644 --- a/app/assets/javascripts/reports/new.js +++ b/app/assets/javascripts/reports/new.js @@ -1299,6 +1299,8 @@ function reportHandsonTableConverter() { }); } + $('#reportWizardEditWarning').modal('show'); + initGenerateButton(); initReportWizard(); initDropdowns(); diff --git a/app/views/reports/_report_edit_warning_modal.html.erb b/app/views/reports/_report_edit_warning_modal.html.erb new file mode 100644 index 000000000..ef5fbac9d --- /dev/null +++ b/app/views/reports/_report_edit_warning_modal.html.erb @@ -0,0 +1,19 @@ + diff --git a/app/views/reports/new.html.erb b/app/views/reports/new.html.erb index 3b3f988c8..9766afaf3 100644 --- a/app/views/reports/new.html.erb +++ b/app/views/reports/new.html.erb @@ -87,4 +87,8 @@ +<% if @edit %> + <%= render partial: 'report_edit_warning_modal' %> +<% end %> + <%= javascript_include_tag("reports/new") %> diff --git a/config/locales/en.yml b/config/locales/en.yml index abe7cd1a5..0bebc67e8 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -602,6 +602,10 @@ en: unsaved_work: "Are you sure you want to leave this page? All unsaved data will be lost." no_content_for_PDF_html: "

No content

" no_permissions: "You don't have permission to manage this column" + edit_warning_modal: + title: "Report content" + description: "The content of Project, Experiments and Tasks included in this report might have been updated in SciNote since the report was last generated. Therefore the content of the report you are about to edit might be different from the saved version." + button: "Okay" save_PDF_to_inventory_modal: pdf_not_ready: "The PDF of this report isn't ready yet, please try again in a minute" description_one: "Here you can save PDF report to an inventory item."