From bf858f31de3b6e20911f7f799129fdbb84a38305 Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Thu, 3 Aug 2023 13:24:05 +0200 Subject: [PATCH] Added dialog for delete --- application/views/labels/index.php | 6 ++--- assets/js/sections/labels.js | 38 ++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/application/views/labels/index.php b/application/views/labels/index.php index 7f8755d6..2b2e7422 100644 --- a/application/views/labels/index.php +++ b/application/views/labels/index.php @@ -47,7 +47,7 @@ - + paper_name; ?> metric; ?> width; ?> @@ -55,7 +55,7 @@ lbl_cnt ?? '0' ?> orientation == 'P' ? 'Portrait': 'Landscape'; ?> - + useforprint == 1) {echo 'checked';}?>> - + 0) { + message = 'Warning! This paper type is in use. Are you really sure you want delete this paper type?'; + } + BootstrapDialog.confirm({ + title: 'DANGER', + message: message, + type: BootstrapDialog.TYPE_DANGER, + closable: true, + draggable: true, + btnOKClass: 'btn-danger', + callback: function(result) { + if (result) { + window.location.replace(base_url + 'index.php/labels/deletePaper/'+id); + } + } + }); +}