mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-21 07:26:15 +08:00
Add warning modal to report edit mode [SCI-5621] (#3266)
* Add warning modal to report edit mode [SCI-5621] * Move report editing modal to partial [SCI-5621]
This commit is contained in:
parent
7752267808
commit
01dfd305ab
|
@ -1299,6 +1299,8 @@ function reportHandsonTableConverter() {
|
|||
});
|
||||
}
|
||||
|
||||
$('#reportWizardEditWarning').modal('show');
|
||||
|
||||
initGenerateButton();
|
||||
initReportWizard();
|
||||
initDropdowns();
|
||||
|
|
19
app/views/reports/_report_edit_warning_modal.html.erb
Normal file
19
app/views/reports/_report_edit_warning_modal.html.erb
Normal file
|
@ -0,0 +1,19 @@
|
|||
<div class="modal" id="reportWizardEditWarning" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">
|
||||
<%= t("projects.reports.new.edit_warning_modal.title") %>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<%= t("projects.reports.new.edit_warning_modal.description") %>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal"><%= t("projects.reports.new.edit_warning_modal.button") %>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -87,4 +87,8 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<% if @edit %>
|
||||
<%= render partial: 'report_edit_warning_modal' %>
|
||||
<% end %>
|
||||
|
||||
<%= javascript_include_tag("reports/new") %>
|
||||
|
|
|
@ -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: "<h1>No content</h1>"
|
||||
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."
|
||||
|
|
Loading…
Reference in a new issue