Merge pull request #5466 from G-Chubinidze/gc_SCI_8496

"Save PDF to inventory" uppercase word in the button & double modal [SCI-8496]
This commit is contained in:
artoscinote 2023-05-29 11:28:10 +02:00 committed by GitHub
commit d328942220
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 7 deletions

View file

@ -326,12 +326,14 @@
let url = row.attr('data-save-to-inventory-path');
$.get(url, function(result) {
let modal = $(result.html);
$('#content-reports-index').append(modal);
modal.modal('show');
// Remove modal when it gets closed
modal.on('hidden.bs.modal', function() {
$(this).remove();
});
if ($('#content-reports-index').find('#savePDFtoInventory').length === 0) {
$('#content-reports-index').append(modal);
modal.modal('show');
// Remove modal when it gets closed
modal.on('hidden.bs.modal', function() {
$(this).remove();
});
}
});
});
}

View file

@ -59,7 +59,7 @@ module Toolbars
label: I18n.t('projects.reports.index.save_pdf_to_inventory'),
icon: 'fas fa-save',
button_id: 'savePdfToInventoryButton',
type: 'remote-modal'
path: save_pdf_to_inventory_modal_report_path(@report.id)
}
end