Add protocolsIO import preview [SCI-8187] (#5183)

This commit is contained in:
ajugo 2023-03-23 12:18:30 +01:00 committed by GitHub
parent 72186e8e8d
commit 4c42748e40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 1 deletions

View file

@ -1,4 +1,4 @@
/* global animateSpinner PerfectSb initHandsOnTable */
/* global animateSpinner PerfectSb initHandsOnTable ProtocolsIndex */
/* global HelperModule dropdownSelector */
/* eslint-disable no-use-before-define, no-alert */
@ -213,6 +213,7 @@ function handleFormSubmit(modal) {
animateSpinner(modal, false);
modal.modal('hide');
HelperModule.flashAlertMsg(data.message, 'success');
ProtocolsIndex.reloadTable();
},
error: function(data) {
showFormErrors(modal, data.responseJSON.validation_errors);

View file

@ -37,6 +37,7 @@
<%= render partial: "protocols/index/protocol_filters.html.erb" %>
<%= render partial: "protocols/index/delete_draft_modal.html.erb" %>
<%= render partial: "protocols/index/linked_children_modal.html.erb" %>
<%= render partial: "protocols/index/protocol_preview_modal.html.erb" %>
<%= render partial: "protocols/index/protocolsio_modal.html.erb" %>
<%= render partial: "protocols/index/new_protocol_modal.html.erb", locals: {type: 'new'} %>

View file

@ -0,0 +1,13 @@
<div class="modal" id="protocol-preview-modal" tabindex="-1" role="dialog" aria-labelledby="protocol-preview-modal-label">
<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">&times;</span></button>
<h4 class="modal-title" id="protocol-preview-modal-label">
</h4>
</div>
<div class="modal-body"></div>
<div class="modal-footer"></div>
</div>
</div>
</div>