@@ -, +, @@ dialogs - Test the following interactions, both the confirmation and cancel options for each: - Cancel a hold - Suspend all holds - Resume all holds - Cancel an article request --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 6 ++---- koha-tmpl/opac-tmpl/bootstrap/js/global.js | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -750,7 +750,6 @@ e.preventDefault(); var hold_title = $(this).data("title"); var reserve_id = $(this).data("reserve_id"); - var body = "

" + hold_title + "

"; confirmModal( hold_title, _("Are you sure you want to cancel this hold?"), _("Yes, cancel hold"), _("No, do not cancel hold"), function( result ){ if( result ){ $("#delete_hold_" + reserve_id ).submit(); @@ -761,10 +760,9 @@ $(".btn-delete-article-request").on("click", function(e){ e.preventDefault(); - var hold_title = $(this).data("title"); + var article_request = $(this).data("title"); var article_request_id = $(this).data("article-request_id"); - var body = "

" + hold_title + "

"; - confirmModal( hold_title, _("Are you sure you want to cancel this article request?"), _("Yes, cancel article request"), _("No, do not cancel article request"), function( result ){ + confirmModal( article_request, _("Are you sure you want to cancel this article request?"), _("Yes, cancel article request"), _("No, do not cancel article request"), function( result ){ if( result ){ $("#delete_article_request_" + article_request_id ).submit(); } --- a/koha-tmpl/opac-tmpl/bootstrap/js/global.js +++ a/koha-tmpl/opac-tmpl/bootstrap/js/global.js @@ -82,7 +82,7 @@ function confirmModal(message, title, yes_label, no_label, callback) { } $("#bootstrap-confirm-box-modal .modal-header h4").text( title || "" ); - $("#bootstrap-confirm-box-modal .modal-body p").text( message || "" ); + $("#bootstrap-confirm-box-modal .modal-body").html( message || "" ); $("#bootstrap-confirm-box-modal-submit").text( yes_label || 'Confirm' ); $("#bootstrap-confirm-box-modal-cancel").text( no_label || 'Cancel' ); $("#bootstrap-confirm-box-modal").modal('show'); --