Bugzilla – Attachment 187111 Details for
Bug 40908
Issues with deleting items from additem page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40908: Remove JS confirmation, fix link, fix modal
Bug-40908-Remove-JS-confirmation-fix-link-fix-moda.patch (text/plain), 3.92 KB, created by
Biblibre Sandboxes
on 2025-09-30 15:34:28 UTC
(
hide
)
Description:
Bug 40908: Remove JS confirmation, fix link, fix modal
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2025-09-30 15:34:28 UTC
Size:
3.92 KB
patch
obsolete
>From d1ab3989effefd8811bdbe46bc2421d8f1ce0b78 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Tue, 30 Sep 2025 12:41:48 +0000 >Subject: [PATCH] Bug 40908: Remove JS confirmation, fix link, fix modal > >To test: >1. Without the patch: > >-Clicking delete from the Actions button -> delete pops up both a JS alert and a BS confirmation modal. The deletion works. > >-Clicking the "Delete item" button that appears when you hover over any cell pops up both a JS alert and a BS confirmation modal. The deletion does NOT work. > >-The "Cancel" button in the delete-item-modal does nothing. > >2. APPLY THE PATCH: > >-Clicking delete from the Actions button -> 1 modal for confirmation. The deletion works. > >-Clicking the "Delete item" button that appears when you hover over any cell pops up only a modal confirmation. The deletion works. > >-The "Cancel" button in the delete-item-modal properly closes the modal. > >Signed-off-by: Jason <jvasche@roundrocktexas.gov> >--- > .../modals/delete_item_confirmation.inc | 2 +- > .../prog/js/cataloging_additem.js | 20 +++++++++---------- > 2 files changed, 10 insertions(+), 12 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/modals/delete_item_confirmation.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/modals/delete_item_confirmation.inc >index 4dbcc64e24..d54b9873a7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/modals/delete_item_confirmation.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/modals/delete_item_confirmation.inc >@@ -23,7 +23,7 @@ > </div> > <div class="modal-footer"> > <button id="delete-item-modal-btn-submit" type="button" class="btn btn-primary"><i class="fa fa-exclamation-circle"></i> Delete item</button> >- <button class="btn btn-default deny cancel" href="#" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times"></i> Cancel</button> >+ <button class="btn btn-default deny cancel" href="#" data-bs-dismiss="modal" aria-hidden="true"><i class="fa fa-times"></i> Cancel</button> > </div> > </div> > </div> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js b/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js >index 507bfa9b4e..1de2bda6e1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js >@@ -35,7 +35,7 @@ $(document).ready(function () { > ); > $(edit_link).text(LABEL_EDIT_ITEM); > var delete_link = $( >- '<a class="delete" data-item="' + >+ '<a class="delete" data-itemnumber="' + > num_rowid + > '" href="#"></a>' > ); >@@ -153,18 +153,16 @@ $(document).ready(function () { > > $(document).on("click", ".delete", function (e) { > e.preventDefault(); >- if (confirmDelete(MSG_CONFIRM_DELETE_ITEM)) { >- var itemnumber = $(this).data("itemnumber"); >- var hasSerialItem = $(this).data("has-serial-item"); >+ var itemnumber = $(this).data("itemnumber"); >+ var hasSerialItem = $(this).data("has-serial-item"); > >- $("#delete-item-itemnumber").val(itemnumber); >- $("#delete_associated_serial_issues").attr("checked", false); >- $("#delete-item-modal-btn-submit").data("item", itemnumber); >- if (!hasSerialItem) { >- $(".form-group").hide(); >- } >- $("#delete-item-modal").modal("show"); >+ $("#delete-item-itemnumber").val(itemnumber); >+ $("#delete_associated_serial_issues").attr("checked", false); >+ $("#delete-item-modal-btn-submit").data("item", itemnumber); >+ if (!hasSerialItem) { >+ $(".form-group").hide(); > } >+ $("#delete-item-modal").modal("show"); > }); > $(document).on("click", "#delete-item-modal-btn-submit", function (e) { > e.preventDefault(); >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40908
:
187098
|
187111
|
187135