Merge pull request #1200 from corubba/feature/modal-consolidation

enh: Consolidate generic modal code
This commit is contained in:
jbe-dw
2022-05-23 22:50:48 +02:00
committed by GitHub
6 changed files with 22 additions and 34 deletions

View File

@ -251,9 +251,7 @@
// handle apply changes button
$(document.body).on("click",".button_apply_changes", function() {
if (nNew || nEditing) {
var modal = $("#modal_error");
modal.find('.modal-body p').text("Previous record not saved. Please save it before applying the changes.");
modal.modal('show');
showErrorModal("Previous record not saved. Please save it before applying the changes.");
return;
}
@ -277,9 +275,7 @@
// handle add record button
$(document.body).on("click", ".button_add_record", function (e) {
if (nNew || nEditing) {
var modal = $("#modal_error");
modal.find('.modal-body p').text("Previous record not saved. Please save it before adding more record.");
modal.modal('show');
showErrorModal("Previous record not saved. Please save it before adding more record.");
return;
}
// clear search first