app/views/imports/_csv_error_modal.html.erb
<div class="modal show csv-error" style="display: block;">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title text-danger">CSV Import Error</h5>
</div>
<div class="modal-body">
<%= sanitize import_error %>
</div>
<div class="modal-footer">
<button type="button" class="main-btn primary-btn btn-hover" onclick="dismissCsvErrorModal()">OK</button>
</div>
</div>
</div>
</div>
<div class="modal-backdrop show csv-error"></div>
<script type="text/javascript">
function dismissCsvErrorModal () {
document.querySelectorAll('.csv-error').forEach(function (el) {
el.remove()
})
}
</script>